Update underlay ssh host by VCP hodes
Change-Id: I6125db762a0974143a2454b288d3a42e9b6c5829
diff --git a/tcp_tests/fixtures/salt_fixtures.py b/tcp_tests/fixtures/salt_fixtures.py
index 52749bb..d72b1fc 100644
--- a/tcp_tests/fixtures/salt_fixtures.py
+++ b/tcp_tests/fixtures/salt_fixtures.py
@@ -63,7 +63,6 @@
# Create Salt cluster
if config.salt.salt_master_host == '0.0.0.0':
# Temporary workaround. Underlay should be extended with roles
- salt_nodes = underlay.node_names()
config.salt.salt_master_host = \
underlay.host_by_node_role(
node_role=ext.UNDERLAY_NODE_ROLES.salt_master)
@@ -71,6 +70,13 @@
commands = underlay.read_template(config.salt_deploy.salt_steps_path)
LOG.info("############ Executing command ####### {0}".format(commands))
salt_actions.install(commands)
+
+ salt_nodes = salt_actions.get_ssh_data()
+ config.underlay.ssh = config.underlay.ssh + \
+ [node for node in salt_nodes
+ if not any(node['node_name'] == n['node_name']
+ for n in config.underlay.ssh)]
+
hardware.create_snapshot(ext.SNAPSHOT.salt_deployed)
else: