netbox-negistry-importer


Namenetbox-negistry-importer JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://gitlab.cesnet.cz/701/done/netbox_negistry_importer
SummaryImports ripe IP ranges from Negistry into Netbox
upload_time2024-09-30 11:03:14
maintainerNone
docs_urlNone
authorJan Krupa
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Netbox Negistry Importer

Tool to pull data from Negistry (ripe IP ranges) and synchronize it with a Netbox (SOT) as a prefixes.

---
## Install
1. Clone repository
   - `git@gitlab.cesnet.cz:701/done/netbox_negistry_importer.git`
1. Go into the repository
   - `cd netbox_network_importer `
1. Create `virtualenv`
   - `python3 -m venv venv`
1. Activate it
   - `source venv/bin/activate`
1. Install the tool
   - `pip install .`
1. Setup configuration file
   - `cp config/.secrets.yaml.sample config/.secrets.yaml`
   - `cp config/settings.yaml.sample config/settings.yaml`

### Alternatives
1. `pip install git+ssh://git@gitlab.cesnet.cz/701/done/netbox_negistry_importer.git`
   - installs the package
1. Setup configuration files! (see below)
---
## Pre-requisite
To operate, the Netbox Negistry Importer is dependent on the following items:
- Access to Netbox API
- Access to Negistry API
- Created Custom Field on Netbox
```json
    "results": [
        {
            "display": "Client ID",
            "content_types": [
                "ipam.prefix",
            ],
            "type": {
                "value": "text",
                "label": "Text"
            },
            "object_type": null,
            "data_type": "string",
            "name": "client_id",
            "label": "Client ID",
            "description": "",
            "required": false,
            "filter_logic": {
                "value": "loose",
                "label": "Loose"
            },
            "default": null,
            "weight": 100,
            "validation_minimum": null,
            "validation_maximum": null,
            "validation_regex": "",
            "choices": [],
        },
        {
            "display": "Negistry primary key",
            "content_types": [
                "ipam.prefix"
            ],
            "type": {
                "value": "text",
                "label": "Text"
            },
            "object_type": null,
            "data_type": "string",
            "name": "negistry_primary_key",
            "label": "Negistry primary key",
            "description": "IP range from Negistry",
            "required": false,
            "filter_logic": {
                "value": "loose",
                "label": "Loose"
            },
            "default": null,
            "weight": 100,
            "validation_minimum": null,
            "validation_maximum": null,
            "validation_regex": "",
            "choices": [],
        },
        {
            "display": "Netname",
            "content_types": [
                "ipam.prefix",
            ],
            "type": {
                "value": "text",
                "label": "Text"
            },
            "object_type": null,
            "data_type": "string",
            "name": "netname",
            "label": "Netname",
            "description": "",
            "required": false,
            "filter_logic": {
                "value": "loose",
                "label": "Loose"
            },
            "default": null,
            "weight": 100,
            "validation_minimum": null,
            "validation_maximum": null,
            "validation_regex": "",
            "choices": [],
        }
    ]
```
- Created "negistry" tag on Netbox
```json
        {
            "display": "negistry",
            "name": "negistry",
            "slug": "negistry",
            "description": "Negistry Prefix",
        }
```


---
## Configuration file
The configuration properties must be provided via the configuration files. 

Netbox Negistry Importer try to find the configuration file in folders:
- `<PROJECT_ROOT>/config/`
- `/etc/netbox_negistry_importer/`
- `/home/<user>/.config/netbox_negistry_importer/` 
- Or you can set path to configuratin files like:
   - `SETTINGS_FILE_FOR_DYNACONF=/some/custom/path/settings.yaml SECRETS_FOR_DYNACONF=/some/another/path/.secrets.yaml import_negistry`
---
```
# settings.yaml
---
LOGLEVEL: DEBUG
NEGISTRY_URL: <negistry_url>
NETBOX_INSTANCE_URL: <netbox_url>

# .secrets.yaml
---
NETBOX_API_TOKEN: <TOKEN>
```
---
## Execute
The Netbox Negistry Importer runs only in apply mode.

### Apply Mode
**Execution**:
- `import_negistry` # runs the importer
---


            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.cesnet.cz/701/done/netbox_negistry_importer",
    "name": "netbox-negistry-importer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jan Krupa",
    "author_email": "jan.krupa@cesnet.cz",
    "download_url": "https://files.pythonhosted.org/packages/3c/94/1185007afdd685fb5dbdcc03c261ca9f79b60be7afc431bac94bf3295ce0/netbox_negistry_importer-0.2.0.tar.gz",
    "platform": null,
    "description": "# Netbox Negistry Importer\n\nTool to pull data from Negistry (ripe IP ranges) and synchronize it with a Netbox (SOT) as a prefixes.\n\n---\n## Install\n1. Clone repository\n   - `git@gitlab.cesnet.cz:701/done/netbox_negistry_importer.git`\n1. Go into the repository\n   - `cd netbox_network_importer `\n1. Create `virtualenv`\n   - `python3 -m venv venv`\n1. Activate it\n   - `source venv/bin/activate`\n1. Install the tool\n   - `pip install .`\n1. Setup configuration file\n   - `cp config/.secrets.yaml.sample config/.secrets.yaml`\n   - `cp config/settings.yaml.sample config/settings.yaml`\n\n### Alternatives\n1. `pip install git+ssh://git@gitlab.cesnet.cz/701/done/netbox_negistry_importer.git`\n   - installs the package\n1. Setup configuration files! (see below)\n---\n## Pre-requisite\nTo operate, the Netbox Negistry Importer is dependent on the following items:\n- Access to Netbox API\n- Access to Negistry API\n- Created Custom Field on Netbox\n```json\n    \"results\": [\n        {\n            \"display\": \"Client ID\",\n            \"content_types\": [\n                \"ipam.prefix\",\n            ],\n            \"type\": {\n                \"value\": \"text\",\n                \"label\": \"Text\"\n            },\n            \"object_type\": null,\n            \"data_type\": \"string\",\n            \"name\": \"client_id\",\n            \"label\": \"Client ID\",\n            \"description\": \"\",\n            \"required\": false,\n            \"filter_logic\": {\n                \"value\": \"loose\",\n                \"label\": \"Loose\"\n            },\n            \"default\": null,\n            \"weight\": 100,\n            \"validation_minimum\": null,\n            \"validation_maximum\": null,\n            \"validation_regex\": \"\",\n            \"choices\": [],\n        },\n        {\n            \"display\": \"Negistry primary key\",\n            \"content_types\": [\n                \"ipam.prefix\"\n            ],\n            \"type\": {\n                \"value\": \"text\",\n                \"label\": \"Text\"\n            },\n            \"object_type\": null,\n            \"data_type\": \"string\",\n            \"name\": \"negistry_primary_key\",\n            \"label\": \"Negistry primary key\",\n            \"description\": \"IP range from Negistry\",\n            \"required\": false,\n            \"filter_logic\": {\n                \"value\": \"loose\",\n                \"label\": \"Loose\"\n            },\n            \"default\": null,\n            \"weight\": 100,\n            \"validation_minimum\": null,\n            \"validation_maximum\": null,\n            \"validation_regex\": \"\",\n            \"choices\": [],\n        },\n        {\n            \"display\": \"Netname\",\n            \"content_types\": [\n                \"ipam.prefix\",\n            ],\n            \"type\": {\n                \"value\": \"text\",\n                \"label\": \"Text\"\n            },\n            \"object_type\": null,\n            \"data_type\": \"string\",\n            \"name\": \"netname\",\n            \"label\": \"Netname\",\n            \"description\": \"\",\n            \"required\": false,\n            \"filter_logic\": {\n                \"value\": \"loose\",\n                \"label\": \"Loose\"\n            },\n            \"default\": null,\n            \"weight\": 100,\n            \"validation_minimum\": null,\n            \"validation_maximum\": null,\n            \"validation_regex\": \"\",\n            \"choices\": [],\n        }\n    ]\n```\n- Created \"negistry\" tag on Netbox\n```json\n        {\n            \"display\": \"negistry\",\n            \"name\": \"negistry\",\n            \"slug\": \"negistry\",\n            \"description\": \"Negistry Prefix\",\n        }\n```\n\n\n---\n## Configuration file\nThe configuration properties must be provided via the configuration files. \n\nNetbox Negistry Importer try to find the configuration file in folders:\n- `<PROJECT_ROOT>/config/`\n- `/etc/netbox_negistry_importer/`\n- `/home/<user>/.config/netbox_negistry_importer/` \n- Or you can set path to configuratin files like:\n   - `SETTINGS_FILE_FOR_DYNACONF=/some/custom/path/settings.yaml SECRETS_FOR_DYNACONF=/some/another/path/.secrets.yaml import_negistry`\n---\n```\n# settings.yaml\n---\nLOGLEVEL: DEBUG\nNEGISTRY_URL: <negistry_url>\nNETBOX_INSTANCE_URL: <netbox_url>\n\n# .secrets.yaml\n---\nNETBOX_API_TOKEN: <TOKEN>\n```\n---\n## Execute\nThe Netbox Negistry Importer runs only in apply mode.\n\n### Apply Mode\n**Execution**:\n- `import_negistry` # runs the importer\n---\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Imports ripe IP ranges from Negistry into Netbox",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://gitlab.cesnet.cz/701/done/netbox_negistry_importer",
        "Repository": "https://gitlab.cesnet.cz/701/done/netbox_negistry_importer"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c941185007afdd685fb5dbdcc03c261ca9f79b60be7afc431bac94bf3295ce0",
                "md5": "6662ec4f9f8975082fb8e76554e042f0",
                "sha256": "b0bc49c8438443d9e984a8b1bca4c4affb34e570e73b827323ef8cb9eda289e9"
            },
            "downloads": -1,
            "filename": "netbox_negistry_importer-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6662ec4f9f8975082fb8e76554e042f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7152,
            "upload_time": "2024-09-30T11:03:14",
            "upload_time_iso_8601": "2024-09-30T11:03:14.284360Z",
            "url": "https://files.pythonhosted.org/packages/3c/94/1185007afdd685fb5dbdcc03c261ca9f79b60be7afc431bac94bf3295ce0/netbox_negistry_importer-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-30 11:03:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "netbox-negistry-importer"
}
        
Elapsed time: 0.33911s