Fix usage of SaltStack batch.
Change-Id: Icf351c071ca780b673e943efa6f8a17fb4ed680e
Related: PROD-21259
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 6ddac8a..52c7a14 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -64,9 +64,13 @@
'client': client,
'expr_form': target.type,
]
- if(batch != null && ( (batch instanceof Integer && batch > 0) || (batch instanceof String && batch.contains("%")))){
- data['client']= "local_batch"
- data['batch'] = batch
+
+ if(batch != null){
+ batch = batch.toString()
+ if( (batch.isInteger() && batch.toInteger() > 0) || (batch.contains("%"))){
+ data['client']= "local_batch"
+ data['batch'] = batch
+ }
}
if (args) {
@@ -733,6 +737,8 @@
def resKey;
if(node instanceof Map){
resKey = node.keySet()[k]
+ if (resKey == "retcode")
+ continue
}else if(node instanceof List){
resKey = k
}