首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Softlayer Python API无法订购具有1 Gbps网络速度的虚拟机

Softlayer Python API无法订购具有1 Gbps网络速度的虚拟机
EN

Stack Overflow用户
提问于 2018-01-10 06:50:38
回答 1查看 157关注 0票数 1

尝试使用Softlayer Python API订购虚拟机时出现此异常。

代码语言:javascript
复制
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Public): 1 Gbps Public & Private Network Uplinks must be ordered with permission Add Compute with Public Network Port.

以下是VSI:

代码语言:javascript
复制
client = SoftLayer.Client(username=softlayerusername, api_key=softlayerapikey)
manager = SoftLayer.VSManager(client)
new_vsi = {
        'domain': domain,
        'hostname': hostname + str(n),
        'datacenter': datacenter,
        'dedicated': False,
        'private': False,
        'cpus': number_of_cpus,
        'os_code' : u'UBUNTU_LATEST_64', 
        'hourly': is_hourly_billed,
        'disks': ['100','25'],
        'local_disk': True,
        'memory': 16384,
        'private_vlan': privatevlan,
        'public_vlan': publicvlan,
        'nic_speed':1000
    }
vsi = manager.create_instance(**new_vsi)

我可以看到这个错误与nic_speed被设置为1000有关,但是我不知道"ordered with permission ...“是什么意思。以及如何做到这一点。这是在专用Softlayer帐户上,并且VLAN上还有其他网络速度大于1 Gbps的计算机

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-10 21:20:09

该错误似乎是因为您的帐户不允许新虚拟机使用公共网络端口,因此我建议您将值'private': False更改为'private': True,然后重试

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48177801

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档