SoftLayer verifyOrder API返回内部错误

时间:2016-06-21 22:41:56

标签: ibm-cloud-infrastructure

按照示例中的说明     https://gist.github.com/bmpotter/27913e92e9ff7b6b0c54 我们尝试使用SoftLayer API来订购Bare Metal机器。

我们的" verifyOrder"使用以下json请求(https:// $ SLUSERNAME:$ SLAPIKEY@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder.json)

{ "的complexType":" SoftLayer_Container_Product_Order_Hardware_Server&#34 ;, "量":1, "硬件":[{"主机名":" userBM3","域":" cloud.com",& #34; primaryBackendNetworkComponent":{" networkVlan":{" id":1050255," primarySubnetId":1223965}}}], "位置":" dal09&#34 ;, " useHourlyPricing":假, "包ID":251, "价格":[{" id":50659},{" id":49447},{" id":31154},{ " id":40148},{" id":35963},{" id":25014},{" id":34807} ,{" id":27023},{" id":32627},{" id":32500},{" id": 33483},{" id":35310},{" id":156765},{" id":156765},{" id&#34 ;:49841},{" id":49841},{" id":49841},{" id":49841},{" id& #34;:49841},{" id":49841},{" id":49841},{" id":49841},{&#34 ; id":49841},{" id":49841},{" id":50223},{" id":141945}], " storageGroups":[{" arrayTypeId":2," hardDrives":[0,1]},{" arrayTypeId":2, " hardDrives":[2,3]},{" arrayTypeId":9," hardDrives":[4]},{" arrayTypeId&#34 ;:9," hardDrives":[5]},{" arrayTypeId":9," hardDrives":[6]},{" arrayTypeId& #34;:9," hardDrives":[7]},{" arrayTypeId":9," hardDrives":[8]},{&#34 ; arrayTypeId":9," hardDrives":[9]},{" arrayTypeId":9," hardDrives":[10]},{& #34; arrayTypeId":9," hardDrives":[11]}]

}

导致以下回复

{"错误":"发生内部系统错误。","代码":" SoftLayer_Exception_InternalError"}

我们验证了所有价格ID都有效且无法确定导致内部错误的原因。

1 个答案:

答案 0 :(得分:0)

尝试以下REST请求:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

Method: Post

{  
   "parameters":[  
      {  
         "complexType":"SoftLayer_Container_Product_Order_Hardware_Server",
         "quantity":1,
         "hardware":[  
            {  
               "hostname":"userBM3",
               "domain":"cloud.com",
               "primaryBackendNetworkComponent":{  
                  "networkVlan":{  
                     "id":1050255,
                     "primarySubnetId":1223965
                  }
               }
            }
         ],
         "location":"DALLAS09",
         "useHourlyPricing":false,
         "packageId":251,
         "prices":[  
            {  
               "id":50659
            },
            {  
               "id":49447
            },
            {  
               "id":31154
            },
            {  
               "id":40148
            },
            {  
               "id":35963
            },
            {  
               "id":25014
            },
            {  
               "id":34807
            },
            {  
               "id":27023
            },
            {  
               "id":32627
            },
            {  
               "id":32500
            },
            {  
               "id":33483
            },
            {  
               "id":35310
            },
            {  
               "id":156765
            },
            {  
               "id":156765
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":49841
            },
            {  
               "id":50223
            },
            {  
               "id":141945
            }
         ],
         "storageGroups":[  
            {  
               "arrayTypeId":2,
               "hardDrives":[  
                  0,
                  1
               ]
            },
            {  
               "arrayTypeId":2,
               "hardDrives":[  
                  2,
                  3
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  4
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  5
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  6
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  7
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  8
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  9
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  10
               ]
            },
            {  
               "arrayTypeId":9,
               "hardDrives":[  
                  11
               ]
            }
         ]
      }
   ]
}

快速浏览,价格和Dallas09位置之间存在冲突,请参阅此文章以获取更多信息:Location-based Pricing and You

  

更新

156765 价格(描述:2.00 TB SATA)这不是达拉斯9的有效价格

如果您想在达拉斯9中订购相同的商品,请更改 49821 ,而不是 156765

  

价格: 49821 这是一个标准价格(描述:2.00 TB)。

<强>参考文献: