Fix indenting after uncommenting. Ugh, python...
Change-Id: I65d2a3b6c28f7b1d6f62a1bb8539e4ba1dc554e5
diff --git a/util.py b/util.py
index db972ad..3aa9018 100644
--- a/util.py
+++ b/util.py
@@ -17,31 +17,30 @@
def get_all_switches(self, config):
for switch in sorted(config.switches):
- print "Found switch %s:" % (switch)
- print " Probing:"
+ print "Found switch %s:" % (switch)
+ print " Probing:"
- s = util.get_switch_driver(switch, config)
- s.switch_connect(config.switches[switch].username, config.switches[switch].password)
- print " Found details of switch:"
- s._dump_list(s._systemdata)
- print " Switch has %d ports:" % len(s.switch_get_port_names())
- for port in s.switch_get_port_names():
- print " %s" % port
- if 0 == 1:
- mode = s.port_get_mode(port)
- if mode == "trunk":
- print " port %s is in trunk mode, VLAN(s):" % port
- vlans = s.port_get_trunk_vlan_list(port)
- for vlan in vlans:
- name = s.vlan_get_name(vlan)
- print " %d (%s)" % (vlan, name)
- else:
- vlan = s.port_get_access_vlan(port)
- name = s.vlan_get_name(vlan)
- print " port %s is in access mode, VLAN %d (%s):" % (port, vlan, name)
-
- s.switch_disconnect()
- del(s)
+ s = util.get_switch_driver(switch, config)
+ s.switch_connect(config.switches[switch].username, config.switches[switch].password)
+ print " Found details of switch:"
+ s._dump_list(s._systemdata)
+ print " Switch has %d ports:" % len(s.switch_get_port_names())
+ for port in s.switch_get_port_names():
+ print " %s" % port
+ if 0 == 1:
+ mode = s.port_get_mode(port)
+ if mode == "trunk":
+ print " port %s is in trunk mode, VLAN(s):" % port
+ vlans = s.port_get_trunk_vlan_list(port)
+ for vlan in vlans:
+ name = s.vlan_get_name(vlan)
+ print " %d (%s)" % (vlan, name)
+ else:
+ vlan = s.port_get_access_vlan(port)
+ name = s.vlan_get_name(vlan)
+ print " port %s is in access mode, VLAN %d (%s):" % (port, vlan, name)
+ s.switch_disconnect()
+ del(s)
# Simple helper wrapper for all the read-only database queries
def perform_db_query(self, state, command, data):