当我订购具有指定前端和后端VLAN的VSI时,会出现异常。你知道吗
VLAN的place order段落标记为
order_template = {...
'virtualGuests': [{'primaryBackendNetworkComponent': {'networkVlan': {'id': 2058375}}, 'domain': 'xxx', 'hostname': 'xxx', 'primaryNetworkComponent': {'networkVlan': {'id': 1698647}}
...}
例外情况如下:
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Public): When specifying frontend and backend VLANs, they must be on the appropriate router pair. The specified backend VLAN is on router `bcr02a.hkg02`, so the specified frontend VLAN should be on router `fcr02a.hkg02`. However, the specified frontend VLAN is on router `fcr01a.hkg02`. Please specify a matching VLAN router pair.
我知道fcr01a
必须与bcr01a
匹配。你知道吗
#get vlan info
object_mask = 'mask[id,name,primarySubnetId,vlanNumber,networkSpace,primaryRouter[id,datacenter[id,name]]]'
account.getNetworkVlans(mask=object_mask)
结果:
vlans = [
{'primaryRouter': {'datacenter': {'id': 352494, 'name': 'hkg02'}, 'id': 212460}, 'primarySubnetId': 987829, 'vlanNumber': 1461, 'id': 1698651},...]
如何获取更多信息以检查前端和bakcend是否匹配VLAN路由器对?你知道吗
或者,在调用时如何设置掩码以获取fcr01a.hkg02account.getNetworkVLAN?你知道吗
或者,是否有其他vlan信息项来标识对关系?你知道吗
为了获得有关vlan对路由的更多信息,产品\u order::getVLAN将帮助您在订购过程中检索可用的私有和公共vlan,您可以使用作为值(352494)提供的locationId来缩小结果范围,别忘了这个值应该与placeOrder方法中使用的数据中心相匹配。例如,在python脚本中使用:
或者,您也可以使用Account::getNetworkVLAN查看以下url以获得更好的脚本 Ordering Softlayer Vlan pairs
您可以通过将属性“hostname”添加到掩码并使用对象筛选器搜索所需值来改进代码,您可以尝试对代码进行以下改进:
有关更多信息,请参见以下内容: https://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/getVlans
相关问题 更多 >
编程相关推荐