如何获取LocationID,存储包ID,存储大小ID和SnapShot空间大小ID以在Endurance Storage中下订单 [英] How to fetch LocationID, Storage Package ID, Storage Size ID and SnapShot Space Size ID for placing order in Endurance Storage

查看:108
本文介绍了如何获取LocationID,存储包ID,存储大小ID和SnapShot空间大小ID以在Endurance Storage中下订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用基于ICO的BPM(IBM Cloud Orchestrator)在我的应用程序中实现耐久存储的订购.

I need to implement placing order for endurance storage in my Application using BPM over ICO (IBM Cloud Orchestrator) dynamically.

我需要以下参数来创建用于下订单的休整呼叫

I needed following parameters for creating rest call for placing order

  1. 要使用的包装
  2. 存储类型
  3. 位置
  4. 存储包(IOPS/GB)
  5. 存储空间
  6. 快照空间大小
  7. 操作系统类型

  1. Package to use
  2. Storage Type
  3. Location
  4. Storage Package (IOPS/GB)
  5. Storage Size
  6. Snapshot Space Size
  7. OS Type

  1. 要使用的软件包:- 我已经知道包装的耐力值是240.

  1. Package to use:- I already know package value for endurance is 240.

存储类型:- 对于持久性存储,什么是持久性数字ID其余什么 呼叫会对此有所帮助..?

Storage Type:- For endurance storage what will be numeric id for endurance What rest call will help in this..?

位置:- 剩下的电话给了我位置ID:-

Location:- This Rest call gives me locations ID:-

https:[用户名]:[apiKey] api.softlayer.com/rest /v3.1/SoftLayer_Product_Package/240/getRegions.json

https:[username]:[apiKey]api.softlayer.com/rest /v3.1/SoftLayer_Product_Package/240/getRegions.json

  1. 存储软件包:- 对于Endurance,我在存储包中只找到了这些 3个选项:-
    • 0.25 IOPS/GB
    • 2 IOPS/GB
    • 4 IOPS/GB
  1. Storage Package:- For Endurance I found only these 3 options in storage package :-
    • 0.25 IOPS/GB
    • 2 IOPS/GB
    • 4 IOPS/GB

我将如何获得这三个的ID ??

How will I get id for these three..?

  1. 存储大小:-

对于存储大小ID,我使用了一个调用:-

For storage size id I used a rest call :-

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]&objectFilter={"items":{"prices":{"pricingLocationGroup":{"locations":{"item":{"operation":"loc_code"}}}}}}

还有其他方法吗??

  1. 快照空间大小:- 快照空间大小ID的其余调用是什么??
  1. Snapshot Space Size:- What will be the rest call for snapshot space size ids..?

请帮助我,因为我需要使用 API集成此功能 BPM .我们需要订购具有动态值的耐久力存储. 预先感谢.

Please help me as I need to integrate this functionality as an API using BPM. We need to place order for endurance storage with dynamic values. Thanks in advance.

推荐答案

要获取所有 configuration Endurance items 的有效价格,可以使用要了解正在使用什么软件包Endurance(PackageId = 240),请参阅:

To know what package Endurance (PackageId = 240 ) is using, please see:

https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/getAllObjects

Method: GET

这是一个示例:

Package to use = 240
Storage Type: Endurance
Location: Dal06
Storage Package: 0.25 IOPS/GB
Storage Size: 40GB
Snapshot Space Size: 5GB
OS Type: Linux

REST示例:

{
  "parameters": [
    {
      "location": 154820, 
      "packageId": 240,
      "osFormatType": {
        "id": 12,
        "keyName": "LINUX"
      },
      "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
      "prices": [
        {
          "id": 45058   # Endurance Storage
        },
        {
          "id": 45098   # Block Storage
        },
        {
          "id": 45068   # 0.25 IOPS per GB
        },
        {
          "id": 45148   # 40 GB Storage Space
        },
        {
          "id": 46120   # 5 GB Storage Snapshot Space
        }
      ],
      "quantity": 1
    }
  ]
}

要获取上述ID,我们可以使用一些过滤器以更好地理解:

To get the above ids, we can use some filters for better understanding:

-获取**存储类型**:"id": 45058 # Endurance Storage:

-Getting ** Storage Type**: "id": 45058 # Endurance Storage:

https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/240/getItemPrices?objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_service_enterprise"}}}}&objectMask=mask[id,categories,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]

Method: GET

我们在其中过滤的依据: categoryCode

Where we are filtering by : categoryCode

  • 获取块存储"或文件存储"的ID,我们选择块存储:

"id": 45098 # Block Storage

过滤器将更改为:

objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_block"}}}}

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