def change_interface_id(self, newid):
        """
        Change the inline interface ID. The current format is
        nicid='1-2', where '1' is the top level interface ID (first),
        and '2' is the second interface in the pair. Consider the existing
        nicid in case this is a VLAN.
        
        :param str newid: string defining new pair, i.e. '3-4'
        :return: None
        """
        try:
            newleft, newright = newid.split('-')
        except ValueError:
            raise EngineCommandFailed('You must provide two parts when changing '
                'the interface ID on an inline interface, i.e. 1-2.')
        first, second = self.nicid.split('-')
        if '.' in first and '.' in second:
            firstvlan = first.split('.')[-1]
            secondvlan = second.split('.')[-1]
            self.update(nicid='{}.{}-{}.{}'.format(
                newleft, firstvlan, newright, secondvlan))
        else:
            # Top level interface or no VLANs
            self.update(nicid=newid)
def change_interface_id ( self , newid ) : try : newleft , newright = newid . split ( '-' ) except ValueError : raise EngineCommandFailed ( 'You must provide two parts when changing ' 'the interface ID on an inline interface, i.e. 1-2.' ) first , second = self . nicid . split ( '-' ) if '.' in first and '.' in second : firstvlan = first . split ( '.' ) [ - 1 ] secondvlan = second . split ( '.' ) [ - 1 ] self . update ( nicid = '{}.{}-{}.{}' . format ( newleft , firstvlan , newright , secondvlan ) ) else : self . update ( nicid = newid )
Change the inline interface ID. The current format is
        nicid='1-2', where '1' is the top level interface ID (first),
        and '2' is the second interface in the pair. Consider the existing
        nicid in case this is a VLAN.
        
        :param str newid: string defining new pair, i.e. '3-4'
        :return: None