'Set mac address on interface.
@param: str address (mac address)
@param: str interface (interface name)
@returns: True or CX'

def set_mac_address(self, address, interface):

    address = validate.mac_address(address)
    if (address == 'random'):
        address = utils.get_random_mac(self.collection_mgr.api)
    if ((address != '') and (utils.input_boolean(self.collection_mgr._settings.allow_duplicate_macs) is False)):
        matched = self.collection_mgr.api.find_items('system', {'mac_address': address})
        for x in matched:
            if (x.name != self.name):
                raise CX(('MAC    address    duplicated:    %s' % address))
    intf = self.__get_interface(interface)
    intf['mac_address'] = address
