我们如何订购“存储即服务(StaaS)"? [英] How can we order "Storage As A Service (StaaS)"?

查看:41
本文介绍了我们如何订购“存储即服务(StaaS)"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使现在,我们仍然可以使用packageId 240订购Endurance Storage. 但是,最近有了Endurance Storage的更新,它可以在静止状态下进行加密并在更细粒度的级别上进行选择,例如1、2、3 ... TB,而不是1、2、4 ... TB.

We are able to order Endurance Storage using packageId 240 even now. However there are recent updates for Endurance Storage, it can be encrypted at rest and selected at more granular level, for example, 1, 2, 3... TB rather than 1, 2, 4... TB.

然后,我们似乎不得不使用另一个名为存储即服务(StaaS)"的软件包759

Then we seem to have to use another package 759 named "Storage As A Service (StaaS)"

这是我们的尝试. 你能澄清出什么问题吗?

Here is our attempt. Could you clarify what's wrong?

我们的目标是通过新的Endurance菜单立即订购6TB LUN卷.

Our goal is to order 6TB LUN volume at once with new Endurance menu.

#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.

推荐答案

软件包759进行了一些更改,因为它需要volumeSize属性来设置所需的存储空间,请计算此volumeSize属性必须处于产品的容量范围内才能正常工作(例如:itemPrice 194733"Storage_Space"上的1 – 12000范围),并且数据类型容器还必须是SoftLayer_Container_Product_Order_Network_Storage_AsAService.

"There has been a few changes for the package 759 as it requires volumeSize property to set the storage space as you require, please take in count this volumeSize property must be within the product's capacity range to work properly (e.g.: 1 – 12000 range on itemPrice 194733 "Storage_Space"), and also the datatype container has to be SoftLayer_Container_Product_Order_Network_Storage_AsAService.

请在您的代码中使用以下订单模板:

Please use the following order template in your code:

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
}

这篇关于我们如何订购“存储即服务(StaaS)"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