summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_isis.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/protocols_isis.py')
-rwxr-xr-xsrc/conf_mode/protocols_isis.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py
index 0c179b724..f3098ff71 100755
--- a/src/conf_mode/protocols_isis.py
+++ b/src/conf_mode/protocols_isis.py
@@ -69,6 +69,15 @@ def get_config(config=None):
# Merge policy dict into "regular" config dict
isis = dict_merge(tmp, isis)
+ for interface in isis.get('interface'):
+ # when we use tunnel interface necessary additional config validate
+ if interface.startswith('tun'):
+ isis['tunnel_config'] = conf.get_config_dict(
+ ['interfaces', 'tunnel'],
+ key_mangling=('-', '_'),
+ get_first_key=True)
+ break
+
return isis
def verify(isis):
@@ -103,6 +112,10 @@ def verify(isis):
f'Recommended area lsp-mtu {recom_area_mtu} or less ' \
'(calculated on MTU size).')
+ if interface.startswith('tun'):
+ if not dict_search(f'tunnel_config.{interface}.remote', isis):
+ raise ConfigError(f'Option remote for interface {interface} is required.')
+
# If md5 and plaintext-password set at the same time
for password in ['area_password', 'domain_password']:
if password in isis: