blob: e5a7b1293b6b666ad7d6851e0c8a3ed03e34e0eb [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import dbus
import json
import logging
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import error
class platform_DebugDaemonGetNetworkStatus(test.test):
version = 1
def run_once(self, *args, **kwargs):
bus = dbus.SystemBus()
proxy = bus.get_object('org.chromium.debugd', '/org/chromium/debugd')
self.iface = dbus.Interface(proxy,
result = self.iface.GetNetworkStatus()'Result: %s' % result)
networks = json.loads(result)
if 'services' not in networks or 'devices' not in networks:
raise error.TestFail('No networks found: %s' % result)