无法通过Softlayer Rest Api查看Softlayer中的多Vlan防火墙列表

时间:2018-03-12 09:03:58

标签: ibm-cloud-infrastructure

您好我正在尝试使用softlayer rest api列出我帐户中存在的Multi-Vlan-Firewall。在softlayer ui我可以看到Multi-Vlan-Firewall的列表但是我看不到使用softlayer rest api的相同的东西。其余的api我尝试用来查看列表是

https://api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkVlans?objectMask=mask[id,name,vlanNumber,networkSpace,note,primaryRouter[id,hostname,datacenter[id,name,longName]],networkVlanFirewall[id,fullyQualifiedDomainName],attachedNetworkGateway[id,name],attachedNetworkGatewayVlan[bypassFlag],billingItem[id,cancellationDate],type,firewallNetworkComponentCount,firewallGuestNetworkComponentCount]

发回的所有细节都属于单vlan防火墙。我甚至试图使用slcli(Softlayer命令行界面)在我的帐户中查看Multi-vlan-Firewalls列表。我得到了防火墙列表,但它们都是单个防火墙。我错过了什么吗?谁能告诉我哪个api用于列出Softlayer中的多个vlan-Firewalls。我甚至试图在chrome的检查模式中看到什么api是用于获取Multi-Vlan-Firewall列表的Softlayer UI?我有这样的事情https://control.softlayer.com/security/firewalls/getmultivlanlist。这是其余的api Softlayer UI用于获取Multi-Vlan-Firewall列表。为了响应这一点,我得到了防火墙列表

{name: "Checkdelete1", id: 13573, firewallType: "FortiGate Security Appliance",…}
associatedVlan
:
"0 VLANs"
configuration
:
"HA"
firewallType
:
"FortiGate Security Appliance"
id
:
13573
location
:
"dal13.pod01"
name
:
"Checkdelete1"
status
:
"Active"

我尝试将此id与我之前用来获取防火墙列表的其余api相关联。我无法在该响应中的任何地方找到此ID。因此我得出结论,也许我使用错误的api来获取Multi-Vlan-Firewalls列表,或者softlayer不响应该列表中的Multi-Vlan-Firewalls。

1 个答案:

答案 0 :(得分:0)

这是请求:

GET https://api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkGateways?objectMask=mask[id,name,networkFirewall[id,customerManagedFlag,datacenter.name],publicIpAddress.ipAddress,publicVlan[id,primaryRouter.hostname],privateIpAddress.ipAddress,insideVlans[id],memberCount,status.keyName]

但控制门户过滤上面请求提取的数据,您只需要考虑具有" NetworkFirewall"属性,例如

{
        "id": 1111,
        "name": "Provisioning",
        "memberCount": 1,
        "insideVlans": [],
        "networkFirewall": {
            "customerManagedFlag": true,
            "id": 11222,
            "datacenter": {
                "name": "dal10"
            }
        },
        "privateIpAddress": {
            "ipAddress": "10.11.11.111"
        },
        "publicIpAddress": {
            "ipAddress": "169.22.22.2222"
        },
        "publicVlan": {
            "id": 11111,
            "primaryRouter": {
                "hostname": "fcr01a.dal10"
            }
        },
        "status": {
            "keyName": "UPDATING"
        }
    },