Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client = paramiko.SSHClient()
- client.load_system_host_keys()
- client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- client.connect("1.1.1.1", username=username, password=password)
- stdin, stdout, stderr = client.exec_command("set -units GB")
- stdin, stdout, stderr = client.exec_command("vol show -vserver vs1 -volume test_volume -fields size")
- return stdout.read()
- vserver volume size
- ------------------------ ------------------ ------
- vs1 test_volume 1.07TB
- test01::> set -units GB
- test01::> vol show -vserver vs1 -volume test_volume -fields size
- vserver volume size
- ------------------------ ------------------ ------
- vs1 test_volume 1100GB
Add Comment
Please, Sign In to add comment