mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: bond: replace bond-ad-sys-priority and bond-ad-sys-mac-addr with equivalent upstream attributes
Ticket: CM-9677 Reviewed By: nikhil Testing Done: Tested with bond config file in CM-9677 This patch replaces the following attributes: bond-ad-sys-priority with bond-ad-actor-sys-prio bond-ad-sys-mac-addr with bond-ad-actor-system The new attributes correspond to the new sysfs files below: /sys/class/net/sidelink/bonding/ad_actor_sys_prio /sys/class/net/sidelink/bonding/ad_actor_system Old values will be accepted with a deprecated warning: warning: attribute bond-ad-sys-priority is deprecated. Use bond-ad-actor-sys-prio instead warning: attribute bond-ad-sys-mac-addr is deprecated. Use bond-ad-actor-system instead
This commit is contained in:
@@ -43,11 +43,11 @@ class bondutil(utilsBase):
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'lacp_rate'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/lacp_rate'
|
||||
%bondname).split()[1])
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'ad_sys_priority'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/ad_sys_priority'
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'ad_actor_sys_prio'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/ad_actor_sys_prio'
|
||||
%bondname))
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'ad_sys_mac_addr'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/ad_sys_mac_addr'
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'ad_actor_system'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/ad_actor_system'
|
||||
%bondname))
|
||||
linkCache.set_attr([bondname, 'linkinfo', 'lacp_bypass'],
|
||||
self.read_file_oneline('/sys/class/net/%s/bonding/lacp_bypass'
|
||||
@@ -270,11 +270,17 @@ class bondutil(utilsBase):
|
||||
def get_min_links(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'min_links'])
|
||||
|
||||
def get_ad_sys_mac_addr(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'ad_sys_mac_addr'])
|
||||
def get_ad_actor_system(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'ad_actor_system'])
|
||||
|
||||
def get_ad_sys_priority(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'ad_sys_priority'])
|
||||
def get_ad_actor_sys_prio(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'ad_actor_sys_prio'])
|
||||
|
||||
def get_num_unsol_na(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'num_unsol_na'])
|
||||
|
||||
def get_num_grat_arp(self, bondname):
|
||||
return self._cache_get([bondname, 'linkinfo', 'num_grat_arp'])
|
||||
|
||||
def enslave_slave(self, bondname, slave, prehook=None, posthook=None):
|
||||
slaves = self._cache_get([bondname, 'linkinfo', 'slaves'])
|
||||
|
Reference in New Issue
Block a user