Add if condition for nova resources
To cover situation when we do not have nova.client pillar
move this state execution under if
Change-Id: Icd03783a1afa4bdf03b00bf579346f1f6ba2e2c5
diff --git a/tcp_tests/templates/shared-openstack.yaml b/tcp_tests/templates/shared-openstack.yaml
index e758f80..699aed8 100644
--- a/tcp_tests/templates/shared-openstack.yaml
+++ b/tcp_tests/templates/shared-openstack.yaml
@@ -133,8 +133,10 @@
skip_fail: false
- description: Create nova resources
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False
- -C "I@nova:client" state.sls nova.client
+ cmd: |
+ if salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@nova:client' match.pillar 'I@nova:client' ; then
+ salt --hard-crash --state-output=mixed --state-verbose=False -C "I@nova:client" state.sls nova.client
+ fi
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false