• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python ec2utils.id_to_ec2_inst_id函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中nova.api.ec2.ec2utils.id_to_ec2_inst_id函数的典型用法代码示例。如果您正苦于以下问题:Python id_to_ec2_inst_id函数的具体用法?Python id_to_ec2_inst_id怎么用?Python id_to_ec2_inst_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了id_to_ec2_inst_id函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_get_ec2_ids

    def test_get_ec2_ids(self):
        expected = {
            'instance-id': 'ec2-inst-id',
            'ami-id': 'ec2-ami-id',
            'kernel-id': 'ami-kernel-ec2-kernelid',
            'ramdisk-id': 'ami-ramdisk-ec2-ramdiskid',
            }
        inst = {
            'uuid': 'fake-uuid',
            'kernel_id': 'ec2-kernelid',
            'ramdisk_id': 'ec2-ramdiskid',
            'image_ref': 'fake-image',
            }
        self.mox.StubOutWithMock(ec2utils, 'id_to_ec2_inst_id')
        self.mox.StubOutWithMock(ec2utils, 'glance_id_to_ec2_id')
        self.mox.StubOutWithMock(ec2utils, 'image_type')

        ec2utils.id_to_ec2_inst_id(inst['uuid']).AndReturn(
            expected['instance-id'])
        ec2utils.glance_id_to_ec2_id(self.context,
                                     inst['image_ref']).AndReturn(
            expected['ami-id'])
        for image_type in ['kernel', 'ramdisk']:
            image_id = inst['%s_id' % image_type]
            ec2utils.image_type(image_type).AndReturn('ami-' + image_type)
            ec2utils.glance_id_to_ec2_id(self.context, image_id,
                                         'ami-' + image_type).AndReturn(
                'ami-%s-ec2-%sid' % (image_type, image_type))

        self.mox.ReplayAll()
        result = self.conductor.get_ec2_ids(self.context, inst)
        self.assertEqual(result, expected)
开发者ID:gminator,项目名称:nova,代码行数:32,代码来源:test_conductor.py


示例2: test_get_ec2_ids

    def test_get_ec2_ids(self):
        expected = {
            "instance-id": "ec2-inst-id",
            "ami-id": "ec2-ami-id",
            "kernel-id": "ami-kernel-ec2-kernelid",
            "ramdisk-id": "ami-ramdisk-ec2-ramdiskid",
        }
        inst = {
            "uuid": "fake-uuid",
            "kernel_id": "ec2-kernelid",
            "ramdisk_id": "ec2-ramdiskid",
            "image_ref": "fake-image",
        }
        self.mox.StubOutWithMock(ec2utils, "id_to_ec2_inst_id")
        self.mox.StubOutWithMock(ec2utils, "glance_id_to_ec2_id")
        self.mox.StubOutWithMock(ec2utils, "image_type")

        ec2utils.id_to_ec2_inst_id(inst["uuid"]).AndReturn(expected["instance-id"])
        ec2utils.glance_id_to_ec2_id(self.context, inst["image_ref"]).AndReturn(expected["ami-id"])
        for image_type in ["kernel", "ramdisk"]:
            image_id = inst["%s_id" % image_type]
            ec2utils.image_type(image_type).AndReturn("ami-" + image_type)
            ec2utils.glance_id_to_ec2_id(self.context, image_id, "ami-" + image_type).AndReturn(
                "ami-%s-ec2-%sid" % (image_type, image_type)
            )

        self.mox.ReplayAll()
        result = self.conductor.get_ec2_ids(self.context, inst)
        self.assertEqual(result, expected)
开发者ID:tr3buchet,项目名称:nova,代码行数:29,代码来源:test_conductor.py


示例3: __init__

    def __init__(self, instance, address=None):
        self.instance = instance

        ctxt = context.get_admin_context()

        services = db.service_get_all_by_host(ctxt.elevated(), instance["host"])
        self.availability_zone = ec2utils.get_availability_zone_by_host(services, instance["host"])

        self.ip_info = ec2utils.get_ip_info_for_instance(ctxt, instance)

        self.security_groups = db.security_group_get_by_instance(ctxt, instance["id"])

        self.mappings = _format_instance_mapping(ctxt, instance)

        if instance.get("user_data", None) is not None:
            self.userdata_b64 = base64.b64decode(instance["user_data"])
        else:
            self.userdata_b64 = None

        self.ec2_ids = {}

        self.ec2_ids["instance-id"] = ec2utils.id_to_ec2_inst_id(instance["id"])
        self.ec2_ids["ami-id"] = ec2utils.glance_id_to_ec2_id(ctxt, instance["image_ref"])

        for image_type in ["kernel", "ramdisk"]:
            if self.instance.get("%s_id" % image_type):
                image_id = self.instance["%s_id" % image_type]
                ec2_image_type = ec2utils.image_type(image_type)
                ec2_id = ec2utils.glance_id_to_ec2_id(ctxt, image_id, ec2_image_type)
                self.ec2_ids["%s-id" % image_type] = ec2_id

        self.address = address
