Did I find the right examples for you? yes no

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

src/n/o/nova-HEAD/nova/tests/integrated/api_samples_test_base.py   nova(Download)
    def _pretty_data(self, data):
        if self.ctype == 'json':
            data = jsonutils.dumps(jsonutils.loads(data), sort_keys=True,
                    indent=4)
 

src/n/o/nova-gce-HEAD/nova/tests/integrated/test_api_samples.py   nova-gce(Download)
    def _pretty_data(self, data):
        if self.ctype == 'json':
            data = jsonutils.dumps(jsonutils.loads(data), sort_keys=True,
                    indent=4)
 

src/n/o/nova-gce-HEAD/nova/api/gce/wsgi.py   nova-gce(Download)
        if pretty_print:
            ident = 4
        ret = jsonutils.dumps(data,
                default=jsonutils.to_primitive, indent=ident)
        return ret

src/n/o/nova-gce-HEAD/nova/openstack/common/rpc/impl_zmq.py   nova-gce(Download)
    """
    try:
        return str(jsonutils.dumps(data, ensure_ascii=True))
    except TypeError:
        LOG.error(_("JSON serialization failed."))

src/n/o/nova-HEAD/nova/openstack/common/policy.py   nova(Download)
 
        # Dump a pretty-printed JSON representation
        return jsonutils.dumps(out_rules, indent=4)
 
 
 
        url = ('http:' + self.match) % target
        data = {'target': jsonutils.dumps(target),
                'credentials': jsonutils.dumps(creds)}
        post_data = urllib.urlencode(data)

src/n/o/nova-HEAD/nova/compute/resource_tracker.py   nova(Download)
                                                              sign=-1)
                self._update_usage(self.compute_node, itype, sign=-1)
                self.compute_node['stats'] = jsonutils.dumps(self.stats)
 
                ctxt = context.get_admin_context()
        if self.pci_tracker:
            self.pci_tracker.clean_usage(instances, migrations, orphans)
            resources['pci_stats'] = jsonutils.dumps(self.pci_tracker.stats)
        else:
            resources['pci_stats'] = jsonutils.dumps([])
 
        self._report_final_resource_view(resources)
 
        metrics = self._get_host_metrics(context, self.nodename)
        resources['metrics'] = jsonutils.dumps(metrics)
                self.pci_tracker.update_pci_for_migration(instance)
            self._update_usage(resources, itype)
            resources['stats'] = jsonutils.dumps(self.stats)
            if self.pci_tracker:
                resources['pci_stats'] = jsonutils.dumps(

src/n/o/nova-HEAD/nova/virt/libvirt/driver.py   nova(Download)
        # the libvirt drivers format which suggests this
        # data format needs to be standardized across drivers
        return jsonutils.dumps(cpu_info)
 
    def _get_pcidev_info(self, devname):
        # repeated warnings within a periodic task
        if not getattr(self, '_list_devices_supported', True):
            return jsonutils.dumps([])
 
        try:
                             "listDevices: " "%(error)s"),
                             {'uri': self.uri(), 'error': ex})
                return jsonutils.dumps([])
            else:
                raise
                pci_info.append(pci_dev)
 
        return jsonutils.dumps(pci_info)
 
    def get_all_volume_usage(self, context, compute_host_bdms):
        stats = self.get_host_stats(refresh=True)
        stats['supported_instances'] = jsonutils.dumps(
                stats['supported_instances'])
        return stats
 

src/n/o/nova-HEAD/nova/conductor/manager.py   nova(Download)
            # JSON, which the lower layers now expect. This can be removed
            # in version 2.0 of the RPC API
            values['stats'] = jsonutils.dumps(values['stats'])
 
        result = self.db.compute_node_update(context, node['id'], values)

src/n/o/nova-HEAD/nova/cells/messaging.py   nova(Download)
        for k, v in method_kwargs.items():
            method_kwargs[k] = self.serializer.serialize_entity(self.ctxt, v)
        return jsonutils.dumps(_dict)
 
    def source_is_us(self):
                 'value': resp_value,
                 'failure': self.failure}
        return jsonutils.dumps(_dict)
 
    @classmethod
    }
 
    json_data = jsonutils.dumps(data)
 
    return json_data

src/n/o/nova-HEAD/nova/consoleauth/manager.py   nova(Download)
                      'internal_access_path': internal_access_path,
                      'last_activity_at': time.time()}
        data = jsonutils.dumps(token_dict)
        self.mc.set(token.encode('UTF-8'), data, CONF.console_token_ttl)
        tokens = self._get_tokens_for_instance(instance_uuid)
        tokens.append(token)
        self.mc.set(instance_uuid.encode('UTF-8'),
                    jsonutils.dumps(tokens))
 
        LOG.audit(_("Received Token: %(token)s, %(token_dict)s"),

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next