Create a SoftLayer virtual guest on a specific subnet

前端 未结 1 2052
遇见更好的自我
遇见更好的自我 2020-12-22 13:29

Recently I noticed the SoftLayer UI has changed and part of that change was the ability to specify a subnet on a VLAN when ordering a virtual guest.

Has this suppor

相关标签:
1条回答
  • 2020-12-22 13:45

    Yes, Currently It's possible to set the subnets, you should define "primarySubnet" inside of "networkVlan" property, here a Rest example:

    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
                      }
                   ]
                }
             ]
          }
       ]
    }
    

    Replace: $user, $apiKey and the values for: networkVlanId and primarySubnet >> id with your own information

    0 讨论(0)
提交回复
热议问题