def allocate_fixed_ip(self, context, instance_id, network, **kwargs):
        # TODO(vish): when this is called by compute, we can associate compute
        #             with a network, or a cluster of computes with a network
        #             and use that network here with a method like
        #             network_get_by_compute_host
        address = None
        if network['cidr']:
            address = kwargs.get('address', None)
            if address:
                address = self.db.fixed_ip_associate(context,
                                                     address, instance_id,
                                                     network['id'])
            else:
                address = self.db.fixed_ip_associate_pool(context.elevated(),
                                                          network['id'],
                                                          instance_id)
            self._do_trigger_security_group_members_refresh_for_instance(
                                                                   instance_id)
            get_vif = self.db.virtual_interface_get_by_instance_and_network
            vif = get_vif(context, instance_id, network['id'])
            values = {'allocated': True,
                      'virtual_interface_id': vif['id']}
            self.db.fixed_ip_update(context, address, values)

        self._setup_network(context, network)
        return address
%prog frombed bed_file [--options] > gff_file
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/network/manager.py/NetworkManager.allocate_fixed_ip--crossover with--dataset/ETHPy150Open tanghaibao/jcvi/formats/gff.py/frombed