예제 #1
0
 def remove_from_compute(self, context, instance_id, volume_id, host):
     """Remove volume from specified compute host."""
     rpc.call(context,
              self.db.queue_get_for(context, FLAGS.compute_topic, host),
              {"method": "remove_volume_connection",
               "args": {'instance_id': instance_id,
                        'volume_id': volume_id}})
예제 #2
0
 def remove_from_compute(self, context, instance_id, volume_id, host):
     """Remove volume from specified compute host."""
     rpc.call(
         context, self.db.queue_get_for(context, FLAGS.compute_topic, host),
         {
             "method": "remove_volume_connection",
             "args": {
                 'instance_id': instance_id,
                 'volume_id': volume_id
             }
         })
예제 #3
0
 def get_pool_for_instance_host(self, context, instance_host):
     context = context.elevated()
     console_type = self.driver.console_type
     try:
         pool = self.db.console_pool_get_by_host_type(context,
                                                      instance_host,
                                                      self.host,
                                                      console_type)
     except exception.NotFound:
         #NOTE(mdragon): Right now, the only place this info exists is the
         #               compute worker's flagfile, at least for
         #               xenserver. Thus we ned to ask.
         if FLAGS.stub_compute:
             pool_info = {'address': '127.0.0.1',
                          'username': '******',
                          'password': '******'}
         else:
             pool_info = rpc.call(context,
                              self.db.queue_get_for(context,
                                                FLAGS.compute_topic,
                                                instance_host),
                    {'method': 'get_console_pool_info',
                     'args': {'console_type': console_type}})
         pool_info['password'] = self.driver.fix_pool_password(
                                                 pool_info['password'])
         pool_info['host'] = self.host
         pool_info['public_hostname'] = FLAGS.console_public_hostname
         pool_info['console_type'] = self.driver.console_type
         pool_info['compute_host'] = instance_host
         pool = self.db.console_pool_create(context, pool_info)
     return pool
예제 #4
0
 def get_pool_for_instance_host(self, context, instance_host):
     context = context.elevated()
     console_type = self.driver.console_type
     try:
         pool = self.db.console_pool_get_by_host_type(
             context, instance_host, self.host, console_type)
     except exception.NotFound:
         #NOTE(mdragon): Right now, the only place this info exists is the
         #               compute worker's flagfile, at least for
         #               xenserver. Thus we ned to ask.
         if FLAGS.stub_compute:
             pool_info = {
                 'address': '127.0.0.1',
                 'username': '******',
                 'password': '******'
             }
         else:
             pool_info = rpc.call(
                 context,
                 self.db.queue_get_for(context, FLAGS.compute_topic,
                                       instance_host),
                 {
                     'method': 'get_console_pool_info',
                     'args': {
                         'console_type': console_type
                     }
                 })
         pool_info['password'] = self.driver.fix_pool_password(
             pool_info['password'])
         pool_info['host'] = self.host
         pool_info['public_hostname'] = FLAGS.console_public_hostname
         pool_info['console_type'] = self.driver.console_type
         pool_info['compute_host'] = instance_host
         pool = self.db.console_pool_create(context, pool_info)
     return pool
예제 #5
0
 def get_pool_for_instance_host(self, context, instance_host):
     """Gets console pool info for the instance."""
     context = context.elevated()
     console_type = self.driver.console_type
     try:
         pool = self.db.console_pool_get_by_host_type(context,
                                                      instance_host,
                                                      self.host,
                                                      console_type)
     except exception.NotFound:
         pool_info = rpc.call(context,
                              self.db.queue_get_for(context,
                                                    FLAGS.compute_topic,
                                                    instance_host),
                              {'method': 'get_console_pool_info',
                               'args': {'console_type': console_type}})
         pool_info['password'] = self.driver.fix_pool_password(
                                                 pool_info['password'])
         pool_info['host'] = self.host
         # ESX Address or Proxy Address
         public_host_name = pool_info['address']
         if FLAGS.console_public_hostname:
             public_host_name = FLAGS.console_public_hostname
         pool_info['public_hostname'] = public_host_name
         pool_info['console_type'] = console_type
         pool_info['compute_host'] = instance_host
         pool = self.db.console_pool_create(context, pool_info)
     return pool
