Adding orchestration methods
New methods were added to be able to run orchestration
states like "salt-run state.orchestrate ${app}.orchestrate.deploy".
Moreover methods added to get configuration data from salt
Change-Id: Ia43f5871628b5a55099c5142cc9b29ae481d00a4
Related-PROD: PROD-19972
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 9a82fbe..7ad1834 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -539,3 +539,14 @@
}
return userInput
}
+
+/**
+ * Function receives Map variable as input and sorts it
+ * by values ascending. Returns sorted Map
+ * @param _map Map variable
+ */
+@NonCPS
+def SortMapByValueAsc(_map) {
+ def sortedMap = _map.sort {it.value}
+ return sortedMap
+}