在特定子网上创建SoftLayer虚拟客户机

时间:2016-06-02 12:36:57

标签: ibm-cloud-infrastructure

最近我注意到SoftLayer UI已经更改,部分更改是在订购虚拟客户机时指定VLAN上的子网。

在指定primaryNetworkComponent和primaryBackendNetworkComponent参数以创建虚拟客户时,是否已在REST API json有效内容中实现此支持?

1 个答案:

答案 0 :(得分:2)

是的,目前可以设置子网,你应该定义" primarySubnet"在" networkVlan"内部财产,这里是一个休息的例子:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Order/placeOrder

Method: Post

{  
   "parameters":[  
      {  
         "orderContainers":[  
            {  
               "hardware":[  
                  {  
                     "hostname":"testhost",
                     "domain":"softlayer.com",
                     "primaryBackendNetworkComponent":  
                        {  
                           "networkVlanId":971077,
                           "networkVlan":{  
                              "primarySubnet":{  
                                 "id":225652
                              }
                           }
                        }
                     ,
                     "primaryNetworkComponent":  
                        {  
                           "networkVlanId":971075,
                           "networkVlan":{  
                              "primarySubnet":{  
                                 "id":233232
                              }
                           }
                        }

                  }
               ],
               "location":"DALLAS05",
               "quantity":1,
               "packageId":46,
               "prices":[  
                  {  
                     "id":1640
                  },
                  {  
                     "id":1644
                  },
                  {  
                     "id":1857
                  },
                  {  
                     "id":1639
                  },
                  {  
                     "id":50367
                  },
                  {  
                     "id":273
                  },
                  {  
                     "id":2302
                  },
                  {  
                     "id":55
                  },
                  {  
                     "id":58
                  },
                  {  
                     "id":420
                  },
                  {  
                     "id":418
                  },
                  {  
                     "id":21
                  },
                  {  
                     "id":57
                  },
                  {  
                     "id":905
                  }
               ]
            }
         ]
      }
   ]
}

替换: $ user $ apiKey 以及以下值: networkVlanId primarySubnet>> id ,包含您自己的信息