Writig this in Python 2. Im trying to print the up ports to print, but they show up as None. It should print out 4 ports.
Ontap 9.1, API 110
2 For loops
out = server.invoke("net-port-ifgrp-get","ifgrp-name","a0a","node","tsccfs05n01a")
test = out.child_get("attributes")
test_list = test.children_get()
for mlag in test_list:
port = mlag.child_get('ports').children_get()
for status in port:
up = port.child_get_string('lif-bindable')
print "UP: " , up
Ouput:
UP: None
UP: None
UP: None
UP: None
When i try to do it with only one for loop:
out = server.invoke("net-port-ifgrp-get","ifgrp-name","a0a","node","tsccfs05n01a )
test = out.child_get("attributes")
test_list = test.children_get()
for mlag in out.child_get("attributes").children_get():
port = mlag.child_get('up-ports').child_get_string('lif-bindable')
print "Port: " + port
Output:
Port: e0e