@utils.synchronized('get_dhcp')
    def _get_dhcp_ip(self, context, network_ref, host=None):
        # NOTE(vish): this is for compatibility
        if not network_ref['multi_host']:
            return network_ref['gateway']

        if not host:
            host = self.host
        network_id = network_ref['id']
        try:
            fip = self.db.fixed_ip_get_by_network_host(context,
                                                       network_id,
                                                       host)
            return fip['address']
        except exception.FixedIpNotFoundForNetworkHost:
            elevated = context.elevated()
            return self.db.fixed_ip_associate_pool(elevated,
                                                   network_id,
                                                   host=host)
Constructor for Rights
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/network/manager.py/NetworkManager._get_dhcp_ip--crossover with--dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/atom/__init__.py/Rights.__init__