Retrieve IPv4 and IPv6 addresses for client and server device in test setup
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: Icba82832fa1840ea1a3299f61027666d4dd90d46
diff --git a/staticlibs/testutils/host/python/apf_test_base.py b/staticlibs/testutils/host/python/apf_test_base.py
index 83b5f86..2552aa3 100644
--- a/staticlibs/testutils/host/python/apf_test_base.py
+++ b/staticlibs/testutils/host/python/apf_test_base.py
@@ -39,6 +39,7 @@
)
# Fetch device properties and storing them locally for later use.
+ # TODO: refactor to separate instances to store client and server device
self.server_iface_name, client_network = (
tether_utils.setup_hotspot_and_client_for_upstream_type(
self.serverDevice, self.clientDevice, UpstreamType.NONE
@@ -50,6 +51,21 @@
self.server_mac_address = apf_utils.get_hardware_address(
self.serverDevice, self.server_iface_name
)
+ self.client_mac_address = apf_utils.get_hardware_address(
+ self.clientDevice, self.client_iface_name
+ )
+ self.server_ipv4_addresses = apf_utils.get_ipv4_addresses(
+ self.serverDevice, self.server_iface_name
+ )
+ self.client_ipv4_addresses = apf_utils.get_ipv4_addresses(
+ self.clientDevice, self.client_iface_name
+ )
+ self.server_ipv6_addresses = apf_utils.get_ipv6_addresses(
+ self.serverDevice, self.server_iface_name
+ )
+ self.client_ipv6_addresses = apf_utils.get_ipv6_addresses(
+ self.clientDevice, self.client_iface_name
+ )
# Enable doze mode to activate APF.
adb_utils.set_doze_mode(self.clientDevice, True)