Created
February 2, 2013 06:07
-
-
Save netmarkjp/4696282 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fabric.api import * | |
| from fabric.contrib.files import * | |
| import json | |
| import os,sys,time | |
| def list_vm(displayname="scale"): | |
| resp=local("idcf-compute-api listVirtualMachines",capture=True) | |
| retval = json.loads(resp, 'UTF-8') | |
| for vm in retval['listvirtualmachinesresponse']['virtualmachine']: | |
| print vm['displayname'], | |
| print vm['nic'][0]['ipaddress'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment