1

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.

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?

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) 

```

This is the error.

$ 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.
kyouhei
  • 54
  • 1
  • 1
  • 6
  • @cricket_007 Basically this page. softlayer - API for Performance and Endurance storage(Block storage) - Stack Overflow https://stackoverflow.com/questions/35454059/api-for-performance-and-endurance-storageblock-storage – kyouhei Jun 14 '17 at 03:31
  • @cricket_007 Basically this page. softlayer - API for Performance and Endurance storage(Block storage) - Stack Overflow https://stackoverflow.com/questions/35454059/api-for-performance-and-endurance-storageblock-storage – kyouhei Jun 14 '17 at 23:55

1 Answers1

0

“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
}
  • After quoting, when we click it from SL portal, the following error message was showed. Do you have any idea? "Invalid value provided for 'volumeSize'. Invalid volume size. " – kyouhei Jun 17 '17 at 07:20
  • I think is a bug in softlayer, it seems that is not allowed to placeQuotes for file storages, currently the control portal does not allow it. I recommend you to open a softlayer´s ticket about this – Nelson Raul Cabero Mendoza Jun 19 '17 at 23:56