Implemented warning message in salt state checking

Change-Id: I24905d08b54560100142d069f45667ad8f533b39
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index cc98228..af90a08 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -358,7 +358,11 @@
                                 }
 
                                 if(!resource["result"] || (resource["result"] instanceof String && resource["result"] != "true")){
-                                    common.errorMsg(String.format("Resource: %s\n%s", resKey, prettyPrint(toJson(resource)).replace('\\n', System.getProperty('line.separator'))))
+                                    if(resource["result"] != null){
+                                        common.errorMsg(String.format("Resource: %s\n%s", resKey, prettyPrint(toJson(resource)).replace('\\n', System.getProperty('line.separator'))))
+                                    }else{
+                                        common.warningMsg(String.format("Resource: %s\n%s", resKey, prettyPrint(toJson(resource)).replace('\\n', System.getProperty('line.separator'))))
+                                    }
                                 }else{
                                     if(!onlyChanges || resource.changes.size() > 0){
                                         common.successMsg(String.format("Resource: %s\n%s", resKey, prettyPrint(toJson(resource)).replace('\\n', System.getProperty('line.separator'))))