예제 #6
0
 def detach(self, context, volume_id):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(context, queue,
              {"method": "detach_volume",
               "args": {"volume_id": volume_id}})
예제 #7
0
 def get_instance_nw_info(self, context, instance):
     """Returns all network info related to an instance."""
     args = {
         'instance_id': instance['id'],
         'instance_uuid': instance['uuid'],
         'instance_type_id': instance['instance_type_id'],
         'host': instance['host']
     }
     try:
         return rpc.call(context, FLAGS.network_topic, {
             'method': 'get_instance_nw_info',
             'args': args
         })
     # FIXME(comstud) rpc calls raise RemoteError if the remote raises
     # an exception.  In the case here, because of a race condition,
     # it's possible the remote will raise a InstanceNotFound when
     # someone deletes the instance while this call is in progress.
     #
     # Unfortunately, we don't have access to the original exception
     # class now.. but we do have the exception class's name.  So,
     # we're checking it here and raising a new exception.
     #
     # Ultimately we need RPC to be able to serialize more things like
     # classes.
     except rpc_common.RemoteError as err:
         if err.exc_type == 'InstanceNotFound':
             raise exception.InstanceNotFound(instance_id=instance['id'])
         raise
예제 #8
0
 def get_dns_entries_by_name(self, context, name, zone):
     """Get entries for name and zone"""
     args = {'name': name, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_dns_entries_by_name',
         'args': args
     })
예제 #9
0
 def get_floating_ip(self, context, id):
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_floating_ip',
         'args': {
             'id': id
         }
     })
예제 #10
0
 def get_instance_nw_info(self, context, instance):
     """Returns all network info related to an instance."""
     args = {'instance_id': instance['id'],
             'instance_uuid': instance['uuid'],
             'instance_type_id': instance['instance_type_id'],
             'host': instance['host']}
     try:
         return rpc.call(context, FLAGS.network_topic,
                 {'method': 'get_instance_nw_info',
                 'args': args})
     # FIXME(comstud) rpc calls raise RemoteError if the remote raises
     # an exception.  In the case here, because of a race condition,
     # it's possible the remote will raise a InstanceNotFound when
     # someone deletes the instance while this call is in progress.
     #
     # Unfortunately, we don't have access to the original exception
     # class now.. but we do have the exception class's name.  So,
     # we're checking it here and raising a new exception.
     #
     # Ultimately we need RPC to be able to serialize more things like
     # classes.
     except rpc_common.RemoteError as err:
         if err.exc_type == 'InstanceNotFound':
             raise exception.InstanceNotFound(instance_id=instance['id'])
         raise
예제 #11
0
 def modify_dns_entry(self, context, name, address, dns_zone):
     """Create specified DNS entry for address"""
     args = {'address': address, 'dns_name': name, 'dns_zone': dns_zone}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'modify_dns_entry',
         'args': args
     })
예제 #12
0
 def get_floating_ip_by_address(self, context, address):
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_floating_ip_by_address',
         'args': {
             'address': address
         }
     })
예제 #13
0
 def get_dns_entries_by_address(self, context, address, zone):
     """Get entries for address and zone"""
     args = {'address': address, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_dns_entries_by_address',
         'args': args
     })
예제 #14
0
 def delete_dns_entry(self, context, name, zone):
     """Delete the specified dns entry."""
     args = {'dns_name': name, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'delete_dns_entry',
         'args': args
     })
예제 #15
0
 def get_vifs_by_instance(self, context, instance_id):
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_vifs_by_instance',
         'args': {
             'instance_id': instance_id
         }
     })
