summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-06-29 18:10:53 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-06-29 18:13:15 +0200
commitb1c7327a21cca836364e2fbe2c2006fa5c3ed251 (patch)
tree09ece1d47cd67d7215b1a076778f5f9a20b6c44b /test
parent3a0b56317e5473e81c4891303153f14b616b817e (diff)
downloadconnman-b1c7327a21cca836364e2fbe2c2006fa5c3ed251.tar.gz
connman-b1c7327a21cca836364e2fbe2c2006fa5c3ed251.tar.bz2
connman-b1c7327a21cca836364e2fbe2c2006fa5c3ed251.zip
Rememove rememeber, policy and prority properties
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rwxr-xr-xtest/set-policy28
-rwxr-xr-xtest/set-priority28
-rwxr-xr-xtest/test-connman42
4 files changed, 1 insertions, 99 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index a4ec186a..c1c08c92 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,7 +3,7 @@ EXTRA_DIST = get-state list-profiles list-services \
list-connections select-connection \
list-devices enable-device disable-device start-scanning \
list-networks select-network disable-network create-network \
- set-passphrase set-address set-policy set-priority \
+ set-passphrase set-address \
connect-network disconnect-network join-network \
simple-agent show-introspection test-compat test-manager \
test-connman monitor-connman monitor-services debug-connman
diff --git a/test/set-policy b/test/set-policy
deleted file mode 100755
index 5f26690a..00000000
--- a/test/set-policy
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import dbus
-
-if (len(sys.argv) < 3):
- print "Usage: %s <device> <policy>" % (sys.argv[0])
- sys.exit(1)
-
-bus = dbus.SystemBus()
-
-manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
- "org.moblin.connman.Manager")
-
-properties = manager.GetProperties()
-
-for path in properties["Devices"]:
- device = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Device")
-
- properties = device.GetProperties()
-
- if properties["Interface"] != sys.argv[1]:
- continue;
-
- print "Setting policy \"%s\" for %s" % (sys.argv[2], path)
-
- device.SetProperty("Policy", sys.argv[2])
diff --git a/test/set-priority b/test/set-priority
deleted file mode 100755
index 37a0e72d..00000000
--- a/test/set-priority
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import dbus
-
-if (len(sys.argv) < 3):
- print "Usage: %s <device> <priority>" % (sys.argv[0])
- sys.exit(1)
-
-bus = dbus.SystemBus()
-
-manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
- 'org.moblin.connman.Manager')
-
-properties = manager.GetProperties()
-
-for path in properties["Devices"]:
- device = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Device')
-
- properties = device.GetProperties()
-
- if properties["Interface"] != sys.argv[1]:
- continue;
-
- print "Setting priority %d for device %s" % (int(sys.argv[2]), path)
-
- device.SetProperty("Priority", dbus.Byte(int(sys.argv[2])));
diff --git a/test/test-connman b/test/test-connman
index 81dca916..34e93af5 100755
--- a/test/test-connman
+++ b/test/test-connman
@@ -23,11 +23,8 @@ if len(sys.argv) < 2:
print " dev <interface> scan"
print " dev <interface> networks"
print " dev <interface> connect <network>"
- print " dev <interface> remember <network>"
print " dev <interface> disconnect [network]"
- print " dev <interface> policy [ignore|off|auto|manual]"
print " dev <interface> powered [on|off]"
- print " dev <interface> priority [0-255]"
sys.exit(1)
def print_properties(path, properties):
@@ -109,24 +106,6 @@ def select_network(networks, name):
network.Connect()
-def remember_network(networks, name):
- for path in networks:
- network = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Network")
-
- properties = network.GetProperties()
-
- if properties["Name"] != name:
- continue
-
- if properties["Remember"] == dbus.Boolean(1):
- print "Already a known network %s" % (name)
- break
-
- print "Remembering network %s" % (name)
-
- network.SetProperty("Remember", dbus.Boolean(1))
-
def disconnect_network(networks, name):
for path in networks:
network = dbus.Interface(bus.get_object("org.moblin.connman", path),
@@ -328,13 +307,6 @@ elif sys.argv[1] == "dev":
print "Device can't connect networks"
elif command in ["connect", "conn"]:
print "Need to specify network"
- elif command in ["remember", "known"] and value != "":
- if "Networks" in properties.keys():
- remember_network(properties["Networks"], value)
- else:
- print "Device has no networks"
- elif command in ["remember", "known"]:
- print "Need to specify network"
elif command in ["disconnect", "disc"] and value != "":
if "Networks" in properties.keys():
disconnect_network(properties["Networks"], value)
@@ -345,13 +317,6 @@ elif sys.argv[1] == "dev":
disconnect_network(properties["Networks"], "")
else:
print "Device has no networks"
- elif command == "policy" and value != "":
- policy = value
- device.SetProperty("Policy", policy)
- elif command == "policy":
- interface = properties["Interface"]
- policy = properties["Policy"]
- print "Policy of device %s is %s" % (interface, policy)
elif command == "powered" and value != "":
if value == "on":
powered = dbus.Boolean(1)
@@ -367,13 +332,6 @@ elif sys.argv[1] == "dev":
else:
powered = "off"
print "Device %s is powered %s" % (interface, powered)
- elif command == "priority" and value != "":
- priority = int(value)
- device.SetProperty("Priority", priority)
- elif command == "priority":
- interface = properties["Interface"]
- priority = properties["Priority"]
- print "Device %s has priority of %d" % (interface, priority)
elif command == "list" or command == "":
print_properties(path, properties)
else: