Merge "Add description to parameters in the remaining controllers"
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / controllers / PolicyController.java
index 7cc042c..d2ae0e0 100644 (file)
@@ -286,6 +286,7 @@ public class PolicyController {
             RejectionException e = new RejectionException("Policy cannot change RIC, policyId: " + current.id() + //
                 ", RIC name: " + current.ric().name() + //
                 ", new name: " + policy.ric().name(), HttpStatus.CONFLICT);
+            logger.debug("Request rejected, {}", e.getMessage());
             return Mono.error(e);
         }
         return Mono.just("OK");
@@ -293,6 +294,7 @@ public class PolicyController {
 
     private Mono<Object> checkSupportedType(Ric ric, PolicyType type) {
         if (!ric.isSupportingType(type.name())) {
+            logger.debug("Request rejected, type not supported, RIC: {}", ric);
             RejectionException e = new RejectionException(
                 "Type: " + type.name() + " not supported by RIC: " + ric.name(), HttpStatus.NOT_FOUND);
             return Mono.error(e);
@@ -304,6 +306,7 @@ public class PolicyController {
         if (ric.getState() == Ric.RicState.AVAILABLE) {
             return Mono.just("OK");
         } else {
+            logger.debug("Request rejected RIC not IDLE, ric: {}", ric);
             RejectionException e = new RejectionException(
                 "Ric is not operational, RIC name: " + ric.name() + ", state: " + ric.getState(), HttpStatus.LOCKED);
             return Mono.error(e);