diff options
Diffstat (limited to 'tests/amb-get.py')
-rwxr-xr-x | tests/amb-get.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/amb-get.py b/tests/amb-get.py new file mode 100755 index 00000000..352961b9 --- /dev/null +++ b/tests/amb-get.py @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import dbus +import sys +import argparse +import json + +print "This application is deprecated. It will disappear in the future. Use ambctl" + +parser = argparse.ArgumentParser() +parser.add_argument("get", help="get {objectName}") +args = parser.parse_args() + +objectName = args.get + +bus = dbus.SystemBus() +managerObject = bus.get_object("org.automotive.message.broker", "/"); +managerInterface = dbus.Interface(managerObject, "org.automotive.Manager") + +objects = managerInterface.FindObject(objectName); + +for o in objects: + propertiesInterface = dbus.Interface(bus.get_object("org.automotive.message.broker", o),"org.freedesktop.DBus.Properties") + print json.dumps(propertiesInterface.GetAll("org.automotive."+objectName), indent=2) |