如何从API连接和分离存储块耐久性到Virtuel Machine。
答案 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"
}
]
]
}
其中:1234567
是Virtual 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
答案 1 :(得分:1)
订购存储后,您必须按照以下步骤操作:
授权您要访问存储空间的主机
将存储装载到主机
通过API,您只能从VSI或裸机服务器授权主机,以便此服务器具有安装耐久性块存储的权限,但必须手动安装过程。
要通过API授权块存储,请使用以下方法: http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage/allowAccessFromHostList http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/allowAccessToNetworkStorage http://sldn.softlayer.com/reference/services/SoftLayer_Hardware_Server/allowAccessToNetworkStorage
要安装存储,请参阅以下文档: https://knowledgelayer.softlayer.com/procedure/accessing-block-storage-linux https://knowledgelayer.softlayer.com/procedure/accessing-block-storage-microsoft-windows https://knowledgelayer.softlayer.com/procedure/accessing-file-storage-linux https://knowledgelayer.softlayer.com/content/ordering-and-configuring-endurance-and-performance-block-storage-vmwaresoftlayer https://knowledgelayer.softlayer.com/procedure/endurance-provisioning
此致