mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vlan: ifquery will try to get the vlan-id from the ifacename if vlan-id attr is missing
Ticket: CM-11485 Reviewed By: Roopa Testing Done: config from the github issue First reported here https://github.com/CumulusNetworks/ifupdown2/issues/10 ifquery just like ifupdown should try to get the vlan-id from the iface name if vlan-id attr is not specified. Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@ -176,11 +176,13 @@ class vlan(moduleBase):
|
||||
else:
|
||||
ifaceobjcurr.update_config_with_status('vlan-raw-device',
|
||||
vlanrawdev, 0)
|
||||
if vlanid != ifaceobj.get_attr_value_first('vlan-id'):
|
||||
vlanid_config = ifaceobj.get_attr_value_first('vlan-id')
|
||||
if not vlanid_config:
|
||||
vlanid_config = str(self._get_vlan_id(ifaceobj))
|
||||
if vlanid != vlanid_config:
|
||||
ifaceobjcurr.update_config_with_status('vlan-id', vlanid, 1)
|
||||
else:
|
||||
ifaceobjcurr.update_config_with_status('vlan-id',
|
||||
vlanid, 0)
|
||||
ifaceobjcurr.update_config_with_status('vlan-id', vlanid, 0)
|
||||
self._bridge_vid_check(ifaceobj, ifaceobjcurr, vlanrawdev, vlanid)
|
||||
|
||||
def _query_running(self, ifaceobjrunning):
|
||||
|
Reference in New Issue
Block a user