对于性能和耐久性的存储(块存储)API [英] API for Performance and Endurance storage(Block storage)

查看:197
本文介绍了对于性能和耐久性的存储(块存储)API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是DST印度团队的一部分,目前我们正在为我们的客户提供一个我们正在试图整合利用的SoftLayer提供REST API在ICO性能和耐久性的存储特性(的SoftLayer的)。我已经通过SoftLayer的文档了,但我没能找到相同的。

那么,能不能请你向我们提供以下资料?


  1. 请创建耐力存储(与一起提供API
    所需参数)

  2. 请为创建性能提供API
    存储(连同所需的参数)

  3. 请提供API
    用于连接存储耐力
  4. (与所需的参数)
  5. 请用于连接存储性能(以及提供API
    所需的参数)

祝商祺
阿努邦卡迈勒


解决方案

如需订购耐力,执行:

配置:

 包装使用= 240
存储类型:耐力
地点:Dal06
贮存包装:0.25 IOPS / GB
存储大小:20GB
快照空间的大小:0GB
操作系统类型:Linux的

网址:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

方法:POST

Json的有效载荷:

  {
  参数:
    {
      位置:154820,//达拉斯06
      包标识:240,
      osFormatType:{
        ID:12,
        是keyName:LINUX
      },
      复杂类型:SoftLayer_Container_Product_Order_Network_Storage_Enterprise,
      价格: [
        {
          标识:45058#耐力寄存
        },
        {
          标识:45098#块存储
        },
        {
          标识:每GB 45068#0.25 IOPS
        },
        {
          标识:45118#20 GB存储空间
        },
        {
          标识:46120#5 GB的存储空间 - 快照
        }
      ]
      量:1
    }
  ]
}

注:


  • 从verifyOrder方式改为placeOrder在一旦你的配置已经准备好

  • 删除在价格IDS设置意见得到一个有效的JSON(例如去掉 - >#耐力存储)

如何获得在有效的项目价格订购耐力/性能存储

下面根据包使用执行:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/[package_id]/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id,名称,LONGNAME]]]方法:GET哪里:
 用locationGroupId = null一个价格ID被认为是标准价格和API将在内部转换价格为客户着想。但我们建议先执行verifyOrder才能看到,如果通缉令是确定的(费用可能会有所不同)。

订购性能存储:

配置:

 套餐使用:222
存储类型:性能
位置:达拉斯06
存储大小:20GB - 100至1000 IOPS
指定IOPS:100
选择操作系统类型:Linux的

网址:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

方法:POST

Json的有效载荷:

  {
  参数:
    {
      包标识:222,
      位置:154820,
      osFormatType:{
        ID:12,
        是keyName:LINUX
      },
      复杂类型:SoftLayer_Container_Product_Order_Network_PerformanceStorage_Iscsi,
      价格: [
        {
          标识:40672#块存储(性能)
        },
        {
          标识:40682#20 GB存储空间
        },
        {
          标识:40792#100 IOPS
        }
      ]
      量:1
    }
  ]
}

授权/允许主机,请执行以下命令:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[Storage_id]/allowAccessFromHostList

方法:POST

  {
  参数:
    [
      {
        ID:13548553,
        的objectType:SoftLayer_Virtual_Guest
      }
    ]
  ]
}

根据上述要求用于授权耐力和性能
如果你要授权虚拟来宾 Ip地址硬件,有效的objectType的价值观是:

SoftLayer_Virtual_Guest,SoftLayer_Network_Subnet_IpAddress,SoftLayer_Hardware分别。

参考:


  

<一个href=\"http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage/allowAccessFromHostList\" rel=\"nofollow\">http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage/allowAccessFromHostList


的网络存储和VSI /酒吧金属/子网必须被定位在相同的位置/数据中心。
这些请求帮助我们取得可用的主机可以授权给特定的网络存储,因为我们可以在门户网站看到:

要得到有效的可用子网与相关的IP地址,执行:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storage_id]/ getAllowableSubnets?objectMask =面膜[ID,networkIdentifier,CIDR,subnetType,ipAddresses [ID,ip地址]方法:GET

要得到有效的可用的虚拟来宾,请执行以下命令:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage_Iscsi/[storage_id]/getAllowableVirtualGuests?objectMask=mask[id,fullyQualifiedDomainName]方法:GET

一个小会议室金属:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storage_id]/getAllowableHardware
方法:GET

更新1:

此外,要获得网络存储列表,请参阅:
  SoftLayer_Account :: getNetworkStorage

这是一个例子,结果显示类似的属性:位置网络存储类型对象面具

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[storageType, billingItem [描述,位置[ID,LONGNAME]]]方法:GET

使用过滤器:

