Improve heat environment manager
- For underlay SSH, use "fixed" heat stack addresses
instead of "floating". "fixed" addresses must be
accessible from Jenkins slave node.
- do not include fuel-devops engine libraries in case if
ENV_MANAGER is not 'devops', to avoid configuring database.
- use LAB_PARAM_DEFAULTS to specify heat template "environment"
file with default parameters
- use required OS_USER_DOMAIN_NAME to initialize heat client.
- When heat stack is created, two parameters are passed into the
.hot template from heat manager:
'mcp_version': settings.MCP_VERSION
'env_name': settings.ENV_NAME
Related-task: #PROD-27687
Change-Id: I8efcdacf6f8115e5c01c144207a2cf8a4ff9fb48
diff --git a/tcp_tests/managers/envmanager_heat.py b/tcp_tests/managers/envmanager_heat.py
index 2d52e00..c5cee17 100644
--- a/tcp_tests/managers/envmanager_heat.py
+++ b/tcp_tests/managers/envmanager_heat.py
@@ -102,7 +102,7 @@
username=settings.OS_USERNAME,
password=settings.OS_PASSWORD,
project_name=settings.OS_PROJECT_NAME,
- user_domain_name='Default',
+ user_domain_name=settings.OS_USER_DOMAIN_NAME,
project_domain_name='Default')
return keystone_session.Session(auth=keystone_auth, verify=False)
@@ -210,7 +210,9 @@
pool_net = netaddr.IPNetwork(address_pool['cidr'])
if fixed in pool_net:
for role in address_pool['roles']:
- addresses[role] = floating
+ # addresses[role] = floating
+ # Use fixed addresses for SSH access
+ addresses[role] = fixed
nodes.append({
'name': heat_node.attributes['name'],
@@ -485,6 +487,10 @@
'template': template,
'files': dict(list(tpl_files.items()) + list(env_files.items())),
'environment': env,
+ 'parameters': {
+ 'mcp_version': settings.MCP_VERSION,
+ 'env_name': settings.ENV_NAME,
+ }
}
if env_files_list: