+ private void resolveSvcLogicAttributes(SvcLogicContext svcLogic, String message, String status) {
+ if ("complete".equals(status)) {
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_CODE_STR, "200");
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_MSG_STR, message);
+ } else {
+ if ("running".equals(status)) {
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_CODE_STR, "202");
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_MSG_STR, "chef client runtime out");
+ } else {
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_CODE_STR, "500");
+ svcLogic.setAttribute(CHEF_SERVER_RESULT_MSG_STR, message);
+ }
+ }
+ }
+