1# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import dbus
6import logging
7
8from autotest_lib.client.bin import test
9
10class platform_DebugDaemonGetRoutes(test.test):
11    """Checks that the debugd GetRoutes function is working."""
12    version = 1
13
14    def run_once(self, *args, **kwargs):
15        bus = dbus.SystemBus()
16        proxy = bus.get_object('org.chromium.debugd', '/org/chromium/debugd')
17        self.iface = dbus.Interface(proxy,
18                                    dbus_interface='org.chromium.debugd')
19        ip4_routes = self.iface.GetRoutes({})
20        logging.debug('IP4 Routes: %s', ip4_routes)
21        ip6_routes = self.iface.GetRoutes({'v6': True})
22        logging.debug('IP6 Routes: %s', ip6_routes)
23