예제 #16
0
 def get_dns_zones(self, context):
     """Returns a list of available dns zones.
     These can be used to create DNS entries for floating ips.
     """
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_dns_zones'})
예제 #17
0
    def mounted_on_same_shared_storage(self, context, instance_ref, dest):
        """Check if the src and dest host mount same shared storage.

        At first, dest host creates temp file, and src host can see
        it if they mounts same shared storage. Then src host erase it.

        :param context: security context
        :param instance_ref: engine.db.sqlalchemy.models.Instance object
        :param dest: destination host

        """

        src = instance_ref['host']
        dst_t = db.queue_get_for(context, FLAGS.compute_topic, dest)
        src_t = db.queue_get_for(context, FLAGS.compute_topic, src)

        filename = None

        try:
            # create tmpfile at dest host
            filename = rpc.call(context, dst_t,
                                {"method": 'create_shared_storage_test_file'})

            # make sure existence at src host.
            ret = rpc.call(
                context, src_t, {
                    "method": 'check_shared_storage_test_file',
                    "args": {
                        'filename': filename
                    }
                })
            if not ret:
                raise exception.FileNotFound(file_path=filename)

        except exception.FileNotFound:
            raise

        finally:
            # Should only be None for tests?
            if filename is not None:
                rpc.call(
                    context, dst_t, {
                        "method": 'cleanup_shared_storage_test_file',
                        "args": {
                            'filename': filename
                        }
                    })
예제 #18
0
 def terminate_connection(self, context, volume_id, address):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(context, queue,
                     {"method": "terminate_connection",
                      "args": {"volume_id": volume_id,
                               "address": address}})
예제 #19
0
 def modify_dns_entry(self, context, name, address, dns_zone):
     """Create specified DNS entry for address"""
     args = {'address': address,
             'dns_name': name,
             'dns_zone': dns_zone}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'modify_dns_entry',
                      'args': args})
예제 #20
0
 def get_instance_uuids_by_ip_filter(self, context, filters):
     """Returns a list of dicts in the form of
     {'instance_uuid': uuid, 'ip': ip} that matched the ip_filter
     """
     args = {'filters': filters}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_instance_uuids_by_ip_filter',
                      'args': args})
예제 #21
0
 def validate_networks(self, context, requested_networks):
     """validate the networks passed at the time of creating
     the server
     """
     args = {'networks': requested_networks}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'validate_networks',
                      'args': args})
예제 #22
0
 def attach(self, context, volume_id, instance_id, mountpoint):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(context, queue,
                     {"method": "attach_volume",
                      "args": {"volume_id": volume_id,
                               "instance_id": instance_id,
                               "mountpoint": mountpoint}})
예제 #23
0
파일: api.py 프로젝트: wendy-king/x7_venv
 def _get_console_topic(self, context, instance_host):
     topic = self.db.queue_get_for(context, FLAGS.compute_topic,
                                   instance_host)
     return rpc.call(context, topic, {
         'method': 'get_console_topic',
         'args': {
             'fake': 1
         }
     })
예제 #24
0
 def validate_networks(self, context, requested_networks):
     """validate the networks passed at the time of creating
     the server
     """
     args = {'networks': requested_networks}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'validate_networks',
         'args': args
     })
예제 #25
0
 def get_instance_uuids_by_ip_filter(self, context, filters):
     """Returns a list of dicts in the form of
     {'instance_uuid': uuid, 'ip': ip} that matched the ip_filter
     """
     args = {'filters': filters}
     return rpc.call(context, FLAGS.network_topic, {
         'method': 'get_instance_uuids_by_ip_filter',
         'args': args
     })
예제 #26
0
    def get_token_info(self, token):
        if token in self.token_cache:
            return self.token_cache[token]

        rval = rpc.call(context.get_admin_context(),
                        FLAGS.vncproxy_topic,
                        {"method": "check_token", "args": {'token': token}})
        if rval:
            self.token_cache[token] = rval
        return rval
예제 #27
0
 def detach(self, context, volume_id):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(context, queue, {
         "method": "detach_volume",
         "args": {
             "volume_id": volume_id
         }
     })
예제 #28
0
 def allocate_floating_ip(self, context, pool=None):
     """Adds a floating ip to a project from a pool. (allocates)"""
     # NOTE(vish): We don't know which network host should get the ip
     #             when we allocate, so just send it to any one.  This
     #             will probably need to move into a network supervisor
     #             at some point.
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'allocate_floating_ip',
                      'args': {'project_id': context.project_id,
                               'pool': pool}})
예제 #29
0
 def terminate_connection(self, context, volume_id, address):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(
         context, queue, {
             "method": "terminate_connection",
             "args": {
                 "volume_id": volume_id,
                 "address": address
             }
         })
예제 #30
0
def _call_scheduler(method, context, params=None):
    """Generic handler for RPC calls to the scheduler.

    :param params: Optional dictionary of arguments to be passed to the
                   scheduler worker

    :retval: Result returned by scheduler worker
    """
    if not params:
        params = {}
    queue = FLAGS.scheduler_topic
    kwargs = {"method": method, "args": params}
    return rpc.call(context, queue, kwargs)
예제 #31
0
파일: auth.py 프로젝트: wendy-king/x7_venv
    def get_token_info(self, token):
        if token in self.token_cache:
            return self.token_cache[token]

        rval = rpc.call(context.get_admin_context(), FLAGS.vncproxy_topic, {
            "method": "check_token",
            "args": {
                'token': token
            }
        })
        if rval:
            self.token_cache[token] = rval
        return rval
예제 #32
0
def _call_scheduler(method, context, params=None):
    """Generic handler for RPC calls to the scheduler.

    :param params: Optional dictionary of arguments to be passed to the
                   scheduler worker

    :retval: Result returned by scheduler worker
    """
    if not params:
        params = {}
    queue = FLAGS.scheduler_topic
    kwargs = {'method': method, 'args': params}
    return rpc.call(context, queue, kwargs)
예제 #33
0
 def attach(self, context, volume_id, instance_id, mountpoint):
     volume = self.get(context, volume_id)
     host = volume['host']
     queue = self.db.queue_get_for(context, FLAGS.volume_topic, host)
     return rpc.call(
         context, queue, {
             "method": "attach_volume",
             "args": {
                 "volume_id": volume_id,
                 "instance_id": instance_id,
                 "mountpoint": mountpoint
             }
         })
예제 #34
0
    def mounted_on_same_shared_storage(self, context, instance_ref, dest):
        """Check if the src and dest host mount same shared storage.

        At first, dest host creates temp file, and src host can see
        it if they mounts same shared storage. Then src host erase it.

        :param context: security context
        :param instance_ref: engine.db.sqlalchemy.models.Instance object
        :param dest: destination host

        """

        src = instance_ref['host']
        dst_t = db.queue_get_for(context, FLAGS.compute_topic, dest)
        src_t = db.queue_get_for(context, FLAGS.compute_topic, src)

        filename = None

        try:
            # create tmpfile at dest host
            filename = rpc.call(context, dst_t,
                                {"method": 'create_shared_storage_test_file'})

            # make sure existence at src host.
            ret = rpc.call(context, src_t,
                          {"method": 'check_shared_storage_test_file',
                           "args": {'filename': filename}})
            if not ret:
                raise exception.FileNotFound(file_path=filename)

        except exception.FileNotFound:
            raise

        finally:
            # Should only be None for tests?
            if filename is not None:
                rpc.call(context, dst_t,
                         {"method": 'cleanup_shared_storage_test_file',
                          "args": {'filename': filename}})
예제 #35
0
 def allocate_floating_ip(self, context, pool=None):
     """Adds a floating ip to a project from a pool. (allocates)"""
     # NOTE(vish): We don't know which network host should get the ip
     #             when we allocate, so just send it to any one.  This
     #             will probably need to move into a network supervisor
     #             at some point.
     return rpc.call(
         context, FLAGS.network_topic, {
             'method': 'allocate_floating_ip',
             'args': {
                 'project_id': context.project_id,
                 'pool': pool
             }
         })
