Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahvdAa committed Oct 29, 2023
0 parents commit 0930095
Show file tree
Hide file tree
Showing 6 changed files with 14,064 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
.DS_Store
out.csv
30 changes: 30 additions & 0 deletions README.md
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
```
Loading

0 comments on commit 0930095

Please sign in to comment.