2016-11-29 23 views
0

從文件:需要額外的參數? SoftLayer_Network_Storage :: failbackFromReplicant&SoftLayer_Network_Storage :: failoverToReplicant

SoftLayer_Network_Storage :: failoverToReplicant,需要1個參數:replicantId SoftLayer_Network_Storage :: failbackFromReplicant,需要無參數。

但是從Python客戶端:

SoftLayer_Network_Storage :: failoverToReplicant,需要2個參數: replicantId,立即 SoftLayer_Network_Storage :: failbackFromReplicant,需要1個參數:replicantId

我不知道這是正確的,但python客戶端對我更有意義。

我猜元數據(https://api.softlayer.com/metadata/v3.1)需要修復到:

 "failbackFromReplicant": 
     { 
      "name": "failbackFromReplicant", 
      "type": "boolean", 
      "doc": "Failback from a volume replicant. In order to failback the volume must have already been failed over to a replicant. " 
     }, 
     "failoverToReplicant": 
     { 
      "name": "failoverToReplicant", 
      "type": "boolean", 
      "doc": "Failover to a volume replicant. During the time which the replicant is in use the local nas volume will not be available. ", 
      "parameters": 
      [ 
       { 
        "name": "replicantId", 
        "type": "int", 
        "doc": "Replicant ID to failover to" 
       } 
      ] 
     }, 

回答

0

的SLDN文檔是好的,

可以進行故障切換使用此基於REST的請求:

POST https://$USERNAME:[email protected]/rest/v3.1/SoftLayer_Network_Storage/111111/failoverToReplicant 

payload: 

{ 
    "parameters": [22222] 
} 

where 22222 is the ID of object storage's replica and 111111 is the ID of the block storage. 

對於需要故障回覆使用此RESTFul:

GET https://$USERNAME:[email protected]/rest/v3.1/SoftLayer_Network_Storage/111111/failbackFromReplicant 

where 111111 is the ID of the block storage 

它看起來很混亂,但是這是軟層製作它的方式。我猜Softlayer Python客戶端試圖通過添加這些額外的參數來避免混淆。無論如何,如果您希望您可以在Softlayer Python客戶端的Git項目中提交問題,以便客戶端支持該文檔。

Regards