通过网络存储类型过滤:耐力存储块存储(性能)

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,nasType,storageType, billingItem[description,location[id,longName]]]&objectFilter={\"networkStorage\":{\"nasType\":{\"operation\":\"ISCSI\"},\"billingItem\":{\"description\":{\"operation\":\"Endurance存储}}}}
方法:GET

其他的链接可以帮助你:

<一个href=\"http://stackoverflow.com/questions/35838651/api-for-listing-all-performance-storages-for-a-user\">API上市为用户所有性能库库

We are a part of DST India team and currently we are working for an offering for our client where we are trying to integrate performance and endurance storage features (of SoftLayer) in ICO using REST API provided by SoftLayer. I have gone through SoftLayer documentation but I'm not able to find the same.

So, Could you kindly provide us following information?

  1. please provide API for creating endurance storage (along with the parameters required)
  2. please provide API for creating performance storage (along with the parameters required)
  3. please provide API for attaching endurance storage (along with the parameters required)
  4. please provide API for attaching performance storage (along with the parameters required)

Best Regards Anupam Kamal

解决方案

To order Endurance, execute:

Configuration:

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

URL:

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

Method: POST

Json Payload:

{
  "parameters": [
    {
      "location": 154820,  //Dallas 06
      "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": 45118   # 20 GB Storage Space
        },
        {
          "id": 46120   # 5 GB Storage Space - Snapshot
        }
      ],
      "quantity": 1
    }
  ]
}

Notes:

  • change from "verifyOrder" method to "placeOrder" once that your configuration is ready
  • Remove the comments set in the prices ids to get a valid Json (e.g. remove --> # Endurance Storage)

How to get the valid item prices to order Endurance/Performance Storage?

Execute the following according to package to use:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/[package_id]/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]

Method: GET

Where:
 A price id with a locationGroupId = null is considered "A standard price" and the API will internally switch the prices for the customer. But we recommend to execute first the verifyOrder in order to see if the wanted order is ok (the fee can vary).

To Order Performance Storage:

Configuration:

Package to use: 222
Storage Type: Performance
Location: Dallas 06
Storage Size: 20GB – 100 to 1000 IOPS
Specify IOPS: 100
Select OS Type: Linux

URL:

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

Method: POST

Json Payload:

{
  "parameters": [
    {
      "packageId": 222,
      "location": 154820,
      "osFormatType": {
        "id": 12,
        "keyName": "LINUX"
      },
      "complexType": "SoftLayer_Container_Product_Order_Network_PerformanceStorage_Iscsi",
      "prices": [
        {
          "id": 40672   # Block Storage (Performance)
        },
        {
          "id": 40682   # 20 GB Storage Space
        },
        {
          "id": 40792   # 100 IOPS
        }
      ],
      "quantity": 1
    }
  ]
}

To authorize/allow hosts, please execute:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[Storage_id]/allowAccessFromHostList

Method: POST

{
  "parameters": [
    [
      {
        "id": 13548553,
        "objectType": "SoftLayer_Virtual_Guest"
      }
    ]
  ]
}

The Above request is used to authorize "Endurance" and "Performance" If you want to authorize "Virtual Guest","IpAddress" or "Hardware", valid values for "objectType" are:

"SoftLayer_Virtual_Guest ","SoftLayer_Network_Subnet_IpAddress", "SoftLayer_Hardware" respectively.

Reference:

http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage/allowAccessFromHostList

The "network storage" and VSI/Bar Metal/Subnet must to be located in the same location/datacenter. These requests help us to get available hosts can be authorized to an specific "network storage" as we can see in the Portal:

To get valid available subnets with associated IP addresses, execute:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storage_id]/ getAllowableSubnets?objectMask=mask[id,networkIdentifier,cidr,subnetType,ipAddresses[id,ipAddress]]

Method: GET

To get valid available virtual guests, please execute:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage_Iscsi/[storage_id]/getAllowableVirtualGuests?objectMask=mask[id,fullyQualifiedDomainName] 

Method: GET

Available Bar metal:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storage_id]/getAllowableHardware
Method: GET

Update 1:

Additionally, to get network Storage list, please see: SoftLayer_Account::getNetworkStorage

This is an example, where the result displays properties like: "location" and "network storage type" using object Masks.

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[storageType, billingItem[description,location[id,longName]]]

Method: GET

Using filters:

Filtering by network Storage Type: "Endurance Storage" or "Block Storage (Performance)"

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,nasType,storageType, billingItem[description,location[id,longName]]]&objectFilter={"networkStorage":{"nasType":{"operation":"ISCSI"},"billingItem":{"description":{"operation":"Endurance Storage"}}}}
Method: GET

Other link may help you:

API for Listing All Performance Storages for a user

这篇关于对于性能和耐久性的存储(块存储)API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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