Add support for listing service details
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:09:43 +0000 (20:09 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:09:43 +0000 (20:09 -0700)
test/test-manager

index 4b056f9..28a20de 100755 (executable)
@@ -30,7 +30,7 @@ def print_properties(key, value):
                properties = obj.GetProperties()
 
                for key in properties.keys():
-                       if key == "Networks":
+                       if key in ["Networks", "Services"]:
                                continue
 
                        if key in ["Powered", "Scanning", "Connected",
@@ -52,6 +52,12 @@ def print_properties(key, value):
                                val = str(path)
                                list = list + val[val.rfind("/") + 1:] + " "
                        print "        Networks = [ %s]" % (list)
+               if "Services" in properties.keys():
+                       list = ""
+                       for path in properties["Services"]:
+                               val = str(path)
+                               list = list + val[val.rfind("/") + 1:] + " "
+                       print "        Services = [ %s]" % (list)
 
 for key in properties.keys():
        if key in ["Profiles", "Devices", "Connections", "Services"]: