'Set the specified MAC address for the interface
:param self: A NetworkManager object
:param interface_name: Name of an interface
:param mac_address: A MAC address
:type self: NetworkManager
:type interface_name: str
:type mac_address: str
:return: None
:rtype: None
.. note: This method will set the interface to managed mode'

def set_interface_mac(self, interface_name, mac_address):

    card = self._name_to_object[interface_name].card
    self.set_interface_mode(interface_name, 'managed')
    try:
        pyw.down(card)
        pyw.macset(card, mac_address)
        pyw.up(card)
    except pyric.error as error:
        if (error[0] == 22):
            raise InvalidMacAddressError(mac_address)
        else:
            raise
