1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdown: add missing supporting code for 'link-down [yes|no]'

Ticket: CM-13434
Reviewed by: julien, nikhil, daniel
Testing Done: ifreload and multiple down [yes|no] sequences under
physical and logical interfaces (ifupdown2-tests test case is pending)

This also moves the fix done for CM-4125 (inet manual handling for
logical devices) into a single place under ifupdownmain.

attribute 'link-down [yes|no]' will not work in all cases when 'inet manual'
is used. This is only to preserve the semantics of 'inet manual'.
Best use of 'link-down [yes|no]' is to use it without 'inet manual'..
they are conflicting features anyways.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2017-01-04 14:52:09 -08:00
parent 417e5675c4
commit 9858b0a680
6 changed files with 21 additions and 20 deletions

View File

@@ -141,11 +141,6 @@ class vlan(moduleBase):
return
netlink.link_add_vlan(vlanrawdevice, ifaceobj.name, vlanid)
self._bridge_vid_add_del(ifaceobj, vlanrawdevice, vlanid)
if ifaceobj.addr_method == 'manual':
try:
netlink.link_set_updown(ifaceobj.name, "up")
except Exception as e:
self.log_error('%s: %s' % (ifaceobj.name, str(e)), ifaceobj)
def _down(self, ifaceobj):
vlanid = self._get_vlan_id(ifaceobj)