I run a command remotely using Python and this is the output I get:
Vserver Volume Aggregate State Type Size Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
vs_cfm06 Available aggr_backup_1 online RW 100GB 66.37GB 33%
vs_cfm06 Discovery aggr_backup_1 online RW 100GB 66.36GB 33%
vs_cfm06 NonDebugCF01 aggr_backup_1 online RW 100GB 64.63GB 35%
vs_cfm06 NonDebugCF01_BACKUP aggr_backup_1 online RW 5GB 4.75GB 5%
vs_cfm06 Software aggr_backup_1 online RW 100GB 65.08GB 34%
vs_cfm06 Template aggr_backup_1 online RW 100GB 66.35GB 33%
vs_cfm06 breakresetafterfaildelCF01 aggr_backup_1 online RW 100GB 69.52GB 30%
vs_cfm06 breakresetafterfaildelCF01_BACKUP aggr_backup_1 online RW 5GB 4.75GB 5%
vs_cfm06 rootvol aggr_backup_1 online RW 1GB 972.5MB 5%
vs_cfm06 vol aggr_backup_1 online RW 1GB 972.6MB 5%
10 entries were displayed.
How do I extract one column from this so my output is something like this:
Available
Discovery
NonDebugCF01
NonDebugCF01_BACKUP
Software
Template
breakresetafterfaildelCF01
breakresetafterfaildelCF01_BACKUP
rootvol
vol
The code to run the command and print the output is this:
def get_volumes(usrname, ip):
raw_output = ru.run('volume show', user=usrname, host=ip, set_e=False) //logs onto netapp and runs command
print raw_output
When I run print type(raw_output) it says it's unicode.
Any help would be much appreciated.