'Adds a fixed IP to an instance from specified network.'

def add_fixed_ip_to_instance(self, context, instance_id, host, network_id, rxtx_factor=None):

    if uuidutils.is_uuid_like(network_id):
        network = self.get_network(context, network_id)
    else:
        network = self._get_network_by_id(context, network_id)
    LOG.debug('Add    fixed    IP    on    network    %s', network['uuid'], instance_uuid=instance_id)
    self._allocate_fixed_ips(context, instance_id, host, [network])
    return self.get_instance_nw_info(context, instance_id, rxtx_factor, host)
