[eqv2] Shuffle gathered facilities set
Change-Id: I9cfe3e428ab287fd123b6ff40a15517da1671a6e
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 5514bf5..a96bd2d 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -1137,6 +1137,7 @@
* Function downloads metal CLI from the
* https://artifactory.mcp.mirantis.net:443/artifactory/binary-dev-kaas-local/core/bin/mirror/metal-${version}-linux
* Empty list is returned in case of no facilities with specified capacity was found or any other errors.
+* Non-empty list is shuffled.
*
* @param: facilityCount (int) Desired count of facilities
* @param: nodeCount (int) Desired count of instances
@@ -1190,6 +1191,7 @@
sh 'rm metal.yaml'
}
if (facility.size() > 0) {
+ Collections.shuffle(facility)
common.infoMsg("Selected facilities: ${facility}")
} else {
common.warningMsg('No any facilities have been selected !!! :(')