繁体   English   中英

softlayer api:复制OS图像跨IDC时如何获取状态(完成或处理中)?

[英]softlayer api: How to get the status(finish or processing) when copy os image cross IDC?

当我调用SoftLayer_Virtual_Guest_Block_Device_Template_Group:addLocations复制IDC交叉的私有image_A时,此函数立即返回True 因此,已知该操作是异步的。

问题是我如何知道此异步操作已完成,即image_A已经完成复制到目标IDC

我找到了api:

SoftLayer_Virtual_Guest_Block_Device_Template_Group:getTransaction() ,但是这个总是返回一个空的str?

您需要拨打以下电话

https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/$templateGroupId/getChildren?objectMask=mask[transaction]

Method: Get

替换: $ user$ apiKey$ templateGroupId

您需要验证子级(作为图像模板组的克隆的图像模板组)没有任何暂挂或当前事务。 如果有一个或多个交易,则在完成此操作之前,您将无法添加/删除位置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM