History log of /system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a62e235646ec19bee71e8dbee5208282dcd13b5 20-Jan-2016 Alex Vakulenko <avakulenko@google.com> shill: Update libchrome APIs to r369476

The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: Ib4c4b5438a2e249777c9c1b6509f085ad5d00049
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
da0b0a7dee2dff8bbb7d79a09e4410644b6ac503 05-Nov-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Remove assertion in |GetMatchingProxy|

As we iterate through the list of proxies in |GetMatchingProxy|, Shill
might delete the objects corresponding to some of the proxies in this
list. So, ignore such "unknown object" errors when we invoke
|GetProperties| on the proxy.

BUG: 25496755
TEST: mmm system/connectivity/shill

Change-Id: I6284eecf4974e0f0038311402e89bd3abbd685f9
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
0ad14af1781762bfff5feccdbacd79911ce7da9c 05-Nov-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Convert all time values to milliseconds

The existing Cros python XML RPC server passes timeout/elapsed
values in fractional seconds. So, let ProxyRpcServer interface
convert these incoming/outgoing fractional seconds to integer
milliseconds and pass them to the internal API's.

Related changes:
1. This requires the use of base::Time instead of time_t to
get millisecond granularity .
2. Move all the timeout/elapsed param types to |long| from |int|.

BUG: 25494944
TEST: mmm system/connectivity/shill

Change-Id: Id7320898de2b709d8e04353d0b2c0a988d2f0c54
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
5a93aaa6f32c3dc5eb15594f5caf54c6cb34276c 14-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Add a few more dbus helper functions.

Add a few more dbus helper functions to invoke ManagerProxy dbus
methods:
1. GetServiceOrder
2. SetServiceOrder
3. SetSchedScan

While there:
1. Change the return in |ConfigureService| functions to just return a
bool indicating whether the configuration succeeded or not. Creating the
proxy for the newly created service can be done separately.
2. Remove the #ifdef ANDROID conditional include in test-proxy since
this is anyway only going to be compiled for brillo.

Bug: 24335496
Change-Id: I4d687484362290ca62697b6a15d60101d7db82ae
Test: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
ee39bfa925600a2153d5c5c68c503cb22ed7d3fc 20-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Implement wait for a given service.

Add a helper function to wait for a service proxy matching the specified
properties. Uses the message loop to block the calling function until
the specified service is found, or if timeout occurs.
The caller specifies a rescan interval which is used by the
function to schedule periodic checks for the existence of the specified
service. The helper function triggers a rescan of the specified
technology if it doesn't find the service after each rescan interval.

Bug: 24335496
Change-Id: I30a43869a9295de176455b9d3d587d032f91a5ae
Test: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
02244d42e5f6a195a41984cf40346a1b07b4c9a0 20-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Implement wait for a property state.

Create a generic templated function to wait for a property to
change to one of the specified set of values on a given proxy.
Uses the message loop to block the calling function until the Dbus
signal callback indicates that the property value is in
one of the expected states, or until a timeout occurs.

Related Changes:
a. Create a generic |WaitForEvent| function to wait for any event to
occur within the provided timeout.
b. Move the Dbus callback functions to free standing ones from
member functions.
c. Remove the |ComparePropertyValueIn| function and use
|GetProxyPropertyValue| instead.

Bug: 24335496
Change-Id: Ia36d7226bc91a2a1041916ff557ff61beacf4baa
Test: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
ae0da94cb8a611a7c0b58b78778d2cf85ab918e9 10-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Create templated functions for Proxies.

1. Implement a generic templated function to fetch all the properties
from a given proxy.
2. Implement a generic templated function to fetch proxy objects.
The object paths are retrived from the properties of the ManagerProxy
object held by ProxyDbusClient.
3. Implement the GetMatchingProxy functions using the above new
functions.

While there:
a. Move all the private member definitions to the bottom of the file.

Bug: 24335496
Change-Id: I1584a3c96f437374126ad04a7c1a48d0140b4c09
Test: mmm system/connectivity/shill/test-rpc-proxyPlease enter the commit message for your changes. Lines starting
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
03e6719bae1e0903d94853b896673a033196bcf5 13-Oct-2015 Alex Vakulenko <avakulenko@google.com> shill: Rename "chromeos" -> "brillo" in include paths and namespaces

libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.

Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard

Change-Id: I804311e49ee780ca96e05f6a581e8c95709d4e1d
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
fa07c8685b2647752cdbb637793e24893c92ab0b 09-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Fix some style issues in ProxyDbusClient.

1. Change all the function signatures to accept const ref input params
and pointers for output paramas.
2. Remove all inline function definitions from the .h file.
3. Add a typedef for the proxies exposed by Shill via Dbus.
4. Change the proxy pointers returned to the caller be unique_ptr's.
5. Reorder the member variables to be after function declaration in the
header.
6. Change couple of vector initializations to remove unneccessary
insertions after declaring.

Bug: 24335496
Change-Id: Ie34a635f0829f0977166dd8f529e2a44c2f00403
Test: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
28491fa4e8c3988c8797c542e1de0adfac120456 02-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Make test-proxy single threaded.

The test proxy should process RPC requests sequentially and
synchronously. So, there is no need for the proxy to be multi-threaded
and add the overhead of synchronizing the 2 threads. The RPC server
holds the pointer to a single instance of the ShillWifiClient and uses it
to execute the dbus commands needed to process an RPC request.

While there:
1. Include the correct chromeos_variants.h header instead of
chromeos_any.h in the ProxyShillWifiClient.
2. Change all instance of |timeout_in_seconds| to |timeout_seconds| in
function params to be consistent.

Bug: 24335496
Change-Id: Ice574f946e127ab670a0dee575a4467cf9ca8b51
TEST: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
5c01b468e7dc6bfd74928bbd5e9726df374fd252 01-Oct-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Create a shill client interface (2/3).

Dbus specific implementation of the Shill interface.

ProxyDbusShillWifiClient: This is the dbus implementation of the Shill
interface. Some methods like PushProfile, etc has been implemented.
The rest are TODO's.
ProxyDbusClient: This class defines the low level client interaction
with Shill using dbus and the corresponding proxy objects.

This is the native versions of the shill_proxy.py & wifi_client.py
python proxies used in the existing shill autotest XML RPC server.

Bug: 24335496
Change-Id: I68a07552b3d837e10d7d65f43b8a61c874b74f28
TEST: mmm system/connectivity/shill/test-rpc-proxy
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc
56c269a533910c37123ed0b37c0f5e5ee3c47e26 26-Sep-2015 Roshan Pius <rpius@google.com> shill-test-proxy: Create Test Proxy daemon

Initial CL to create a skeletal framework for testing Shill via external
RPC calls on Brillo platforms.

There are 2 threads running on the daemon:
1. Main chromeos-dbus thread which runs the message loop and is used for
sending dbus commands to Shill.
2. RPC Server thread which blocks indefinitely waiting for external RPC
requests and dispatches tasks to run in the main chromeos-dbus thread.

The current implementation just uses the shill/setup_wifi code to
connect/disconnect to a given wifi ssid when we receive the ConnectWifi/
DisconnectWifi RPC requests.

BUG: 24335496
TEST: Compilation of the proxy is succcessful.

Change-Id: I964aaae88323a0b6963497152c6dd09d4015312d
/system/connectivity/shill/test-rpc-proxy/proxy_dbus_client.cc