Did I find the right examples for you? yes no

All Samples(443)  |  Call(443)  |  Derive(0)  |  Import(0)

src/n/o/nova-HEAD/nova/conductor/manager.py   nova(Download)
    def ping(self, context, arg):
        # NOTE(russellb) This method can be removed in 2.0 of this API.  It is
        # now a part of the base rpc API.
        return jsonutils.to_primitive({'service': 'conductor', 'arg': arg})
 
            context, instance_uuid, updates)
        notifications.send_update(context, old_ref, instance_ref, service)
        return jsonutils.to_primitive(instance_ref)
 
    # NOTE(russellb): This method is now deprecated and can be removed in
    # version 2.0 of the RPC API
    @messaging.expected_exceptions(exception.InstanceNotFound)
    def instance_get(self, context, instance_id):
        return jsonutils.to_primitive(
            self.db.instance_get(context, instance_id))
    def instance_get_by_uuid(self, context, instance_uuid,
                             columns_to_join=None):
        return jsonutils.to_primitive(
            self.db.instance_get_by_uuid(context, instance_uuid,
                columns_to_join))
 
    # NOTE(hanlind): This method can be removed in v2.0 of the RPC API.
    def instance_get_all(self, context):
        return jsonutils.to_primitive(self.db.instance_get_all(context))

src/n/o/nova-gce-HEAD/nova/openstack/common/notifier/api.py   nova-gce(Download)
 
    # Ensure everything is JSON serializable.
    payload = jsonutils.to_primitive(payload, convert_instances=True)
 
    msg = dict(message_id=str(uuid.uuid4()),

src/n/o/nova-HEAD/nova/rpc.py   nova(Download)
    def serialize_entity(context, entity):
        return jsonutils.to_primitive(entity, convert_instances=True)
 
 
class RequestContextSerializer(messaging.Serializer):

src/h/e/healthnmon-HEAD/healthnmon/notifier/api.py   healthnmon(Download)
    # Ensure everything is JSON serializable.
 
    payload = jsonutils.to_primitive(payload, convert_instances=True)
 
    msg = dict(

src/n/o/nova-gce-HEAD/nova/compute/rpcapi.py   nova-gce(Download)
    def add_fixed_ip_to_instance(self, ctxt, instance, network_id):
        instance_p = jsonutils.to_primitive(instance)
        self.cast(ctxt, self.make_msg('add_fixed_ip_to_instance',
                instance=instance_p, network_id=network_id),
                topic=_compute_topic(self.topic, ctxt, None, instance))
 
    def attach_volume(self, ctxt, instance, volume_id, mountpoint):
        instance_p = jsonutils.to_primitive(instance)
    def change_instance_metadata(self, ctxt, instance, diff):
        instance_p = jsonutils.to_primitive(instance)
        self.cast(ctxt, self.make_msg('change_instance_metadata',
                  instance=instance_p, diff=diff),
                  topic=_compute_topic(self.topic, ctxt, None, instance))
 
    def check_can_live_migrate_destination(self, ctxt, instance, destination,
                                           block_migration, disk_over_commit):
        instance_p = jsonutils.to_primitive(instance)
    def check_can_live_migrate_source(self, ctxt, instance, dest_check_data):
        instance_p = jsonutils.to_primitive(instance)
        self.call(ctxt, self.make_msg('check_can_live_migrate_source',
                           instance=instance_p,
                           dest_check_data=dest_check_data),

src/n/o/nova-HEAD/nova/compute/rpcapi.py   nova(Download)
            # NOTE(russellb) Havana compat
            version = '2.14'
            aggregate = jsonutils.to_primitive(aggregate)
 
        cctxt = self.client.prepare(server=host, version=version)
            # NOTE(russellb) Havana compat
            version = self._get_compat_version('3.0', '2.0')
            instance = jsonutils.to_primitive(instance)
        cctxt = self.client.prepare(server=_compute_host(None, instance),
                version=version)
        else:
            version = self._get_compat_version('3.0', '2.25')
            instance = jsonutils.to_primitive(instance)
        cctxt = self.client.prepare(server=_compute_host(None, instance),
                version=version)
            version = self._get_compat_version('3.0', '2.0')
            kw['instance'] = jsonutils.to_primitive(
                    objects_base.obj_to_primitive(instance))
            del kw['bdm']
        cctxt = self.client.prepare(server=_compute_host(None, instance),
            # NOTE(russellb) Havana compat
            version = self._get_compat_version('3.0', '2.0')
            instance = jsonutils.to_primitive(instance)
        cctxt = self.client.prepare(server=_compute_host(None, instance),
                version=version)

src/n/o/nova-HEAD/nova/cells/messaging.py   nova(Download)
                                             host=host,
                                             state=state)
        return jsonutils.to_primitive(task_logs)
 
 
    def service_get_by_compute_host(self, message, host_name):
        """Return the service entry for a compute host."""
        service = self.db.service_get_by_compute_host(message.ctxt,
                                                      host_name)
        return jsonutils.to_primitive(service)
        """
        return jsonutils.to_primitive(
            self.host_api.service_update(message.ctxt, host_name, binary,
                                         params_to_update))
 
    def compute_node_get(self, message, compute_id):
        """Get compute node by ID."""
        compute_node = self.db.compute_node_get(message.ctxt,
                                                compute_id)
        return jsonutils.to_primitive(compute_node)
 
    def actions_get(self, message, instance_uuid):
        actions = self.db.actions_get(message.ctxt, instance_uuid)
        return jsonutils.to_primitive(actions)

src/n/o/nova-HEAD/nova/conductor/rpcapi.py   nova(Download)
    def instance_update(self, context, instance_uuid, updates,
                        service=None):
        updates_p = jsonutils.to_primitive(updates)
        cctxt = self.client.prepare()
        return cctxt.call(context, 'instance_update',
    def block_device_mapping_get_all_by_instance(self, context, instance,
                                                 legacy=True):
        instance_p = jsonutils.to_primitive(instance)
        cctxt = self.client.prepare()
        return cctxt.call(context, 'block_device_mapping_get_all_by_instance',
                          instance=instance_p, legacy=legacy)
 
    def instance_info_cache_delete(self, context, instance):
        instance_p = jsonutils.to_primitive(instance)
    def vol_get_usage_by_time(self, context, start_time):
        start_time_p = jsonutils.to_primitive(start_time)
        cctxt = self.client.prepare()
        return cctxt.call(context, 'vol_get_usage_by_time',
                          start_time=start_time_p)
 
    def vol_usage_update(self, context, vol_id, rd_req, rd_bytes, wr_req,
                         wr_bytes, instance, last_refreshed=None,
                         update_totals=False):
        instance_p = jsonutils.to_primitive(instance)

src/n/o/nova-HEAD/nova/cells/rpcapi.py   nova(Download)
    def build_instances(self, ctxt, **kwargs):
        """Build instances."""
        build_inst_kwargs = kwargs
        instances = build_inst_kwargs['instances']
        instances_p = [jsonutils.to_primitive(inst) for inst in instances]
        build_inst_kwargs['instances'] = instances_p
        build_inst_kwargs['image'] = jsonutils.to_primitive(
                build_inst_kwargs['image'])
            return
        # Make sure we have a dict, not a SQLAlchemy model
        instance_p = jsonutils.to_primitive(instance)
        self.client.cast(ctxt, 'instance_update_at_top', instance=instance_p)
 
    def instance_destroy_at_top(self, ctxt, instance):
        """Destroy instance at API level."""
        if not CONF.cells.enable:
            return
        instance_p = jsonutils.to_primitive(instance)
        else:
            version = '1.0'
            instance = jsonutils.to_primitive(instance)
        cctxt = self.client.prepare(version=version)
        cctxt.cast(ctxt, 'instance_delete_everywhere', instance=instance,

src/n/o/nova-HEAD/nova/scheduler/rpcapi.py   nova(Download)
    def prep_resize(self, ctxt, instance, instance_type, image,
            request_spec, filter_properties, reservations):
        instance_p = jsonutils.to_primitive(instance)
        instance_type_p = jsonutils.to_primitive(instance_type)
        reservations_p = jsonutils.to_primitive(reservations)
        image_p = jsonutils.to_primitive(image)

  1 | 2 | 3 | 4  Next