【问题标题】:Softlayer: Attach detach storage block (endurance) via APISoftlayer:通过 API 附加分离存储块(持久性)
【发布时间】:2016-03-17 01:43:35
【问题描述】:

如何继续通过 API 将存储块持久性附加和分离到虚拟机。

【问题讨论】:

    标签: ibm-cloud-infrastructure


    【解决方案1】:

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

    网址:

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

    方法:POST

    Json 有效负载:

    {
      "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/Bar Metal/Subnet必须位于同一位置/数据中心。

    这些请求帮助我们获得可用主机可以被授权给特定的“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

    【讨论】:

      【解决方案2】:

      【讨论】:

        猜你喜欢
        • 2011-05-19
        • 1970-01-01
        • 2023-03-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-07-25
        相关资源
        最近更新 更多