Fixed working with keys in salt print result
Change-Id: I53f4f65b0cc1596fe370207cd1894e55466d420d
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 7e56aad..d9e080f 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -313,12 +313,13 @@
out[nodeKey] = [:]
for (int k=0; k<node.size(); k++) {
def resource;
+ def resKey;
if(node instanceof Map){
- def resKey = node.keySet()[k]
- resource = node[resKey]
+ resKey = node.keySet()[k]
}else if(node instanceof List){
- resource = node[k]
+ resKey=k
}
+ resource = node[resKey]
if (resource instanceof String) {
//ORIGINAL??out[node.key] = node.value
out[nodeKey] = resource