Unhardcode hardware nodes for BM-deployments
Move rebooting these nodes from pre-deploy stage to
salt-installing stage
Remove REBOOT_HW_NODES parameter from BM jenkins jobs
Related-Prod:#MOSSUST-110
Change-Id: Ie79d7e21967b90051b29201939ed0165a35d2f13
diff --git a/tcp_tests/templates/shared-maas.yaml b/tcp_tests/templates/shared-maas.yaml
index 0becf80..2066f4f 100644
--- a/tcp_tests/templates/shared-maas.yaml
+++ b/tcp_tests/templates/shared-maas.yaml
@@ -1,5 +1,23 @@
{# Collection of common macroses shared across MaaS #}
+
+{%- macro REBOOT_HW_NODES(ipmi_user, ipmi_password, ipmi_devices=['']) %}
+
+- description: Reboot hardware computes and set to PXE boot. It needs for clean deployment
+ cmd: |
+ {%- for device in ipmi_devices %}
+ ipmitool -H {{ device }} -U {{ ipmi_user }} -P {{ ipmi_password }} chassis power off
+ {%- endfor %}
+ {%- for device in ipmi_devices %}
+ ipmitool -H {{ device }} -U {{ ipmi_user }} -P {{ ipmi_password }} chassis bootdev pxe
+ {%- endfor %}
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false
+
+{%- endmacro %}
+
+
{%- macro AUTH_IN_MAAS() %}
- description: MaaS auth