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:
		@@ -683,7 +683,15 @@ class ifupdownMain(ifupdownBase):
 | 
			
		||||
                continue
 | 
			
		||||
            attrsdict = mdict.get('attrs')
 | 
			
		||||
            try:
 | 
			
		||||
                if attrsdict.get(attrname):
 | 
			
		||||
                a = attrsdict.get(attrname)
 | 
			
		||||
                if a:
 | 
			
		||||
                    if a.get('deprecated'):
 | 
			
		||||
                        newa = a.get('new-attribute')
 | 
			
		||||
                        if newa:
 | 
			
		||||
                            self.logger.warn('attribute %s is deprecated. Use %s instead' %(attrname, newa))
 | 
			
		||||
                        else:
 | 
			
		||||
                            self.logger.warn('attribute %s is deprecated'
 | 
			
		||||
                                             %attrname)
 | 
			
		||||
                    return True
 | 
			
		||||
            except AttributeError:
 | 
			
		||||
                pass
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user