Use ipv4 address for connectivity in lb integration test
You can not specify subnet for a server creation. Therefore server
nic would get ip adresses from all subnets. We should pick the
ipv4 address to check connectivity.
Also added change to NovaClientPlugin to provide ipv4 address.
Change-Id: I2eb3bdb359aca0cfaebf0be98db79170c681a078
Closes-Bug: #1450293
diff --git a/common/test.py b/common/test.py
index 0f8442b..f772c84 100644
--- a/common/test.py
+++ b/common/test.py
@@ -178,6 +178,11 @@
if subnet_info['subnet']['ip_version'] == ip_version:
return subnet_id
+ def _get_server_ip_by_version(self, addresses, ip_version=4):
+ for address in addresses:
+ if address['version'] == ip_version:
+ return address['addr']
+
@staticmethod
def _stack_output(stack, output_key):
"""Return a stack output value for a given key."""