使用Softlayer API批量检查VM状态 [英] Batch checking the VM status with Softlayer API
问题描述
我们正在使用Softlayer API来检查我们创建的VM的状态.下面是我们现在正在使用的API,我们必须一次检查一个VM的状态.是否有一个Softlayer API可以检索VM列表的状态?
We are using Softlayer APIs to check the status of the VMs we create. Below are the APIs we are using now, and we have to check the status for one VM at a time. Is there a Softlayer API that can retrieve the status of a list of VMs?
以下是我们每次调用以获取一个虚拟机状态的API: 1.获取虚拟机ID api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/findByIpAddress/ x.x.x.x 2.获取虚拟机状态 api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/ vmID /getPowerState.json
Here are the APIs we are calling to get the status of one VM each time: 1. Get the VM id api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/findByIpAddress/x.x.x.x 2. Get the VM status api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/vmID/getPowerState.json
推荐答案
好吧,没有api方法可以获取这些值,但是它们是:
Well, there is no api method to get those values, but they are:
电源状态:
- 跑步
- 止步不前
- 已暂停
- 已暂停
- 未知
状态
- 编号:1001-有效
- 编号:1002-禁用
- 编号:1003-无效
- 编号:1004-已删除
- 编号:1006-已断开连接
这篇关于使用Softlayer API批量检查VM状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!