test: Remove test-profile
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Aug 2011 13:09:09 +0000 (15:09 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Aug 2011 13:09:09 +0000 (15:09 +0200)
The profile API being gone for a long time now, test-profile is
irrelevant.

test/test-profile [deleted file]

diff --git a/test/test-profile b/test/test-profile
deleted file mode 100755 (executable)
index f3af911..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import dbus
-
-bus = dbus.SystemBus()
-
-manager = dbus.Interface(bus.get_object("net.connman", "/"),
-                                       "net.connman.Manager")
-
-if len(sys.argv) < 2:
-       print "Usage: %s <command>" % (sys.argv[0])
-       print ""
-       print "  list"
-       print "  name <profile> [name]"
-       print ""
-       print "  create <profile> [name]"
-       print "  remove <profile>"
-       sys.exit(1)
-
-def print_profiles(profiles, active):
-       for path in profiles:
-               profile = dbus.Interface(bus.get_object("net.connman", path),
-                                               "net.connman.Profile")
-
-               properties = profile.GetProperties()
-
-               identifier = path[path.rfind("/") + 1:]
-
-               if (path == active):
-                       default = "*"
-               else:
-                       default = " "
-
-               if "Name" in properties.keys():
-                       name = properties["Name"]
-               else:
-                       name = "<unnamed>"
-
-               print "%s %-12s %s" % (default, identifier, name)
-
-if sys.argv[1] in ["list", "show"]:
-       properties = manager.GetProperties()
-
-       print_profiles(properties["Profiles"], properties["ActiveProfile"])
-
-elif sys.argv[1] in ["name"]:
-       if (len(sys.argv) < 3):
-               print "Need at least profile parameter"
-               sys.exit(1)
-
-       path = "/profile/" + sys.argv[2]
-
-       profile = dbus.Interface(bus.get_object("net.connman", path),
-                                               "net.connman.Profile")
-
-       if (len(sys.argv) > 3):
-               name = sys.argv[3]
-
-               profile.SetProperty("Name", name);
-
-               print "Name \"%s\" set for %s" % (name, sys.argv[2])
-       else:
-               properties = profile.GetProperties()
-
-               if "Name" in properties.keys():
-                       name = "\"" + properties["Name"] + "\""
-               else:
-                       name = "<unnamed>"
-
-               print "Name for %s is %s" % (sys.argv[2], name)
-
-elif sys.argv[1] in ["create", "add"]:
-       if (len(sys.argv) < 3):
-               print "Profile parameter required"
-               sys.exit(1)
-
-       path = manager.CreateProfile(sys.argv[2])
-
-       print "New profile created at %s" % (path)
-
-       profile = dbus.Interface(bus.get_object("net.connman", path),
-                                               "net.connman.Profile")
-
-       if (len(sys.argv) > 3):
-               name = sys.argv[3]
-
-               profile.SetProperty("Name", name);
-
-               print "Name \"%s\" set for %s" % (name, sys.argv[2])
-
-elif sys.argv[1] in ["remove", "delete", "del"]:
-       if (len(sys.argv) < 3):
-               print "Profile parameter required"
-               sys.exit(1)
-
-       path = "/profile/" + sys.argv[2]
-
-       manager.RemoveProfile(path)
-
-else:
-       print "Unknown command"