What is relationShip between IOPS values Id and in Storage Size ID in Endurance Storage .?

后端 未结 1 1292
滥情空心
滥情空心 2021-01-16 11:21

I got confused while placing order for Endurance. As we have these three values for Storage Package :-

0.25_IOPS_PER_GB = 45074

2_IOPS_PER_GB = 45084

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-16 11:52

    • When executing this request:

      https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems?objectMask=mask[attributes.value,itemCategory.categoryCode,keyName,description]&objectFilter={   "items": {     "itemCategory": {       "categoryCode": {         "operation": "storage_tier_level"       }     }   } }
      
      Method: GET
      

    We can see that the Storage Packages have attribute valuescan help us to get a relation between Storage Package and Storage Size. For example the response shows us:

    0.25 IOPS per GB --> "value": "100"
    
    2 IOPS per GB--> "value": "200"
    
    4 IOPS per GB--> "value": "300"
    
    • And when executing the below request to get valid prices for Endurance filtering by “Storage Size”:

      https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]],categories.categoryCode,attributes[itemPriceAttributeType,value]]&objectFilter={   "itemPrices": {     "categories": {       "categoryCode": {         "operation": "performance_storage_space"       }     },     "locationGroupId": {       "operation": "is null"     }   } }
      
      Method: GET
      

    The response shows us the "CAPACITY_RESTRICTION_MIN" and "CAPACITY_RESTRICTION_MAX"of Storage Size related to Storage Packages.

    For example: “100 GB Storage Space” (id = 45234) should work successfully when creating an order with "4 IOPS per GB" ( "value": "300"). Below is a section of response:

    Response:

    {
    "id": 45234
    "attributes": [3]
    0:  {
    "value": "300"
    "itemPriceAttributeType": {
    "id": 21
    "keyname": "CAPACITY_RESTRICTION_MIN"
    }-
    }-
    1:  {
    "value": "300"
    "itemPriceAttributeType": {
    "id": 22
    "keyname": "CAPACITY_RESTRICTION_MAX"
    }-
    }-
    2:  {
    "value": "STORAGE_TIER_LEVEL"
    "itemPriceAttributeType": {
    "id": 24
    "keyname": "CAPACITY_RESTRICTION_TYPE"
    }-
    }-
    -
    "categories": [1]
    0:  {
    "categoryCode": "performance_storage_space"
    }-
    -
    "item": {
    "description": "100 GB Storage Space"
    "keyName": "100_GB_PERFORMANCE_STORAGE_SPACE"
    }-
    }
    

    This is a verifyOrder example using the previous values:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
    

    Method: POST

    Json Payload:

    {
      "parameters": [
        {
          "location": 37473,  #Washington 1
          "packageId": 240,
          "osFormatType": {
            "id": 12,
            "keyName": "LINUX"
          },
          "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
          "prices": [
            {
              "id": 45064   # Endurance Storage
            },
            {
              "id": 45104   # Block Storage
            },
            {
              "id": 45094   # Storage Tier Level: 4 IOPS per GB
            },
            {
              "id": 45234   # performance_storage_space: 100 GB Storage Space
            },
            {
              "id": 46176   # Storage Snapshot Space: 10 GB Storage Space
            }
          ],
          "quantity": 1
        }
      ]
    }
    

    Update 1:

    To get valid values using SoftLayer_Product_Package::getItemPrices with a relation of between Storage Package and Storage Size, please see:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]],categories.categoryCode,attributes[itemPriceAttributeType,value]]&objectFilter={   "itemPrices": {     "attributes": {       "value": {         "operation": 300       }     },     "categories": {       "categoryCode": {         "operation": "performance_storage_space"       }     },     "locationGroupId": {       "operation": "is null"     }   } }
    
    Method: GET
    

    Where: The response will display “Storage Package” item prices (categoryCode":"performance_storage_space"`) that can be used when selecting "4 IOPS per GB" (‘"value":300’).

    0 讨论(0)
提交回复
热议问题