From: Marcel Holtmann Date: Mon, 29 Jun 2009 16:10:53 +0000 (+0200) Subject: Rememove rememeber, policy and prority properties X-Git-Tag: 0.20~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1c7327a21cca836364e2fbe2c2006fa5c3ed251;p=platform%2Fupstream%2Fconnman.git Rememove rememeber, policy and prority properties --- diff --git a/test/Makefile.am b/test/Makefile.am index a4ec186..c1c08c9 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 5f26690..0000000 --- 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 " % (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 37a0e72..0000000 --- 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 " % (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 81dca91..34e93af 100755 --- a/test/test-connman +++ b/test/test-connman @@ -23,11 +23,8 @@ if len(sys.argv) < 2: print " dev scan" print " dev networks" print " dev connect " - print " dev remember " print " dev disconnect [network]" - print " dev policy [ignore|off|auto|manual]" print " dev powered [on|off]" - print " dev 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: