Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- Here is the source
- ##
- #!/usr/bin/env python
- from __future__ import with_statement
- from fabric.api import *
- def listVMs():
- with settings (
- hide('running', 'stdout', 'stderr'),
- ):
- result = sudo('VBoxManage list runningvms', shell=False, pty=True)
- print result.return_code
- #####
- Here is the output
- #####
- Trinity:unmarked-kickstart djohnston$ fab -H kt-internal -u djohnston -f ./vminfo.py listVMs
- [kt-internal] Executing task 'listVMs'
- 0
- Done.
- Disconnecting from kt-internal... done.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement