test: Also monitor technology changes
[framework/connectivity/connman.git] / test / service-move-before
1 #!/usr/bin/python
2
3 import sys
4 import dbus
5
6 def print_usage():
7         print "Usage: %s <service> <target service>" % (sys.argv[0])
8
9
10 if (len(sys.argv) < 2):
11         print_usage()
12         sys.exit(1)
13
14 bus = dbus.SystemBus()
15 path = "/net/connman/service/" + sys.argv[1]
16 service = dbus.Interface(bus.get_object('net.connman', path),
17                                         'net.connman.Service')
18
19 path2 = "/net/connman/service/" + sys.argv[2]
20 service2 = dbus.Interface(bus.get_object('net.connman', path2),
21                                         'net.connman.Service')
22
23 print "Moving %s before %s" % (sys.argv[1], sys.argv[2])
24
25 service.MoveBefore(service2)
26
27 print