Get minions salt function
Change-Id: I8270b0714f3910e71e319d26609af4ce5ab12bed
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 65c9902..e7e6a10 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -194,6 +194,18 @@
}
/**
+ * Get running minions IDs according to the target
+ * @param master Salt connection object
+ * @param target Get minions target
+ * @return list of active minions fitin
+ */
+def getMinions(master, target) {
+ def minionsRaw = runSaltCommand(master, 'local', target, 'test.ping')
+ return new ArrayList<String>(minionsRaw['return'][0].keySet())
+}
+
+
+/**
* Generates node key using key.gen_accept call
* @param master Salt connection object
* @param target Key generating target