SoftLayer API Hardware : How to order Bare Metal Server without OS using REST API

你。 提交于 2019-12-12 05:14:48

问题


How to order bare metal server without OS using REST API.

SoftLayer_Product_Package/getAllObjects we will get the package details under this which package Id needs to be selected. Package 200 is bare metal server which requires OS and also package 50 is bare metal instance which requires OS. Inform me which package ID will support for without OS.


回答1:


The packages that would be ordered without OS (Operating System) are the following:

  • (50) Bare Metal Instance
  • (56) Quad Processor Multi Core Nehalem EX
  • (126) Single Xeon 1200 Series (Sandy Bridge / Haswell)
  • (142) Single Xeon 2000 Series (Sandy Bridge)
  • (143) Dual Xeon 2000 Series (Sandy Bridge)
  • (144) Specialty Server: GPU
  • (146) Sandy Bridge 1270
  • (147) Specialty Server: 4u Mass Storage Dual Xeon 2000 (Sandy Bridge) Series
  • (148) Specialty Server: 2u Mass Storage Dual Xeon 2000 (Sandy Bridge) Series
  • (158) Quad Xeon 4000 Series (Sandy Bridge)
  • (234) Quad Xeon E7-4800 v2 (Ivy Bridge) Series
  • (248) Dual E5-2600 v3 Series (36 Drives)
  • (251) Dual E5-2600 v3 Series (12 Drives)
  • (253) Dual E5-2600 v3 Series (4 Drives)
  • (255) Single E3-1270 (4 Drives)
  • (257) Single E3-1270 v3 (4 Drives)
  • (259) Single E5-2600 Series (4 Drives)
  • (261) Single E3-1270 (2 Drives)
  • (263) Dual E5-2600 Series (36 Drives)
  • (265) Dual E5-2600 Series (12 Drives)
  • (267) Quad E5-4600 Series (24 Drives)
  • (269) Quad E7-4800 Series (6 Drives)
  • (271) Quad E7-4800 v2 Series (24 Drives)
  • (273) Dual E5-2600 (4 Drives)

Note: This is only a reference list. You need to consider that some of these package could be inactive for different reasons (availability, deprecated).

How can you get packages which not require an OS?

We need to get the item price which refers to "No Operating System". Doing some tests I found this item price "37120" which refers to "No Operating System". So, you can try the following rest request to get packages which contain this item price:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Item_Price/37120/getPackages

Method: Get

Once you chose a package, you can proceed to place an order, here a Rest request example:

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

Method: Post

{  
   "parameters":[  
      {  
         "location":"448994",
         "packageId":261,
         "hardware":[  
            {  
               "hostname":"rcvtest1",
               "domain":"softlayer.com"
            }
         ],
         "prices":[  
            {  
               "id":"50461"
            },
            {  
               "id":"50377"
            },
            {  
               "id":"37120"
            },
            {  
               "id":"876"
            },
            {  
               "id":"50041"
            },
            {  
               "id":"50357"
            },
            {  
               "id":"273"
            },
            {  
               "id":"55"
            },
            {  
               "id":"58"
            },
            {  
               "id":"420"
            },
            {  
               "id":"418"
            },
            {  
               "id":"21"
            },
            {  
               "id":"57"
            },
            {  
               "id":"906"
            }
         ]
      }
   ]
}

To get information about the item prices for a package, you can use the following rest request:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/261/getItemPrices

Method: Get

References:

  • SoftLayer_Product_Item_Price::getPackages
  • SoftLayer_Product_Package::getItemPrices
  • SoftLayer_Product_Order::placeOrder


来源:https://stackoverflow.com/questions/35366692/softlayer-api-hardware-how-to-order-bare-metal-server-without-os-using-rest-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!