summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-05 19:46:28 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-05 19:46:28 +0100
commit5de6cd0247d77b2a679d7e1071e1f48a3e7c7a9d (patch)
treec7d1519aea5d29f2be6199ae41ef0799ee93daca /src
parentd161cbbe201061a0926889f598c2a43d3c65e052 (diff)
downloadvyos-1x-5de6cd0247d77b2a679d7e1071e1f48a3e7c7a9d.tar.gz
vyos-1x-5de6cd0247d77b2a679d7e1071e1f48a3e7c7a9d.zip
vrf: T31: table id is mandatory
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vrf.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index dd4b337e6..565db23d5 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -146,10 +146,14 @@ def verify(vrf_config):
if len(vrf['members']) > 0:
raise ConfigError('VRF "{}" can not be deleted as it has active members'.format(vrf['name']))
- # routing table id can't be changed - OS restriction
for vrf in vrf_config['vrf_add']:
+ # table id is mandatory
+ if not vrf['table']:
+ raise ConfigError('VRF "{}": table id is mandatory'.format(vrf['name']))
+
+ # routing table id can't be changed - OS restriction
if vrf['table_mod']:
- raise ConfigError('VRF routing table id modification is not possible')
+ raise ConfigError('VRF "{}": modification of table id is not possible'.format(vrf['name']))
# add test to see if routing table already exists or not?