New items for SoftLayer virtual server order?

2020-05-06 08:13发布

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条回答
我命由我不由天
2楼-- · 2020-05-06 09:07

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

查看更多
登录 后发表回答