summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-08-08 15:09:09 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-08-08 15:09:09 +0200
commit80e61fa2617aadbb3e74b6edd99e0cab83906124 (patch)
tree237800f53b0130a0d7d7005b9346cb054a4bfb33 /test
parent218691d56e12fe16acb52d1b35ccf1a759881d52 (diff)
downloadconnman-80e61fa2617aadbb3e74b6edd99e0cab83906124.tar.gz
connman-80e61fa2617aadbb3e74b6edd99e0cab83906124.tar.bz2
connman-80e61fa2617aadbb3e74b6edd99e0cab83906124.zip
test: Remove test-profile
The profile API being gone for a long time now, test-profile is irrelevant.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-profile102
1 files changed, 0 insertions, 102 deletions
diff --git a/test/test-profile b/test/test-profile
deleted file mode 100755
index f3af911a..00000000
--- a/test/test-profile
+++ /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"