Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ##
  2. Here is the source
  3. ##
  4.  
  5. #!/usr/bin/env python
  6.  
  7. from __future__ import with_statement
  8. from fabric.api import *
  9.  
  10. def listVMs():
  11. with settings (
  12. hide('running', 'stdout', 'stderr'),
  13. ):
  14. result = sudo('VBoxManage list runningvms', shell=False, pty=True)
  15. print result.return_code
  16.  
  17. #####
  18. Here is the output
  19. #####
  20.  
  21. Trinity:unmarked-kickstart djohnston$ fab -H kt-internal -u djohnston -f ./vminfo.py listVMs
  22. [kt-internal] Executing task 'listVMs'
  23. 0
  24.  
  25. Done.
  26. Disconnecting from kt-internal... done.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement