Did I find the right examples for you? yes no

All Samples(360)  |  Call(360)  |  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)
 
            # NOTE(vish): allow non-quoted replacements to survive json
            data = re.sub(r'([^"])%\((.+)\)s([^"])', r'\1"%(int:\2)s"\3', data)
            return jsonutils.loads(data)
        else:
            def to_dict(node):

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)
 
    def _objectify(self, data):
        if not data:
            return {}
        if self.ctype == 'json':
            return jsonutils.loads(data)

src/n/o/nova-HEAD/nova/tests/integrated/test_api_samples.py   nova(Download)
    def _get_extensions(self):
        extensions = []
        response = self._do_get('extensions')
        for extension in jsonutils.loads(response.read())['extensions']:
            extensions.append(str(extension['alias']))

src/n/o/nova-HEAD/nova/virt/libvirt/driver.py   nova(Download)
        is_volume_backed = dest_check_data.get('is_volume_backed', False)
        has_local_disks = bool(
                jsonutils.loads(self.get_instance_disk_info(instance['name'])))
 
        shared = self._check_shared_storage_test_file(filename)
 
        ret = self.get_instance_disk_info(instance['name'])
        disk_infos = jsonutils.loads(ret)
 
        necessary = 0
            return 1
 
        info = jsonutils.loads(cpu_info)
        LOG.info(_('Instance launched has CPU info:\n%s') % cpu_info)
        cpu = vconfig.LibvirtConfigCPU()
            disk_info = []
        else:
            disk_info = jsonutils.loads(disk_info_json)
 
        for info in disk_info:
            try:
                disk_infos = jsonutils.loads(
                        self.get_instance_disk_info(i_name))
                for info in disk_infos:
                    disk_over_committed_size += int(

src/n/o/nova-HEAD/nova/cells/messaging.py   nova(Download)
        another cell.
        """
        message_dict = jsonutils.loads(json_message)
        # Need to convert context back.
        ctxt = message_dict['ctxt']
    def from_json(cls, json_message):
        _dict = jsonutils.loads(json_message)
        if _dict['failure']:
            resp_value = deserialize_remote_exception(_dict['value'],
                                                      rpc.get_allowed_exmods())
def deserialize_remote_exception(data, allowed_remote_exmods):
    failure = jsonutils.loads(str(data))
 
    trace = failure.get('tb', [])
    message = failure.get('message', "") + "\n" + "\n".join(trace)

src/n/o/nova-HEAD/nova/openstack/common/report/views/json/generic.py   nova(Download)
        for key, valstr in model.items():
            if getattr(valstr, '__is_json__', False):
                cpy[key] = json.loads(valstr)
 
        res = utils.StringWithAttrs(json.dumps(cpy.data))

src/n/o/nova-HEAD/nova/consoleauth/manager.py   nova(Download)
            tokens = []
        else:
            tokens = jsonutils.loads(tokens_str)
        return tokens
 
                  {'token': token, 'token_valid': token_valid})
        if token_valid:
            token = jsonutils.loads(token_str)
            if self._validate_token(context, token):
                return token

src/n/o/nova-HEAD/nova/pci/pci_request.py   nova(Download)
    try:
        for jsonspecs in jaliases:
            spec = jsonutils.loads(jsonspecs)
            jsonschema.validate(spec, _ALIAS_SCHEMA)
            name = spec.pop("name")
    if not pci_requests:
        return []
    return jsonutils.loads(pci_requests)
 
 

src/n/o/nova-HEAD/nova/api/ec2/__init__.py   nova(Download)
            return faults.ec2_error_response(request_id, "AuthFailure", msg,
                                             status=response.status)
        result = jsonutils.loads(data)
        conn.close()
 

src/n/o/nova-HEAD/nova/virt/xenapi/firewall.py   nova(Download)
        args['cmd_args'] = jsonutils.dumps(cmd)
        ret = self._session.call_plugin('xenhost', 'iptables_config', args)
        json_ret = jsonutils.loads(ret)
        return (json_ret['out'], json_ret['err'])
 

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