Skip to content

Commit

Permalink
Nornir Filtering Deep Dive How To (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
writememe committed Apr 24, 2021
1 parent 9d308cb commit 0f03a1d
Show file tree
Hide file tree
Showing 8 changed files with 2,682 additions and 0 deletions.
2,195 changes: 2,195 additions & 0 deletions docs/howto/filtering_deep_dive.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/howto/filtering_deep_dive/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
inventory:
plugin: SimpleInventory
options:
host_file: "filtering_deep_dive/inventory/hosts.yaml"
group_file: "filtering_deep_dive/inventory/groups.yaml"
runner:
plugin: threaded
options:
num_workers: 20
79 changes: 79 additions & 0 deletions docs/howto/filtering_deep_dive/inventory/groups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
ios:
platform: ios
data:
vendor: cisco
junos:
platform: junos
data:
vendor: juniper
eos:
platform: eos
data:
vendor: arista
nxos:
platform: nxos
data:
vendor: cisco
nxos_ssh:
platform: nxos_ssh
data:
vendor: cisco
panos:
platform: paloalto_panos
data:
vendor: palo alto
lab:
data:
sla: 70
production: false
prod:
data:
sla: 90
production: true
test:
data:
sla: 80
production: false
mel:
data:
full_name: Melbourne
country: Australia
region: apac
hemisphere: southern
site_type: primary
hbt:
data:
full_name: Hobart
country: Australia
region: apac
hemisphere: southern
site_type: tertiary
chc:
data:
full_name: Christchurch
country: New Zealand
region: apac
hemisphere: southern
site_type: secondary
ptl:
data:
full_name: Port Louis
country: Mauritius
region: amea
hemisphere: southern
site_type: primary
mtl:
data:
full_name: Montreal
country: Canada
region: amer
hemisphere: northern
site_type: primary
bcn:
data:
full_name: Barcelona
country: Spain
region: amea
hemisphere: northern
site_type: primary
8 changes: 8 additions & 0 deletions docs/howto/filtering_deep_dive/inventory/groups_extract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
mel:
data: # Anything under this key is custom data
full_name: Melbourne # This is custom data
country: Australia # So is this
region: apac # Same as this
hemisphere: southern # Also this too
site_type: primary # Yes, and also this
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
mel:
data: # Anything under this key is custom data
full_name: Melbourne
country: Australia
region: apac
hemisphere: southern
site_type: primary
location: # New location data is stored about the site
address: 1 Wurundjeri Street
suburb: Northcote
zip_code: 3070

0 comments on commit 0f03a1d

Please sign in to comment.