使用objectFilter排除Vyatta

时间:2016-07-08 17:40:16

标签: ibm-cloud-infrastructure

我正在使用objectFilter来获取具有ACTIVE Public IP的所有硬件设备,但是想要排除所有Vyatta设备。我使用以下网址:

https://api.softlayer.com/rest/v3/SoftLayer_Account/getHardware?objectMask=mask[globalIdentifier,primaryIpAddress,networkManagementIpAddress,hardwareFunction,primaryBackendIpAddress,frontendNetworkComponents]&objectFilter={"hardware":{"frontendNetworkComponents":{"status":{"operation":"ACTIVE"}},"manufacturer":{"operation":"!=Vyatta"}}}

我仍然让Vyatta设备返回。如何排除Vyatta设备?

1 个答案:

答案 0 :(得分:0)

硬件对象包含一个名为“networkGatewayMemberFlag”的属性,此属性指示设备是否为网关(或Vyatta)服务器。

但我担心此属性不能用于过滤器。因此,您需要在对象掩码中添加该属性,一旦获得响应,您需要使用自己的代码来使用该属性过滤数据。

试试这个rquest:

GET https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getHardware?objectMask=mask[operatingSystem,networkGatewayMemberFlag,globalIdentifier,primaryIpAddress,networkManagementIpAddress,hardwareFunction,primaryBackendIpAddress,frontendNetworkComponents]&objectFilter={"hardware":{"frontendNetworkComponents":{"status":{"operation":"ACTIVE"}},"operatingSystem":{"softwareLicense":{"softwareDescription":{"manufacturer":{"operation":"!=Vyatta"}}}}}}

此致