summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_rip.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/protocols_rip.py')
-rwxr-xr-xsrc/conf_mode/protocols_rip.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_rip.py b/src/conf_mode/protocols_rip.py
index a76c1ce76..e29b23765 100755
--- a/src/conf_mode/protocols_rip.py
+++ b/src/conf_mode/protocols_rip.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021 VyOS maintainers and contributors
+# Copyright (C) 2021-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -56,9 +56,24 @@ def get_config(config=None):
# We have gathered the dict representation of the CLI, but there are default
# options which we need to update into the dictionary retrived.
default_values = defaults(base)
+
+ # T2665: we can not blend in default values of tagNodes - delete and add
+ # individual values later on ...
+ if 'interface' in default_values:
+ del default_values['interface']
# merge in remaining default values
rip = dict_merge(default_values, rip)
+ # T2665: add individual per interface defaults
+
+ # T2665: blend in per interface defaults
+ if 'interface' in rip:
+ default_values = defaults(base + ['interface'])
+ for interface in rip['interface']:
+ # merge in default values
+ rip['interface'][interface] = dict_merge(default_values,
+ rip['interface'][interface])
+
# We also need some additional information from the config, prefix-lists
# and route-maps for instance. They will be used in verify().
#