尝试使用Softlayer Python API订购虚拟机时出现此异常。
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:
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的计算机
发布于 2018-01-10 21:20:09
该错误似乎是因为您的帐户不允许新虚拟机使用公共网络端口,因此我建议您将值'private': False更改为'private': True,然后重试
https://stackoverflow.com/questions/48177801
复制相似问题