Allow kwargs in get_server_ip
As a part of the scenario/manager.py stabilization tracked by
the below BP the patch adds kwargs argument for get_server_ip
method so that the consumers are able to pass additional
parameters if needed.
Change-Id: I5741e16a8f2eac885d957d216a71b639e80775a8
Implements: blueprint tempest-scenario-manager-stable
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index ff860d5..b12c351 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -865,18 +865,22 @@
ssh_client.exec_command('sudo umount %s' % mount_path)
return timestamp
- def get_server_ip(self, server):
+ def get_server_ip(self, server, **kwargs):
"""Get the server fixed or floating IP.
Based on the configuration we're in, return a correct ip
address for validating that a guest is up.
+
+ If CONF.validation.connect_method is floating, then
+ a floating ip will be created passing kwargs as additional
+ argument.
"""
if CONF.validation.connect_method == 'floating':
# The tests calling this method don't have a floating IP
# and can't make use of the validation resources. So the
# method is creating the floating IP there.
- return self.create_floating_ip(server)['ip']
+ return self.create_floating_ip(server, **kwargs)['ip']
elif CONF.validation.connect_method == 'fixed':
# Determine the network name to look for based on config or creds
# provider network resources.