summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-02-26 19:02:17 +0100
committerChristian Breunig <christian@breunig.cc>2026-02-26 19:02:17 +0100
commit04f18aec27bd958e0ba4953233b7bb830c994194 (patch)
tree92d02a788167a89e4b1515af19e677cd890b5032
parent61ba7ee632fd2ee8fe58b636087e539da89c6e65 (diff)
downloadvyos-1x-04f18aec27bd958e0ba4953233b7bb830c994194.tar.gz
vyos-1x-04f18aec27bd958e0ba4953233b7bb830c994194.zip
ospf: T7679: fix invalid indention in verify()
-rwxr-xr-xsrc/conf_mode/protocols_ospf.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py
index 848079ba1..3f312d2cd 100755
--- a/src/conf_mode/protocols_ospf.py
+++ b/src/conf_mode/protocols_ospf.py
@@ -62,30 +62,30 @@ def verify(config_dict):
# Validate if configured Access-list exists
if 'area' in ospf:
- networks = []
- for area, area_config in ospf['area'].items():
- # Implemented as warning to not break existing configurations
- if area == '0' and dict_search('area_type.nssa', area_config) != None:
- Warning('You cannot configure NSSA to backbone!')
- # Implemented as warning to not break existing configurations
- if area == '0' and dict_search('area_type.stub', area_config) != None:
- Warning('You cannot configure STUB to backbone!')
- # Implemented as warning to not break existing configurations
- if len(area_config['area_type']) > 1:
- Warning(f'Only one area-type is supported for area "{area}"!')
-
- if 'import_list' in area_config:
- acl_import = area_config['import_list']
- if acl_import: verify_access_list(acl_import, ospf)
- if 'export_list' in area_config:
- acl_export = area_config['export_list']
- if acl_export: verify_access_list(acl_export, ospf)
-
- if 'network' in area_config:
- for network in area_config['network']:
- if network in networks:
- raise ConfigError(f'Network "{network}" already defined in different area!')
- networks.append(network)
+ networks = []
+ for area, area_config in ospf['area'].items():
+ # Implemented as warning to not break existing configurations
+ if area == '0' and dict_search('area_type.nssa', area_config) != None:
+ Warning('You cannot configure NSSA to backbone!')
+ # Implemented as warning to not break existing configurations
+ if area == '0' and dict_search('area_type.stub', area_config) != None:
+ Warning('You cannot configure STUB to backbone!')
+ # Implemented as warning to not break existing configurations
+ if len(area_config['area_type']) > 1:
+ Warning(f'Only one area-type is supported for area "{area}"!')
+
+ if 'import_list' in area_config:
+ if acl_import := area_config['import_list']:
+ verify_access_list(acl_import, ospf)
+ if 'export_list' in area_config:
+ if acl_export := area_config['export_list']:
+ verify_access_list(acl_export, ospf)
+
+ if 'network' in area_config:
+ for network in area_config['network']:
+ if network in networks:
+ raise ConfigError(f'Network "{network}" already defined in different area!')
+ networks.append(network)
if 'interface' in ospf:
for interface, interface_config in ospf['interface'].items():