Fix runtestmanager and update bm
update bm:
add params to contex;
move runtest role to cfg
Add designate support to runtestmanager
Change-Id: I1051afe091d68264492a622b89d95828c47dfb61
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index a354d01..a45663b 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -59,10 +59,9 @@
@property
def target_name(self):
if not self.__target_name:
- result = self.salt_api.get_pillar(
+ target_host = self.__salt_api.get_single_pillar(
tgt=self.master_name,
pillar="runtest:tempest:test_target")
- target_host = (result[0].get(self.master_name))
if target_host[-1] == "*":
target_host = target_host[:-1]
self.__target_name = self.underlay.get_target_node_names(
@@ -104,6 +103,10 @@
def prepare(self):
salt_call_cmd = "salt-call -l info --hard-crash --state-output=mixed "
+ barbican_integration = self.__salt_api.get_single_pillar(
+ tgt="I@barbican:client and ctl*",
+ pillar="_param:barbican_integration_enabled")
+ LOG.info("barbican_integration: {}".format(barbican_integration))
commands = [
{
'description': ("Install docker-ce package and "
@@ -125,6 +128,20 @@
"salt-run state.orchestrate " +
"runtest.orchestrate.tempest")},
]
+
+ if barbican_integration == 'True':
+ commands.append({
+ 'description': "Configure barbican",
+ 'node_name': self.master_name,
+ 'cmd': ("set -ex;" +
+ salt_call_cmd +
+ " state.sls barbican.client && " +
+ salt_call_cmd +
+ " state.sls runtest.test_accounts && " +
+ salt_call_cmd +
+ " state.sls runtest.barbican_sign_image")},
+ )
+
self.__salt_api.execute_commands(commands=commands,
label="Prepare for Tempest")
@@ -134,6 +151,7 @@
docker_args = (
" -t "
+ " --net host "
" --name {container_name} "
" -e ARGS=\"-r {tempest_pattern} -w {tempest_threads}\""
" -v {cfg_dir}/tempest.conf:/etc/tempest/tempest.conf"