开发者ID:nati,项目名称:nova,代码行数:32,代码来源:base.py


示例4: __call__

 def __call__(self, req):
     context = req.environ["nova.context"]
     api_request = req.environ["ec2.request"]
     try:
         result = api_request.invoke(context)
     except exception.InstanceNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_inst_id(ex.kwargs["instance_id"])
         message = ex.msg_fmt % {"instance_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.VolumeNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_vol_id(ex.kwargs["volume_id"])
         message = ex.msg_fmt % {"volume_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.SnapshotNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_snap_id(ex.kwargs["snapshot_id"])
         message = ex.msg_fmt % {"snapshot_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except (
         exception.CannotDisassociateAutoAssignedFloatingIP,
         exception.FloatingIpAssociated,
         exception.FloatingIpNotFound,
         exception.FloatingIpBadRequest,
         exception.ImageNotActive,
         exception.InvalidInstanceIDMalformed,
         exception.InvalidVolumeIDMalformed,
         exception.InvalidKeypair,
         exception.InvalidParameterValue,
         exception.InvalidPortRange,
         exception.InvalidVolume,
         exception.KeyPairExists,
         exception.KeypairNotFound,
         exception.MissingParameter,
         exception.NoFloatingIpInterface,
         exception.NoMoreFixedIps,
         exception.Forbidden,
         exception.QuotaError,
         exception.SecurityGroupExists,
         exception.SecurityGroupLimitExceeded,
         exception.SecurityGroupRuleExists,
         exception.VolumeUnattached,
         # Following aren't translated to valid EC2 errors.
         exception.ImageNotFound,
         exception.ImageNotFoundEC2,
         exception.InvalidAttribute,
         exception.InvalidRequest,
         exception.NotFound,
     ) as ex:
         return ec2_error_ex(ex, req)
     except Exception as ex:
         return ec2_error_ex(ex, req, unexpected=True)
     else:
         resp = webob.Response()
         resp.status = 200
         resp.headers["Content-Type"] = "text/xml"
         resp.body = str(result)
         return resp
开发者ID:dido18,项目名称:nova,代码行数:56,代码来源:__init__.py


示例5: get_ec2_ids

    def get_ec2_ids(self, context, instance):
        ec2_ids = {}

        ec2_ids["instance-id"] = ec2utils.id_to_ec2_inst_id(instance["uuid"])
        ec2_ids["ami-id"] = ec2utils.glance_id_to_ec2_id(context, instance["image_ref"])
        for image_type in ["kernel", "ramdisk"]:
            image_id = instance.get("%s_id" % image_type)
            if image_id is not None:
                ec2_image_type = ec2utils.image_type(image_type)
                ec2_id = ec2utils.glance_id_to_ec2_id(context, image_id, ec2_image_type)
                ec2_ids["%s-id" % image_type] = ec2_id

        return ec2_ids
开发者ID:nash-x,项目名称:hws,代码行数:13,代码来源:manager.py


示例6: get_ec2_ids

    def get_ec2_ids(self, context, instance):
        ec2_ids = {}

        ec2_ids['instance-id'] = ec2utils.id_to_ec2_inst_id(instance['uuid'])
        ec2_ids['ami-id'] = ec2utils.glance_id_to_ec2_id(context,
                                                         instance['image_ref'])
        for image_type in ['kernel', 'ramdisk']:
            if '%s_id' % image_type in instance:
                image_id = instance['%s_id' % image_type]
                ec2_image_type = ec2utils.image_type(image_type)
                ec2_id = ec2utils.glance_id_to_ec2_id(context, image_id,
                                                      ec2_image_type)
                ec2_ids['%s-id' % image_type] = ec2_id

        return ec2_ids
开发者ID:k-i-t-e,项目名称:nova,代码行数:15,代码来源:manager.py


示例7: _get_ec2_ids

    def _get_ec2_ids(context, instance):
        ec2_ids = {}

        ec2_ids['instance_id'] = ec2utils.id_to_ec2_inst_id(instance.uuid)
        ec2_ids['ami_id'] = ec2utils.glance_id_to_ec2_id(context,
                                                         instance.image_ref)
        for image_type in ['kernel', 'ramdisk']:
            image_id = getattr(instance, '%s_id' % image_type)
            ec2_id = None
            if image_id is not None:
                ec2_image_type = ec2utils.image_type(image_type)
                ec2_id = ec2utils.glance_id_to_ec2_id(context, image_id,
                                                      ec2_image_type)
            ec2_ids['%s_id' % image_type] = ec2_id

        return ec2_ids
开发者ID:4everming,项目名称:nova,代码行数:16,代码来源:ec2.py


示例8: __call__

 def __call__(self, req):
     context = req.environ['nova.context']
     api_request = req.environ['ec2.request']
     result = None
     try:
         result = api_request.invoke(context)
     except exception.InstanceNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_inst_id(ex.kwargs['instance_id'])
         message = ex.msg_fmt % {'instance_id': ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.VolumeNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_vol_id(ex.kwargs['volume_id'])
         message = ex.msg_fmt % {'volume_id': ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.SnapshotNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_snap_id(ex.kwargs['snapshot_id'])
         message = ex.msg_fmt % {'snapshot_id': ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.KeyPairExists as ex:
         code = 'InvalidKeyPair.Duplicate'
         return ec2_error_ex(ex, req, code=code)
     except exception.InvalidKeypair as ex:
         code = 'InvalidKeyPair.Format'
         return ec2_error_ex(ex, req, code=code)
     except (exception.EC2APIError,
             exception.NotFound,
             exception.KeypairNotFound,
             exception.SecurityGroupExists,
             exception.InvalidParameterValue,
             exception.InvalidPortRange,
             exception.NotAuthorized,
             exception.InvalidRequest,
             exception.InvalidAttribute,
             exception.InvalidPortRange,
             exception.QuotaError,
             exception.MissingParameter,
             exception.InvalidInstanceIDMalformedEC2) as ex:
         return ec2_error_ex(ex, req)
     except Exception as ex:
         return ec2_error_ex(ex, req, unexpected=True)
     else:
         resp = webob.Response()
         resp.status = 200
         resp.headers['Content-Type'] = 'text/xml'
         resp.body = str(result)
         return resp
开发者ID:ainiaa,项目名称:nova,代码行数:46,代码来源:__init__.py


示例9: __call__

 def __call__(self, req):
     context = req.environ["nova.context"]
     api_request = req.environ["ec2.request"]
     result = None
     try:
         result = api_request.invoke(context)
     except exception.InstanceNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_inst_id(ex.kwargs["instance_id"])
         message = ex.msg_fmt % {"instance_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.VolumeNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_vol_id(ex.kwargs["volume_id"])
         message = ex.msg_fmt % {"volume_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.SnapshotNotFound as ex:
         ec2_id = ec2utils.id_to_ec2_snap_id(ex.kwargs["snapshot_id"])
         message = ex.msg_fmt % {"snapshot_id": ec2_id}
         return ec2_error_ex(ex, req, message=message)
     except exception.KeyPairExists as ex:
         code = "InvalidKeyPair.Duplicate"
         return ec2_error_ex(ex, req, code=code)
     except exception.InvalidKeypair as ex:
         code = "InvalidKeyPair.Format"
         return ec2_error_ex(ex, req, code=code)
     except (
         exception.EC2APIError,
         exception.NotFound,
         exception.InvalidParameterValue,
         exception.InvalidPortRange,
         exception.NotAuthorized,
         exception.InvalidRequest,
         exception.QuotaError,
         exception.InvalidInstanceIDMalformed,
     ) as ex:
         return ec2_error_ex(ex, req)
     except Exception as ex:
         return ec2_error_ex(ex, req, unexpected=True)
     else:
         resp = webob.Response()
         resp.status = 200
         resp.headers["Content-Type"] = "text/xml"
         resp.body = str(result)
         return resp
开发者ID:jziub,项目名称:nova,代码行数:43,代码来源:__init__.py


示例10: __call__

    def __call__(self, req):
        context = req.environ['nova.context']
        request_id = context.request_id
        api_request = req.environ['ec2.request']
        result = None
        try:
            result = api_request.invoke(context)
        except exception.InstanceNotFound as ex:
            LOG.info(_('InstanceNotFound raised: %s'), unicode(ex),
                     context=context)
            ec2_id = ec2utils.id_to_ec2_inst_id(ex.kwargs['instance_id'])
            message = ex.message % {'instance_id': ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.VolumeNotFound as ex:
            LOG.info(_('VolumeNotFound raised: %s'), unicode(ex),
                     context=context)
            ec2_id = ec2utils.id_to_ec2_vol_id(ex.kwargs['volume_id'])
            message = ex.message % {'volume_id': ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.SnapshotNotFound as ex:
            LOG.info(_('SnapshotNotFound raised: %s'), unicode(ex),
                     context=context)
            ec2_id = ec2utils.id_to_ec2_snap_id(ex.kwargs['snapshot_id'])
            message = ex.message % {'snapshot_id': ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.NotFound as ex:
            LOG.info(_('NotFound raised: %s'), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.EC2APIError as ex:
            LOG.exception(_('EC2APIError raised: %s'), unicode(ex),
                          context=context)
            if ex.code:
                return ec2_error(req, request_id, ex.code, unicode(ex))
            else:
                return ec2_error(req, request_id, type(ex).__name__,
                                   unicode(ex))
        except exception.KeyPairExists as ex:
            LOG.debug(_('KeyPairExists raised: %s'), unicode(ex),
                     context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidParameterValue as ex:
            LOG.debug(_('InvalidParameterValue raised: %s'), unicode(ex),
                     context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidPortRange as ex:
            LOG.debug(_('InvalidPortRange raised: %s'), unicode(ex),
                     context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.NotAuthorized as ex:
            LOG.info(_('NotAuthorized raised: %s'), unicode(ex),
                    context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidRequest as ex:
            LOG.debug(_('InvalidRequest raised: %s'), unicode(ex),
                     context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.QuotaError as ex:
            LOG.debug(_('QuotaError raised: %s'), unicode(ex),
                      context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidInstanceIDMalformed as ex:
            LOG.debug(_('Invalid id: bogus (expecting "i-..."): %s'),
                        unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except Exception as ex:
            env = req.environ.copy()
            for k in env.keys():
                if not isinstance(env[k], basestring):
                    env.pop(k)

            LOG.exception(_('Unexpected error raised: %s'), unicode(ex))
            LOG.error(_('Environment: %s') % jsonutils.dumps(env))
            return ec2_error(req, request_id, 'UnknownError',
                             _('An unknown error has occurred. '
                               'Please try your request again.'))
        else:
            resp = webob.Response()
            resp.status = 200
            resp.headers['Content-Type'] = 'text/xml'
            resp.body = str(result)
            return resp
开发者ID:isolosun,项目名称:nova,代码行数:81,代码来源:__init__.py


示例11: __init__

    def __init__(self, instance, address=None, content=[], extra_md=None):
        """Creation of this object should basically cover all time consuming
        collection.  Methods after that should not cause time delays due to
        network operations or lengthy cpu operations.

        The user should then get a single instance and make multiple method
        calls on it.
        """

        self.instance = instance
        self.extra_md = extra_md

        ctxt = context.get_admin_context()

        services = db.service_get_all_by_host(ctxt.elevated(),
                instance['host'])
        self.availability_zone = ec2utils.get_availability_zone_by_host(
                services, instance['host'])

        self.ip_info = ec2utils.get_ip_info_for_instance(ctxt, instance)

        self.security_groups = db.security_group_get_by_instance(ctxt,
                                                            instance['id'])

        self.mappings = _format_instance_mapping(ctxt, instance)

        if instance.get('user_data', None) is not None:
            self.userdata_raw = base64.b64decode(instance['user_data'])
        else:
            self.userdata_raw = None

        self.ec2_ids = {}

        self.ec2_ids['instance-id'] = ec2utils.id_to_ec2_inst_id(
                instance['id'])
        self.ec2_ids['ami-id'] = ec2utils.glance_id_to_ec2_id(ctxt,
            instance['image_ref'])

        for image_type in ['kernel', 'ramdisk']:
            if self.instance.get('%s_id' % image_type):
                image_id = self.instance['%s_id' % image_type]
                ec2_image_type = ec2utils.image_type(image_type)
                ec2_id = ec2utils.glance_id_to_ec2_id(ctxt, image_id,
                                                      ec2_image_type)
                self.ec2_ids['%s-id' % image_type] = ec2_id

        self.address = address

        # expose instance metadata.
        self.launch_metadata = {}
        for item in instance.get('metadata', []):
            self.launch_metadata[item['key']] = item['value']

        self.uuid = instance.get('uuid')

        self.content = {}
        self.files = []

        # get network info, and the rendered network template
        ctxt = context.get_admin_context()
        network_info = network.API().get_instance_nw_info(ctxt, instance)

        self.network_config = None
        cfg = netutils.get_injected_network_template(network_info)

        if cfg:
            key = "%04i" % len(self.content)
            self.content[key] = cfg
            self.network_config = {"name": "network_config",
                'content_path': "/%s/%s" % (CONTENT_DIR, key)}

        # 'content' is passed in from the configdrive code in
        # nova/virt/libvirt/driver.py.  Thats how we get the injected files
        # (personalities) in. AFAIK they're not stored in the db at all,
        # so are not available later (web service metadata time).
        for (path, contents) in content:
            key = "%04i" % len(self.content)
            self.files.append({'path': path,
                'content_path': "/%s/%s" % (CONTENT_DIR, key)})
            self.content[key] = contents
开发者ID:corystone,项目名称:nova,代码行数:80,代码来源:base.py


示例12: __call__

    def __call__(self, req):
        context = req.environ["nova.context"]
        request_id = context.request_id
        api_request = req.environ["ec2.request"]
        result = None
        try:
            result = api_request.invoke(context)
        except exception.InstanceNotFound as ex:
            LOG.info(_("InstanceNotFound raised: %s"), unicode(ex), context=context)
            ec2_id = ec2utils.id_to_ec2_inst_id(ex.kwargs["instance_id"])
            message = ex.message % {"instance_id": ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.VolumeNotFound as ex:
            LOG.info(_("VolumeNotFound raised: %s"), unicode(ex), context=context)
            ec2_id = ec2utils.id_to_ec2_vol_id(ex.kwargs["volume_id"])
            message = ex.message % {"volume_id": ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.SnapshotNotFound as ex:
            LOG.info(_("SnapshotNotFound raised: %s"), unicode(ex), context=context)
            ec2_id = ec2utils.id_to_ec2_snap_id(ex.kwargs["snapshot_id"])
            message = ex.message % {"snapshot_id": ec2_id}
            return ec2_error(req, request_id, type(ex).__name__, message)
        except exception.NotFound as ex:
            LOG.info(_("NotFound raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.EC2APIError as ex:
            if ex.code:
                return ec2_error(req, request_id, ex.code, unicode(ex))
            else:
                return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.KeyPairExists as ex:
            LOG.debug(_("KeyPairExists raised: %s"), unicode(ex), context=context)
            code = "InvalidKeyPair.Duplicate"
            return ec2_error(req, request_id, code, unicode(ex))
        except exception.InvalidKeypair as ex:
            LOG.debug(_("InvalidKeypair raised: %s"), unicode(ex), context)
            code = "InvalidKeyPair.Format"
            return ec2_error(req, request_id, code, unicode(ex))
        except exception.InvalidParameterValue as ex:
            LOG.debug(_("InvalidParameterValue raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidPortRange as ex:
            LOG.debug(_("InvalidPortRange raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.NotAuthorized as ex:
            LOG.info(_("NotAuthorized raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidRequest as ex:
            LOG.debug(_("InvalidRequest raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.QuotaError as ex:
            LOG.debug(_("QuotaError raised: %s"), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except exception.InvalidInstanceIDMalformed as ex:
            LOG.debug(_('Invalid id: bogus (expecting "i-..."): %s'), unicode(ex), context=context)
            return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
        except Exception as ex:
            env = req.environ.copy()
            for k in env.keys():
                if not isinstance(env[k], basestring):
                    env.pop(k)

            LOG.exception(_("Unexpected error raised: %s"), unicode(ex))
            LOG.error(_("Environment: %s") % jsonutils.dumps(env))
            return ec2_error(
                req, request_id, "UnknownError", _("An unknown error has occurred. " "Please try your request again.")
            )
        else:
            resp = webob.Response()
            resp.status = 200
            resp.headers["Content-Type"] = "text/xml"
            resp.body = str(result)
            return resp
开发者ID:JacobMulero,项目名称:nova,代码行数:73,代码来源:__init__.py



注:本文中的nova.api.ec2.ec2utils.id_to_ec2_inst_id函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python ec2utils.id_to_ec2_snap_id函数代码示例发布时间:2022-05-27
下一篇:
Python ec2utils.id_to_ec2_id函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap