在特定子网上创建SoftLayer虚拟访客 [英] Create a SoftLayer virtual guest on a specific subnet

查看:41
本文介绍了在特定子网上创建SoftLayer虚拟访客的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我注意到SoftLayer UI发生了变化,部分变化是订购虚拟客户机时可以在VLAN上指定子网.

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.

在指定primaryNetworkComponent和primaryBackendNetworkComponent参数以创建虚拟来宾时,是否已在REST API json有效负载中实现了此支持?

Has this support been implemented in the REST API json payload when specifying primaryNetworkComponent and primaryBackendNetworkComponent parameters to create a virtual guest?

推荐答案

是的,当前可以设置子网,您应该在"networkVlan"属性内定义"primarySubnet",这里是一个Rest示例:

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

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

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

这篇关于在特定子网上创建SoftLayer虚拟访客的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