diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-22 18:17:36 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-22 18:17:36 +0100 |
commit | a3e11ace758f447ddbbabd31d4903b3f71baa0b8 (patch) | |
tree | 947090084dd8f1d167a47ee2b2b7075808b4ee14 | |
parent | 577ae00d0c7329bea8102fcf75de82cb188b4fb8 (diff) | |
download | vyos-1x-a3e11ace758f447ddbbabd31d4903b3f71baa0b8.tar.gz vyos-1x-a3e11ace758f447ddbbabd31d4903b3f71baa0b8.zip |
vyos.ifconfig: extend debug option to print input dict
-rw-r--r-- | python/vyos/ifconfig/interface.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index d9507d816..4bdabd432 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -923,12 +923,12 @@ class Interface(Control): else: add_vlan.append(vlan) allowed_vlan_ids.append(vlan) - + # Remove redundant VLANs from the system for vlan in list_diff(cur_vlan_ids, add_vlan): cmd = f'bridge vlan del dev {ifname} vid {vlan} master' self._cmd(cmd) - + for vlan in allowed_vlan_ids: cmd = f'bridge vlan add dev {ifname} vid {vlan} master' self._cmd(cmd) @@ -1074,6 +1074,10 @@ class Interface(Control): interface setup code and provide a single point of entry when workin on any interface. """ + if self.debug: + import pprint + pprint.pprint(config) + # Cache the configuration - it will be reused inside e.g. DHCP handler # XXX: maybe pass the option via __init__ in the future and rename this # method to apply()? |