예제 #36
0
    def allocate_for_instance(self, context, instance, **kwargs):
        """Allocates all network structures for an instance.

        :returns: network info as from get_instance_nw_info() below
        """
        args = kwargs
        args['instance_id'] = instance['id']
        args['instance_uuid'] = instance['uuid']
        args['project_id'] = instance['project_id']
        args['host'] = instance['host']
        args['instance_type_id'] = instance['instance_type_id']

        return rpc.call(context, FLAGS.network_topic,
                        {'method': 'allocate_for_instance',
                         'args': args})
예제 #37
0
    def allocate_for_instance(self, context, instance, **kwargs):
        """Allocates all network structures for an instance.

        :returns: network info as from get_instance_nw_info() below
        """
        args = kwargs
        args['instance_id'] = instance['id']
        args['instance_uuid'] = instance['uuid']
        args['project_id'] = instance['project_id']
        args['host'] = instance['host']
        args['instance_type_id'] = instance['instance_type_id']

        return rpc.call(context, FLAGS.network_topic, {
            'method': 'allocate_for_instance',
            'args': args
        })
예제 #38
0
    def _live_migration_common_check(self, context, instance_ref, dest,
                                     block_migration):
        """Live migration common check routine.

        Below checkings are followed by
        http://wiki.libvirt.org/page/TodoPreMigrationChecks

        :param context: security context
        :param instance_ref: engine.db.sqlalchemy.models.Instance object
        :param dest: destination host
        :param block_migration if True, check for block_migration.

        """

        # Checking shared storage connectivity
        # if block migration, instances_paths should not be on shared storage.
        try:
            self.mounted_on_same_shared_storage(context, instance_ref, dest)
            if block_migration:
                reason = _("Block migration can not be used "
                           "with shared storage.")
                raise exception.InvalidSharedStorage(reason=reason, path=dest)
        except exception.FileNotFound:
            if not block_migration:
                src = instance_ref['host']
                ipath = FLAGS.instances_path
                LOG.error(_("Cannot confirm tmpfile at %(ipath)s is on "
                                "same shared storage between %(src)s "
                                "and %(dest)s.") % locals())
                raise

        # Checking dest exists.
        dservice_refs = db.service_get_all_compute_by_host(context, dest)
        dservice_ref = dservice_refs[0]['compute_node'][0]

        # Checking original host( where instance was launched at) exists.
        try:
            oservice_refs = db.service_get_all_compute_by_host(context,
                                           instance_ref['launched_on'])
        except exception.NotFound:
            raise exception.SourceHostUnavailable()
        oservice_ref = oservice_refs[0]['compute_node'][0]

        # Checking hypervisor is same.
        orig_hypervisor = oservice_ref['hypervisor_type']
        dest_hypervisor = dservice_ref['hypervisor_type']
        if orig_hypervisor != dest_hypervisor:
            raise exception.InvalidHypervisorType()

        # Checkng hypervisor version.
        orig_hypervisor = oservice_ref['hypervisor_version']
        dest_hypervisor = dservice_ref['hypervisor_version']
        if orig_hypervisor > dest_hypervisor:
            raise exception.DestinationHypervisorTooOld()

        # Checking cpuinfo.
        try:
            rpc.call(context,
                     db.queue_get_for(context, FLAGS.compute_topic, dest),
                     {"method": 'compare_cpu',
                      "args": {'cpu_info': oservice_ref['cpu_info']}})

        except rpc.RemoteError:
            src = instance_ref['host']
            LOG.exception(_("host %(dest)s is not compatible with "
                                "original host %(src)s.") % locals())
            raise
예제 #39
0
 def delete_dns_entry(self, context, name, zone):
     """Delete the specified dns entry."""
     args = {'dns_name': name, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'delete_dns_entry',
                      'args': args})
