diff options
author | hagbard <vyosdev@derith.de> | 2019-09-04 13:18:02 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-09-04 13:18:02 -0700 |
commit | d1a121d54e114640da6f020c859865c9b5259091 (patch) | |
tree | a9e9b98165ef8688b339cfd954209b3892db3851 /src/conf_mode/interface-dummy.py | |
parent | a4f34dfe7e003510a4e6263b012b79221a5a786f (diff) | |
parent | 952871200ecee584e7ed1bcb37bdaa06111e3a72 (diff) | |
download | vyos-1x-d1a121d54e114640da6f020c859865c9b5259091.tar.gz vyos-1x-d1a121d54e114640da6f020c859865c9b5259091.zip |
Merge branch 'current' of https://github.com/vyos/vyos-1x into current
Diffstat (limited to 'src/conf_mode/interface-dummy.py')
-rwxr-xr-x | src/conf_mode/interface-dummy.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/conf_mode/interface-dummy.py b/src/conf_mode/interface-dummy.py index 03afdc668..4a1179672 100755 --- a/src/conf_mode/interface-dummy.py +++ b/src/conf_mode/interface-dummy.py @@ -19,8 +19,10 @@ from os import environ from copy import deepcopy from sys import exit -from vyos.config import Config + from vyos.ifconfig import DummyIf +from vyos.configdict import list_diff +from vyos.config import Config from vyos import ConfigError default_config_data = { @@ -32,10 +34,6 @@ default_config_data = { 'intf': '' } -def diff(first, second): - second = set(second) - return [item for item in first if item not in second] - def get_config(): dummy = deepcopy(default_config_data) conf = Config() @@ -70,7 +68,7 @@ def get_config(): # address is no longer valid and needs to be removed from the interface eff_addr = conf.return_effective_values('address') act_addr = conf.return_values('address') - dummy['address_remove'] = diff(eff_addr, act_addr) + dummy['address_remove'] = list_diff(eff_addr, act_addr) return dummy |