1
請幫助我使用簡單的api獲取有關perfomace hipervizor的日期(在我的情況下,我用python)。從cloudstack api獲取性能日期
有簡單的例子,誰得到的機器列表:
#!/usr/bin/python
import CloudStack
api = 'http://example.com:8080/client/api'
apikey = 'API KEY'
secret = 'API SECRET'
cloudstack = CloudStack.Client(api, apikey, secret)
vms = cloudstack.listVirtualMachines()
for vm in vms:
print "%s %s %s" % (vm['id'], vm['name'], vm['state'])
如何從這個劇本我可以改變它,讓所有hipervizor機的例子CPU? (如果不僅可以提供關於CPU的信息,還可以提供關於HDD利用率,內存等的信息......)
非常感謝。