将Softlayer中的vlan与java

时间:2016-04-22 10:46:16

标签: ibm-cloud-infrastructure

我在购买Vyatta后正在实施Associate a Vlan。 应该使用什么Softlayer API来实现它?如果您提供示例Java代码或API指南,将不胜感激。

谢谢

reference image

1 个答案:

答案 0 :(得分:0)

此方法可以帮助您将VLAN与网关关联:

SoftLayer_Network_Gateway_Vlan::createObject

以下是Rest示例:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Gateway_Vlan/createObject

Method: POST

Json payload:

{
  "parameters": [
    {
      "bypassFlag": false,
      "networkGatewayId": 172323,
      "networkVlanId": 561712
    }
  ]
}

此外,要获取可在此网关上的VLAN内的所有VLAN,请参阅:

SoftLayer_Network_Gateway::getPossibleInsideVlans

示例:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Gateway/[gateway_id]/getPossibleInsideVlans?objectMask=mask[primaryRouter]
Method: GET

我希望它可以帮到你