Aviv Keshet | 5ab8b69 | 2013-05-07 14:03:14 -0700 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | import common |
| 7 | import autotest_lib.server.frontend as frontend |
Aviv Keshet | 5ab8b69 | 2013-05-07 14:03:14 -0700 | [diff] [blame] | 8 | from autotest_lib.frontend.afe import rpc_interface |
| 9 | |
| 10 | class directAFE(frontend.AFE): |
| 11 | """ |
| 12 | A wrapper for frontend.AFE which exposes all of the AFE |
Allen Li | cdd00f2 | 2017-02-01 18:01:52 -0800 | [diff] [blame] | 13 | functionality, but makes direct calls to rpc_interface rather than |
| 14 | making RPC calls to an RPC server. |
Aviv Keshet | 5ab8b69 | 2013-05-07 14:03:14 -0700 | [diff] [blame] | 15 | """ |
| 16 | def run(self, call, **dargs): |
Allen Li | 046a14f | 2017-02-02 12:57:31 -0800 | [diff] [blame^] | 17 | func = rpc_interface.__getattribute__(call) |
Allen Li | cdd00f2 | 2017-02-01 18:01:52 -0800 | [diff] [blame] | 18 | return func(**dargs) |