osFormatType Endurance Block Storage 排序软件层
osFormatType Endurance Block Storage ordering Softlayer
我在网上做了一些搜索,似乎无法弄清楚 OS 格式类型错误的原因。我做了一个查询,id 和 keyname 是正确的。
enduranceOrder = {
"location": 1441195,
"packageId": 240,
"quantity": 48,
"prices": [
{
"id": 45064 # endurance
},
{
"id": 45104 # block storage
},
{
"id": 178501 # 10 IOPS
},
{
"id": 178581 # 250 GB storage space
}
],
"osFormatType": {
"id": 12,
"keyName": "LINUX",
"complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type"
}
}
是我的订单。我已经尝试过使用和不使用复杂类型。
SoftLayer.exceptions.SoftLayerAPIError:
SoftLayerAPIError(SoftLayer_Exception_Order_InvalidData): Invalid data
on the order for property: osFormatType. No OS format type key name
set. Please provide a valid value
是错误
因为 API 不知道您的订单使用的是什么容器,通常您不需要指定它,但在这种情况下您需要它。
试试这个:
enduranceOrder = {
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"location": 1441195,
"packageId": 240,
"quantity": 48,
"prices": [
{
"id": 45064 # endurance
},
{
"id": 45104 # block storage
},
{
"id": 178501 # 10 IOPS
},
{
"id": 178581 # 250 GB storage space
}
],
"osFormatType": {
"id": 12,
"keyName": "LINUX",
"complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type"
}
}
此致
我在网上做了一些搜索,似乎无法弄清楚 OS 格式类型错误的原因。我做了一个查询,id 和 keyname 是正确的。
enduranceOrder = {
"location": 1441195,
"packageId": 240,
"quantity": 48,
"prices": [
{
"id": 45064 # endurance
},
{
"id": 45104 # block storage
},
{
"id": 178501 # 10 IOPS
},
{
"id": 178581 # 250 GB storage space
}
],
"osFormatType": {
"id": 12,
"keyName": "LINUX",
"complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type"
}
}
是我的订单。我已经尝试过使用和不使用复杂类型。
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Order_InvalidData): Invalid data on the order for property: osFormatType. No OS format type key name set. Please provide a valid value
是错误
因为 API 不知道您的订单使用的是什么容器,通常您不需要指定它,但在这种情况下您需要它。
试试这个:
enduranceOrder = {
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"location": 1441195,
"packageId": 240,
"quantity": 48,
"prices": [
{
"id": 45064 # endurance
},
{
"id": 45104 # block storage
},
{
"id": 178501 # 10 IOPS
},
{
"id": 178581 # 250 GB storage space
}
],
"osFormatType": {
"id": 12,
"keyName": "LINUX",
"complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type"
}
}
此致