-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0930095
Showing
6 changed files
with
14,064 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
.DS_Store | ||
out.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# GeoBox | ||
|
||
Generate a geofeed file, straight from your netbox data! | ||
|
||
GeoBox is a tiny python script that lets you generate [RFC8805](https://www.rfc-editor.org/rfc/rfc8805) geofeed.csv | ||
files straight from your [netbox](https://github.com/netbox-community/netbox) data, allowing you to automate your | ||
geofeed maintenance and to keep netbox as a source of truth for IP data. | ||
|
||
## Setup instructions | ||
|
||
- Clone this repository and install the dependencies: | ||
```bash | ||
git clone https://github.com/FrumentumNL/GeoBox.git | ||
cd geobox | ||
pip3 install -r requirements.txt | ||
``` | ||
- Open your netbox installation, go to the customization tab and import the following files (in order): | ||
- **Custom Field Choices:** [choices.json](fields/choices.json) | ||
- **Custom Fields:** [fields.json](fields/fields.json) | ||
> [!NOTE] | ||
> Importing these files is currently broken due to a bug in netbox. This should be fixed in the next release. For now, | ||
> try taking a look at their contents to see the format. | ||
- Create a new API key in netbox. It does not need write permissions. | ||
|
||
Now, you can run the script! | ||
|
||
```bash | ||
# python3 geobox.py [installation url] [api key] [output location] | ||
python3 geobox.py https://my.netbox.installation my_key /var/www/geofeed.csv | ||
``` |
Oops, something went wrong.