Softlayer:通过API连接分离存储块(耐久性)

时间:2016-03-16 16:52:42

标签: ibm-cloud-infrastructure

如何从API连接和分离存储块耐久性到Virtuel Machine。

2 个答案:

答案 0 :(得分:1)

要授权/允许主持人Network Storage(即耐力),请执行:

URL:

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

方法:POST

Json Payload:

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

其中:1234567Virtual Server Instance

以上请求用于授权“耐力”“效果”。 如果您要授权 “Virtual Guest”,“IpAddress” or “Hardware” “objectType”的有效值为: “SoftLayer_Virtual_Guest “,”SoftLayer_Network_Subnet_IpAddress”, ”SoftLayer_Hardware”

<强>参考: SoftLayer_Network_Storage::allowAccessFromHostList

注意: “网络存储” VSI /条金属/子网必须位于同一位置/数据中心。

这些请求有助于我们获取可用的主机,可以授权给特定的“network storage”,我们可以在门户中看到:

要获得有效的可用虚拟访客,请执行:

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

Method: GET

参考:SoftLayer_Network_Storage::getAllowableVirtualGuests

可用金属条:

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

参考:SoftLayer_Network_Storage::getAllowableHardware

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

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

参考: SoftLayer_Network_Storage::getAllowableSubnets

答案 1 :(得分:1)