network-importer icon indicating copy to clipboard operation
network-importer copied to clipboard

Provide valid examples of the `network_importer.toml` configuration file

Open dteycheney opened this issue 4 years ago • 5 comments

Environment

  • Python version: 3.8.10
  • Network Importer version: 3.0.0

Proposed Functionality

It would be good to provide a couple of examples for both netbox and nautobot of some working examples of the network-importer configuration file that are compatible with version 3 or higher.

There are some examples but it's unclear which version of network-importer they are for.

dteycheney avatar Sep 13 '21 00:09 dteycheney

FYI @tim-fiola

dteycheney avatar Sep 13 '21 00:09 dteycheney

@dteycheney does this page cover it? https://github.com/networktocode/network-importer/blob/develop/docs/getting_started.md

There are a couple of examples throughout.

jvanderaa avatar Sep 13 '21 00:09 jvanderaa

That is the one that I have used very successfully and have documented in other places with the demo.

jvanderaa avatar Sep 13 '21 00:09 jvanderaa

@jvanderaa, maybe I wasn't too clear so I'll explain a little further.

There is a network-importer file at the base of the project, which I tried to use initially.

Below is the example I got to work with version 3.

[main]
# Import IP addresses
import_ips = true
# Import prefixes
import_prefixes = true
# Do not import cabling
import_cabling = false
# Import VLANs
import_vlans = true
# Use nautobot as the backend
backend = "nautobot"

[logs]
# Set logging to info
level = "info"

[inventory.settings]
# Setup nautobot server
address = "https://<nautobot_server>"

[batfish]
address = "x.x.x.x"   # Alternative Env Variable : BATFISH_ADDRESS
network_name = "<your-network>"
snapshot_name = "<your-snapshot>"
port_v1 = 9997
port_v2 = 9996
use_ssl = false

# Connection parameters for Netmiko
[network.netmiko_extras]
global_delay_factor = 5
banner_timeout = 15
conn_timeout = 5

An idea could be structuing the examples. Something like:

examples/
    v2/
        nautobot/
           example_one.toml
           example_two.toml
        netbox/
           example_one.toml
           example_two.toml
  v3/
        nautobot/
           example_one.toml
           example_two.toml
        netbox/
           example_one.toml
           example_two.toml

Then it's really clear which examples work on what environments.

dteycheney avatar Sep 13 '21 01:09 dteycheney

Sounds good that you are up and running. I'll look to take out/update the number of places that there are examples. That has not helped out at this one point in time. Completely agree here.

jvanderaa avatar Sep 13 '21 01:09 jvanderaa