Add missed formulas into pre-install
* maas
* jenkins
* glusterfs
* backupninja
Change-Id: Id334dc6ae78d0aaa6a14f7352a4ff7eef7b988b8
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
index 9f6b678..c5681be 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
@@ -21,6 +21,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}