diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-09-22 18:35:44 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-09-22 18:35:44 +0200 |
commit | d28a6a516d449ede788816574c35061fbf7d6485 (patch) | |
tree | 58df84e463c2f516ffc0d9c4ef4fedd67c019849 /src/conf_mode/interfaces-tunnel.py | |
parent | e31dfd9f5542b0572e3ece89bdc347679b08aa72 (diff) | |
download | vyos-1x-d28a6a516d449ede788816574c35061fbf7d6485.tar.gz vyos-1x-d28a6a516d449ede788816574c35061fbf7d6485.zip |
ifconfig: T2653: move is_member() from vyos.vylidate to vyos.configdict
Diffstat (limited to 'src/conf_mode/interfaces-tunnel.py')
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index 11d8d6edc..f1d885b15 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -22,10 +22,11 @@ from copy import deepcopy from netifaces import interfaces from vyos.config import Config +from vyos.configdict import is_member from vyos.ifconfig import Interface, GREIf, GRETapIf, IPIPIf, IP6GREIf, IPIP6If, IP6IP6If, SitIf, Sit6RDIf from vyos.ifconfig.afi import IP4, IP6 from vyos.configdict import list_diff -from vyos.validate import is_ipv4, is_ipv6, is_member +from vyos.validate import is_ipv4, is_ipv6 from vyos import ConfigError from vyos.dicts import FixedDict @@ -170,8 +171,8 @@ class ConfigurationState(object): """ >>> conf.get_values('addresses', 'address') will place a list of the new IP present in 'interface dummy dum1 address' - into the dictionnary entry "-add" (here 'addresses-add') using - Config.return_values and will add the the one which were removed in into + into the dictionnary entry "-add" (here 'addresses-add') using + Config.return_values and will add the the one which were removed in into the entry "-del" (here addresses-del') """ add_name = f'{name}-add' @@ -263,7 +264,7 @@ class ConfigurationState(object): d = d[lpath[-1]] # XXX: it should have provided me the content and not the key self._conf.set_level(l) - return d + return d def to_api(self): """ |