Convert get_all_switches() into a new daemon query probe_switches()

Change-Id: I94dd2d0bebadc2e14ce86caca4b6241723b159ea
diff --git a/util.py b/util.py
index c9a1487..a938732 100644
--- a/util.py
+++ b/util.py
@@ -13,11 +13,14 @@
         class_ = getattr(module, driver)
         return class_(switch_name)
 
-    def get_all_switches(self, config):
+    def probe_switches(self, state):
+        config = state.config
         for switch_name in sorted(config.switches):
             print "Found switch %s:" % (switch_name)
             print "  Probing:"
 
+            ret = {}
+
             s = self.get_switch_driver(switch_name, config)
             s.switch_connect(config.switches[switch_name].username,
                              config.switches[switch_name].password,
@@ -27,18 +30,7 @@
             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)    
+            ret[switch] = 'Found switch %s with %d ports' % (switch, len(s.switch_get_port_names()))
             s.switch_disconnect()
             del(s)