Trying to do a check against Cisco IOSXE to see if any ports are still configured in the default VLAN.
Output = net_connect.send_command ('show int status', use_textfsm=true)
for i in output:
if i["vlan"] == "1":
print ('Not compliant')
else:
print ('Compliant')
This does work, but for a 48 port switch, I get 48 lines saying Compliant or Not Compliant. How can I change this so that if all ports are in a different vlan, lets say vlan 2, I get one line saying Complaint. And if ANY number of ports are in VLAN 1 , whether is be 1 port or 10 ports, I get one line saying "Not complaint", instead of 48 lines.