예제 #40
0
    def _live_migration_common_check(self, context, instance_ref, dest,
                                     block_migration):
        """Live migration common check routine.

        Below checkings are followed by
        http://wiki.libvirt.org/page/TodoPreMigrationChecks

        :param context: security context
        :param instance_ref: engine.db.sqlalchemy.models.Instance object
        :param dest: destination host
        :param block_migration if True, check for block_migration.

        """

        # Checking shared storage connectivity
        # if block migration, instances_paths should not be on shared storage.
        try:
            self.mounted_on_same_shared_storage(context, instance_ref, dest)
            if block_migration:
                reason = _("Block migration can not be used "
                           "with shared storage.")
                raise exception.InvalidSharedStorage(reason=reason, path=dest)
        except exception.FileNotFound:
            if not block_migration:
                src = instance_ref['host']
                ipath = FLAGS.instances_path
                LOG.error(
                    _("Cannot confirm tmpfile at %(ipath)s is on "
                      "same shared storage between %(src)s "
                      "and %(dest)s.") % locals())
                raise

        # Checking dest exists.
        dservice_refs = db.service_get_all_compute_by_host(context, dest)
        dservice_ref = dservice_refs[0]['compute_node'][0]

        # Checking original host( where instance was launched at) exists.
        try:
            oservice_refs = db.service_get_all_compute_by_host(
                context, instance_ref['launched_on'])
        except exception.NotFound:
            raise exception.SourceHostUnavailable()
        oservice_ref = oservice_refs[0]['compute_node'][0]

        # Checking hypervisor is same.
        orig_hypervisor = oservice_ref['hypervisor_type']
        dest_hypervisor = dservice_ref['hypervisor_type']
        if orig_hypervisor != dest_hypervisor:
            raise exception.InvalidHypervisorType()

        # Checkng hypervisor version.
        orig_hypervisor = oservice_ref['hypervisor_version']
        dest_hypervisor = dservice_ref['hypervisor_version']
        if orig_hypervisor > dest_hypervisor:
            raise exception.DestinationHypervisorTooOld()

        # Checking cpuinfo.
        try:
            rpc.call(
                context, db.queue_get_for(context, FLAGS.compute_topic, dest),
                {
                    "method": 'compare_cpu',
                    "args": {
                        'cpu_info': oservice_ref['cpu_info']
                    }
                })

        except rpc.RemoteError:
            src = instance_ref['host']
            LOG.exception(
                _("host %(dest)s is not compatible with "
                  "original host %(src)s.") % locals())
            raise
예제 #41
0
 def get_dns_entries_by_address(self, context, address, zone):
     """Get entries for address and zone"""
     args = {'address': address, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_dns_entries_by_address',
                      'args': args})
예제 #42
0
 def _get_console_topic(self, context, instance_host):
     topic = self.db.queue_get_for(context,
                                   FLAGS.compute_topic,
                                   instance_host)
     return rpc.call(context, topic, {'method': 'get_console_topic',
                                      'args': {'fake': 1}})
예제 #43
0
 def get_dns_entries_by_name(self, context, name, zone):
     """Get entries for name and zone"""
     args = {'name': name, 'dns_zone': zone}
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_dns_entries_by_name',
                      'args': args})
예제 #44
0
 def get_floating_ip(self, context, id):
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_floating_ip',
                      'args': {'id': id}})
예제 #45
0
 def get_floating_ip_pools(self, context):
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_floating_pools'})
예제 #46
0
 def get_floating_ips_by_project(self, context):
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_floating_ips_by_project'})
예제 #47
0
 def get_floating_ips_by_fixed_address(self, context, fixed_address):
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_floating_ips_by_fixed_address',
                      'args': {'fixed_address': fixed_address}})
예제 #48
0
 def get_vifs_by_instance(self, context, instance_id):
     return rpc.call(context,
                     FLAGS.network_topic,
                     {'method': 'get_vifs_by_instance',
                      'args': {'instance_id': instance_id}})
예제 #49
0
 def get_floating_ips_by_project(self, context):
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_floating_ips_by_project'})
예제 #50
0
 def get_dns_zones(self, context):
     """Returns a list of available dns zones.
     These can be used to create DNS entries for floating ips.
     """
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_dns_zones'})
예제 #51
0
 def get_floating_ip_pools(self, context):
     return rpc.call(context, FLAGS.network_topic,
                     {'method': 'get_floating_pools'})