Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RIPE JSON modified and template added #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MAVRICK-1
Copy link
Contributor

I have made modifications to the code to generate Json file for the RIPE archive data

Date Condition:

As per the provided URL RIPE archive data, the output.json.xz file is available after October 11, 2023. Consequently, I have made two changes to the code based on the date condition.

Depending on the date condition:

  • If the date is before October 11, 2023:
    • The updated code generates a JSON file from a CSV file.
    • The generated JSON file follows the same format as the current JSON file.
  • If the date is on or after October 11, 2023:
    • The code generates a JSON file by uncompressing a provided output.json.xz file.
  • The JSON files are stored in same path as csv file

URL Reference:
The relevant URL for this operation is [https://ftp.ripe.net/rpki/apnic.tal/).

This modification allows the code to adapt its behavior based on the specified date condition, either generating JSON from a CSV file or uncompressing a specific JSON file.

Here the output for 2018/10/01

only including the output for RIPE ARCHIVE urls

PS C:\Users\RISHI\Desktop\route-origin-validator\rov » rov 8.8.8.0/24 15169 --rpki_archive 2018/10/01 
Downloading: https://ftp.ripe.net/rpki/afrinic.tal/2018/10/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/apnic.tal/2018/10/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/arin.tal/2018/10/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/lacnic.tal/2018/10/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/ripencc.tal/2018/10/01/roas.csv.xz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/delegated\nro-extended-stats
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/irr\+lacnic.db.gz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/irr\lacnic.db.gz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\afrinic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\afrinic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\apnic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\apnic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\arin.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\arin.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\lacnic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\lacnic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\ripencc.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2018/10/01\ripencc.json
{
    "query": {
        "prefix": "8.8.8.0/24",
        "asn": 15169
    },
    "irr": {
        "status": "NotFound"
    },
    "rpki": {
        "status": "NotFound"
    },
    "delegated": {
        "prefix": {
            "status": "assigned",
            "prefix": "8.8.8.0/24",
            "date": "20231228",
            "registry": "arin",
            "country": "US"
        },
        "asn": {
            "status": "assigned",
            "registry": "arin"
        }
    }
}

Here the output for 2024/01/01

only including the output for RIPE ARCHIVE urls

PS C:\Users\RISHI\Desktop\route-origin-validator\rov » rov 8.8.8.0/24 15169 --rpki_archive 2024/01/01
Downloading: https://ftp.ripe.net/rpki/afrinic.tal/2024/01/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/apnic.tal/2024/01/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/arin.tal/2024/01/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/lacnic.tal/2024/01/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/ripencc.tal/2024/01/01/roas.csv.xz
Downloading: https://ftp.ripe.net/rpki/afrinic.tal/2024/01/01/output.json.xz
Downloading: https://ftp.ripe.net/rpki/apnic.tal/2024/01/01/output.json.xz
Downloading: https://ftp.ripe.net/rpki/arin.tal/2024/01/01/output.json.xz
Downloading: https://ftp.ripe.net/rpki/lacnic.tal/2024/01/01/output.json.xz
Downloading: https://ftp.ripe.net/rpki/ripencc.tal/2024/01/01/output.json.xz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/delegated\nro-extended-stats
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/irr\+lacnic.db.gz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/irr\lacnic.db.gz
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\afrinic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\afrinic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\apnic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\apnic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\arin.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\arin.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\lacnic.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\lacnic.json
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\ripencc.csv
Loading: C:\Users\RISHI\AppData\Local\IHR\rov\Cache/db/rpki//2024/01/01\ripencc.json
{
    "query": {
        "prefix": "8.8.8.0/24",
        "asn": 15169
    },
    "irr": {
        "status": "NotFound"
    },
    "rpki": {
        "status": "Valid",
        "prefix": "8.8.8.0/24",
        "maxLength": 24,
        "ta": "unknown",
        "startTime": "2023-12-29 17:14:18",
        "endTime": "2024-03-28 16:14:18",
        "uri": "rsync://rpki.arin.net/repository/arin-rpki-ta/5e4a23ea-e80a-403e-b08c-2171da2157d3/f60c9f32-a87c-4339-a2f3-6299a3b02e29/5e9328a9-e1d2-45d8-bdb5-eefe152994f9/d74ad38d-11d3-3c79-a22a-29626dd55bea.roa"
    },
    "delegated": {
        "prefix": {
            "status": "assigned",
            "prefix": "8.8.8.0/24",
            "date": "20231228",
            "registry": "arin",
            "country": "US"
        },
        "asn": {
            "status": "assigned",
            "registry": "arin"
        }
    }
}

This Resolves the issue #19

Added Issue and pull Request template

Issue and pull request templates in GitHub serve as predefined structures for creating new issues or pull requests. They provide a standardized format and set of information that contributors should include when opening issues or submitting pull requests. Here's how they help:

  1. Consistency: Templates ensure that contributors provide essential details in a standardized format. This consistency makes it easier for maintainers to understand the issue or pull request promptly.

  2. Information Gathering: Templates guide users to provide relevant information, such as a clear description, steps to reproduce, or a summary of changes. This reduces back-and-forth communication and helps in faster issue resolution or pull request acceptance.

  3. Reduced Ambiguity: By specifying the information required, templates reduce ambiguity and clarify expectations. This is particularly beneficial when contributors are less familiar with the project or when dealing with complex issues.

  4. Documentation: Templates can include helpful instructions, tips, or links to documentation, making it easier for contributors to navigate the contribution process. This can be especially valuable for new contributors.

  5. Streamlined Workflow: With templates, contributors follow a structured workflow, which simplifies the process of handling issues and pull requests. It ensures that the necessary information is available upfront.

This Solves issue #18

@romain-fontugne can you review my PR :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant