0
背景
我可以流动的python脚本得到一个VLAN子网信息:Softlayer API:如何获取属于哪个VSI的静态子网?
# Declare an Object Mask to get additional information
object_mask = 'mask[primaryRouter,subnets[id,billingItem,cidr,version,addressSpace,subnetType,networkIdentifier,totalIpAddresses,usableIpAddressCount,ipAddresses[ipAddress, isReserved, virtualGuest, hardware]]]'
# Declare an Object Filter to get information from specific vlan
filter = {'networkVlans': {'id': {'operation': vlan_id}}}
return self.sl_account.getNetworkVlans(mask=object_mask, filter=filter)[0]
而且结果中包含:
[... 'subnets': [{'cidr': 28,
'id': 986245,
'billingItem': {'allowCancellationFlag': 1,}
orderItemId': 223126909,
'ipAddresses': [{'ipAddress': '169.38.73.xxx', ...
'subnetType': 'STATIC_IP_ROUTED',
'totalIpAddresses': '8',
'usableIpAddressCount': '5',
'version': 4},
...]
}
...
]]
问题
STATIC_IP_ROUTED子网的结果做不包含virtualGuest项目。
现在我想知道哪个VSI绑定了这个子网?其他面具可以帮助吗?
或者,如何获得vsi的辅助ip信息?