Python 我们如何订购;存储即服务(StaaS)“;?
即使现在,我们也可以使用packageId 240订购耐久性存储。 不过,耐久性存储最近有更新,可以在静止状态下对其进行加密,并在更精细的级别上进行选择,例如,1、2、3。。。TB而不是1,2,4。。。结核病 然后,我们似乎必须使用另一个名为“存储即服务(StaaS)”的包759 这是我们的尝试。 你能澄清一下是怎么回事吗 我们的目标是使用新的耐久性菜单一次性订购6TB LUN卷Python 我们如何订购;存储即服务(StaaS)“;?,python,ibm-cloud-infrastructure,Python,Ibm Cloud Infrastructure,即使现在,我们也可以使用packageId 240订购耐久性存储。 不过,耐久性存储最近有更新,可以在静止状态下对其进行加密,并在更精细的级别上进行选择,例如,1、2、3。。。TB而不是1,2,4。。。结核病 然后,我们似乎必须使用另一个名为“存储即服务(StaaS)”的包759 这是我们的尝试。 你能澄清一下是怎么回事吗 我们的目标是使用新的耐久性菜单一次性订购6TB LUN卷 #import package import SoftLayer import json # account in
#import package
import SoftLayer
import json
# account info
client = SoftLayer.create_client_from_env()
order = {
"orderContainers": [
{
"complexType":"SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"osFormatType":{
"id":12,
"keyName":"LINUX"
},
'location': 449604, # Tokyo
'packageId': 759, # Storage As A Service (StaaS)
'prices': [
{'id':189433}, # Storage As A Service
{'id':189453}, # File storage
{'id':194703}, # 4 IOPS per GB
{'id': 194733} # Storage space for 4 IOPS per GB
#{'id': 190443} # 4000 - 7999 GBs
],
}
],
'quoteName': "Endurance_Storage",
'sendQuoteEmailFlag': False
}
# placeQuote
placeQuote = client['Product_Order'].placeQuote(order)
#placeQuote = client['Product_Order'].verifyOrder(order)
#jsonstring = json.dumps(placeQuote,indent=4)
#print(jsonstring)
```
这就是错误所在
$ python placeQuoteSTaaSTemplate.py
Traceback (most recent call last):
File "placeQuoteSTaaSTemplate.py", line 32, in <module>
placeQuote = client['Product_Order'].placeQuote(order)
File "/Library/Python/2.7/site-packages/SoftLayer/API.py", line 392, in call_handler
return self(name, *args, **kwargs)
File "/Library/Python/2.7/site-packages/SoftLayer/API.py", line 360, in call
return self.client.call(self.name, name, *args, **kwargs)
File "/Library/Python/2.7/site-packages/SoftLayer/API.py", line 263, in call
return self.transport(request)
File "/Library/Python/2.7/site-packages/SoftLayer/transports.py", line 195, in __call__
raise _ex(ex.faultCode, ex.faultString)
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid): Invalid price Storage as a Service (189433) provided on the order container.
$python placequotestastample.py
回溯(最近一次呼叫最后一次):
文件“placequotestastemplate.py”,第32行,在
placeQuote=客户['Product_Order']。placeQuote(订单)
文件“/Library/Python/2.7/site packages/SoftLayer/API.py”,第392行,在call_handler中
返回自我(名称,*args,**kwargs)
文件“/Library/Python/2.7/site packages/SoftLayer/API.py”,第360行,调用中
返回self.client.call(self.name,name,*args,**kwargs)
文件“/Library/Python/2.7/site packages/SoftLayer/API.py”,第263行,调用中
返回自动传输(请求)
文件“/Library/Python/2.7/site packages/SoftLayer/transports.py”,第195行,在调用中__
raise_ex(ex.faultCode,ex.faultString)
SoftLayer.exceptions.SoftLayerAPIError:SoftLayerAPIError(SoftLayer\u Exception\u Order\u Item\u Invalid):订单容器上提供的价格存储即服务(189433)无效。
“由于759软件包需要volumeSize属性来设置所需的存储空间,因此对其进行了一些更改,请考虑此volumeSize属性必须在产品的容量范围内才能正常工作(例如:itemPrice 194733“存储空间”中的1–12000范围),并且数据类型容器必须是软层\容器\产品\订单\网络\存储\服务
请在代码中使用以下订单模板:
order = {
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"volumeSize": 6000,
"osFormatType":{
"id":12,
"keyName":"LINUX"
},
"location": 449604,
"quantity": 1,
"packageId": 759,
"prices": [
{'id': 189433}, # Storage As A Service
{'id': 189453}, # File storage
{'id': 194703}, # 4 IOPS per GB
{'id': 194733} # Storage space for 4 IOPS per GB
],
'quoteName': "Endurance_Storage",
'sendQuoteEmailFlag': False
}
“由于759软件包需要volumeSize属性来设置所需的存储空间,因此对其进行了一些更改,请考虑此volumeSize属性必须在产品的容量范围内才能正常工作(例如:itemPrice 194733“存储空间”中的1–12000范围),并且数据类型容器必须是软层\容器\产品\订单\网络\存储\服务 请在代码中使用以下订单模板:
order = {
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"volumeSize": 6000,
"osFormatType":{
"id":12,
"keyName":"LINUX"
},
"location": 449604,
"quantity": 1,
"packageId": 759,
"prices": [
{'id': 189433}, # Storage As A Service
{'id': 189453}, # File storage
{'id': 194703}, # 4 IOPS per GB
{'id': 194733} # Storage space for 4 IOPS per GB
],
'quoteName': "Endurance_Storage",
'sendQuoteEmailFlag': False
}
@cricket_007基本本页。softlayer-性能和耐久性存储API(块存储)-堆栈溢出@cricket_007基本本页。softlayer-性能和耐久性存储API(块存储)-堆栈溢出@cricket_007基本本页。softlayer-性能和耐久性存储API(块存储)-Stack Overflow@cricket_007基本上就是这个页面。softlayer-性能和耐久性存储API(块存储)-引用后堆栈溢出,当我们从SL门户单击它时,会显示以下错误消息。你知道吗?“为“volumeSize”提供的值无效。卷大小无效。”我认为是softlayer中的一个缺陷,似乎不允许为文件存储放置报价,目前控制门户不允许。我建议您打开softlayer的报价单。在报价后,当我们从SL门户单击它时,会显示以下错误消息。您知道吗?“为'volumeSize'提供的值无效。卷大小无效。”我认为这是softlayer中的一个错误,似乎不允许为文件存储放置引号,目前控制门户不允许。我建议您打开softlayer的罚单