【问题标题】:New items for SoftLayer virtual server order?SoftLayer 虚拟服务器订单的新项目?
【发布时间】:2017-04-05 06:24:16
【问题描述】:

事实证明,虚拟服务器需要订购新产品。这是我从 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"=>""}},

但是当我尝试使用它时,它会显示如下内容:

56 x 2.0 GHz 内核在阿姆斯特丹 1 中不可用。

由于 locationGroupId 为空,我想这个项目应该在所有数据中心都可用。有趣的是我没有从 SL 门户中看到它。看起来它以某种方式被过滤掉了。但是,API 请求会提供新项目(新 ram 和 cores)。

我错过了什么吗?我也应该过滤这些项目吗?如果是,怎么做?

【问题讨论】:

    标签: ibm-cloud-infrastructure


    【解决方案1】:

    您需要使用SoftLayer_Product_Package::getItemLocationConflicts 方法,它将显示数据中心中所有有任何冲突的项目,即不能在数据中心订购的项目。例如使用休息调用

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

    在响应中你会看到:

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

    这意味着该项目在 amterdam 1 中不可用

    问候

    【讨论】:

    • 非常感谢,但请更正您添加的链接。它指出getItemConflits,但它必须是getItemLocationConflits
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-25
    • 1970-01-01
    相关资源
    最近更新 更多