性能和持久存储API(块存储) [英] API for Performance and Endurance storage(Block storage)

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

问题描述

我们是 DST India 团队的一员,目前我们正在为我们的客户提供产品,我们正在尝试使用 SoftLayer 提供的 REST API 在 ICO 中集成(SoftLayer 的)性能和耐久性存储功能.我已经阅读了 SoftLayer 文档,但找不到相同的内容.

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. 请提供用于创建持久存储的 API(以及需要参数)
  2. 请提供创建性能的API存储(连同所需的参数)
  3. 请提供API用于附加耐久存储(以及所需的参数)
  4. 请提供用于附加性能存储的 API(连同需要的参数)

推荐答案

要订购 Endurance,请执行:

配置:

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

网址:

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

方法:POST

Json 有效负载:

{
  "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
    }
  ]
}

注意事项:

  • 一旦您的配置准备就绪,就从verifyOrder"方法更改为placeOrder"
  • 删除价格 ID 中设置的注释以获得有效的 Json(例如删除 --> # Endurance Storage)

如何获得有效的商品价格来订购 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).

订购性能存储:

配置:

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

网址:

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

方法:POST

Json 有效负载:

{
  "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
    }
  ]
}

要授权/允许主机,请执行:

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

方法:POST

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

上述请求用于授权Endurance"和Performance"如果您想授权Virtual Guest"、IpAddress"或Hardware",objectType"的有效值为:

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

参考:

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

网络存储"和 VSI/Bar Metal/Subnet 必须位于同一位置/数据中心.这些请求帮助我们获取可用主机,这些主机可以被授权到特定的网络存储",正如我们在门户中看到的:

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:

要获取具有关联 IP 地址的有效可用子网,请执行:

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

可用金属条:

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

更新 1:

此外,要获取网络存储列表,请参阅: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

使用过滤器:

按网络存储类型过滤:Endurance Storage"块存储(性能)"

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

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

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