Guest User

Untitled

a guest
Mar 4th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. client = paramiko.SSHClient()
  2. client.load_system_host_keys()
  3. client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  4. client.connect("1.1.1.1", username=username, password=password)
  5. stdin, stdout, stderr = client.exec_command("set -units GB")
  6. stdin, stdout, stderr = client.exec_command("vol show -vserver vs1 -volume test_volume -fields size")
  7. return stdout.read()
  8.  
  9. vserver volume size
  10. ------------------------ ------------------ ------
  11. vs1 test_volume 1.07TB
  12.  
  13. test01::> set -units GB
  14.  
  15. test01::> vol show -vserver vs1 -volume test_volume -fields size
  16.  
  17. vserver volume size
  18. ------------------------ ------------------ ------
  19. vs1 test_volume 1100GB
Add Comment
Please, Sign In to add comment