Skip to content

Commit

Permalink
compile_junos_data: repair mc + all VLAN trunk
Browse files Browse the repository at this point in the history
- correct nest the "mc" dict underneath "ae", no longer incorrectly
  write it underneath "lacp"
- facilitate trunk interfaces with the "all" VLAN ID, avoid an empty
  list being written instead

Signed-off-by: Georg Pfuetzenreuter <[email protected]>
  • Loading branch information
tacerus committed Jan 29, 2024
1 parent b6f2743 commit 6509556
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions juniper_junos-formula/bin/compile_junos_data_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ def compile_devices():
if not 'ae' in small_if:
small_if['ae'] = {}

small_ae = small_if['ae']

for ae in ['lacp', 'mc']:
small_ae = small_if['ae']
if ae in ae_config:
log.debug(f'Processing {ae} on interface {interface}')
if not ae in small_ae:
Expand Down Expand Up @@ -250,7 +249,10 @@ def cleanup():
elif v_config_ids:
found_vids = []
for vid in v_config_ids:
if isinstance(vid, int):
if vid == 'all':
found_vids = [vid]
break
elif isinstance(vid, int):
found_vids.append(vid)
elif match := re.match('^vlan_?(\d+)$', vid):
found_vids.append(int(match.group(1)))
Expand Down

0 comments on commit 6509556

Please sign in to comment.