New items for SoftLayer virtual server order?

六月ゝ 毕业季﹏ 提交于 2019-12-31 06:08:11

问题


It turns out there are new items to order for virtual servers. Here is one I got from the API:

{"currentPriceFlag"=>"",
"hourlyRecurringFee"=>".918",
"id"=>172553,
"itemId"=>6521,
"laborFee"=>"0",
"locationGroupId"=>"",
"onSaleFlag"=>"",
"oneTimeFee"=>"0",
"quantity"=>"",
"recurringFee"=>"609",
"setupFee"=>"0",
"sort"=>0,
"item"=>
 {"capacity"=>"56",
  "description"=>"56 x 2.0 GHz Cores",
  "id"=>6521,
  "itemTaxCategoryId"=>166,
  "keyName"=>"GUEST_CORES_56",
  "softwareDescriptionId"=>"",
  "units"=>"CORE",
  "upgradeItemId"=>""}},

But when I tried to use it, it shows something like:

56 x 2.0 GHz Cores is not available in Amsterdam 1.

Since locationGroupId is empty, I suppose this item should be available in all datacenters. What's interesting is that I don't see it from the SL portal. Looks like it's filtered out somehow. However, the API request gives new items(new ram and cores ones).

Do I missed something? Should I filter those items as well? if yes, how?


回答1:


You need to use the SoftLayer_Product_Package::getItemLocationConflicts method it will display all the items which have any conflinct in a datacenter in other words what items cannot be ordered in a datacenter. e.g. Using Rest Call

https://$USer:$APIKEY@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemLocationConflicts

In the response you will see this:

 {
        "itemId": 6521,
        "message": "56 x 2.0 GHz Cores is not available in Amsterdam 1.",
        "packageId": null,
        "resourceTableId": 265592
    },

that means that that item is not available in amterdam 1

Regards



来源:https://stackoverflow.com/questions/43202225/new-items-for-softlayer-virtual-server-order

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