Skip to content

Commit

Permalink
compile_junos_data_ng: default to access switch
Browse files Browse the repository at this point in the history
If no role for a device is present, assume the device to be an
access switch.

Signed-off-by: Georg Pfuetzenreuter <[email protected]>
  • Loading branch information
tacerus committed Jan 22, 2024
1 parent bd1af0a commit 58bc16c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion juniper_junos-formula/bin/compile_junos_data_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def gather(devices):
access = []

for switch, config in devices.get('switches', {}).items():
role = config.get('role')
if isinstance(config, dict):
role = config.get('role')
else:
role = 'access'
if role == 'core':
core.append(switch)
elif role == 'aggregation':
Expand Down

0 comments on commit 58bc16c

Please sign in to comment.