diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-01-05 06:59:20 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-01-05 06:59:20 -0800 |
commit | f33303b557c1c12313c42372fdd173c4e69ddef0 (patch) | |
tree | 1191ef752ba20b221a57043100e8bf6bbfbd9286 /test | |
parent | f2af98906f063a65f2933e6133a293c344a1f011 (diff) | |
download | connman-f33303b557c1c12313c42372fdd173c4e69ddef0.tar.gz connman-f33303b557c1c12313c42372fdd173c4e69ddef0.tar.bz2 connman-f33303b557c1c12313c42372fdd173c4e69ddef0.zip |
Add support for exporting basic interface statistics
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-counter | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test-counter b/test/test-counter index b0173a4a..d000a8d0 100755 --- a/test/test-counter +++ b/test/test-counter @@ -14,9 +14,11 @@ class Counter(dbus.service.Object): mainloop.quit() @dbus.service.method("org.moblin.connman.Counter", - in_signature='', out_signature='') - def Usage(self): - print("Usage") + in_signature='a{sv}', out_signature='') + def Usage(self, stats): + for key in stats.keys(): + val = int(stats[key]) + print "%s = %s" % (key, val) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) |