[nat64] use dbus API for NAT64 tests (#8392)

This commit is contained in:
Song GUO
2022-11-22 21:39:11 -08:00
committed by GitHub
parent afcc48edde
commit b468a25a61
4 changed files with 100 additions and 32 deletions
@@ -34,7 +34,7 @@ import sys
def main():
args = sys.argv[1:]
bus = dbus.SystemBus()
interface, method_name, arguments = args[0], args[1], args[2:]
interface, method_name, arguments = args[0], args[1], json.loads(args[2])
obj = bus.get_object('io.openthread.BorderRouter.wpan0', '/io/openthread/BorderRouter/wpan0')
iface = dbus.Interface(obj, interface)
method = getattr(iface, method_name)