Speed up tests on policy-api
[policy/api.git] / main / src / main / java / org / onap / policy / api / main / rest / ApiRestController.java
index 67baa8a..6d6b4d1 100644 (file)
@@ -36,9 +36,11 @@ import io.swagger.annotations.Info;
 import io.swagger.annotations.ResponseHeader;\r
 import io.swagger.annotations.SecurityDefinition;\r
 import io.swagger.annotations.SwaggerDefinition;\r
+\r
 import java.util.List;\r
 import java.util.Map;\r
 import java.util.UUID;\r
+\r
 import javax.ws.rs.Consumes;\r
 import javax.ws.rs.DELETE;\r
 import javax.ws.rs.GET;\r
@@ -48,6 +50,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;\r
 import javax.ws.rs.Produces;\r
 import javax.ws.rs.core.Response;\r
+\r
 import org.apache.commons.lang3.tuple.Pair;\r
 import org.onap.policy.api.main.rest.provider.HealthCheckProvider;\r
 import org.onap.policy.api.main.rest.provider.PolicyProvider;\r
@@ -75,22 +78,17 @@ import org.slf4j.LoggerFactory;
 @Consumes({"application/json", "application/yaml"})\r
 @SwaggerDefinition(info = @Info(\r
         description = "Policy Design API is publicly exposed for clients to Create/Read/Update/Delete"\r
-                    + " policy types, policy type implementation and policies which can be recognized"\r
-                    + " and executable by incorporated policy engines. It is an"\r
-                    + " independent component running rest service that takes all policy design API calls"\r
-                    + " from clients and then assign them to different API working functions. Besides"\r
-                    + " that, API is also exposed for clients to retrieve healthcheck status of this API"\r
-                    + " rest service and the statistics report including the counters of API invocation.",\r
-        version = "1.0.0",\r
-        title = "Policy Design",\r
-        extensions = {\r
-                @Extension(properties = {\r
-                        @ExtensionProperty(name = "planned-retirement-date", value = "tbd"),\r
-                        @ExtensionProperty(name = "component", value = "Policy Framework")\r
-                })\r
-        }),\r
-        schemes = { SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS },\r
-        securityDefinition = @SecurityDefinition(basicAuthDefinitions = { @BasicAuthDefinition(key = "basicAuth") }))\r
+                + " policy types, policy type implementation and policies which can be recognized"\r
+                + " and executable by incorporated policy engines. It is an"\r
+                + " independent component running rest service that takes all policy design API calls"\r
+                + " from clients and then assign them to different API working functions. Besides"\r
+                + " that, API is also exposed for clients to retrieve healthcheck status of this API"\r
+                + " rest service and the statistics report including the counters of API invocation.",\r
+        version = "1.0.0", title = "Policy Design",\r
+        extensions = {@Extension(properties = {@ExtensionProperty(name = "planned-retirement-date", value = "tbd"),\r
+            @ExtensionProperty(name = "component", value = "Policy Framework")})}),\r
+        schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},\r
+        securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))\r
 public class ApiRestController extends CommonRestController {\r
 \r
     private static final Logger LOGGER = LoggerFactory.getLogger(ApiRestController.class);\r
@@ -102,39 +100,29 @@ public class ApiRestController extends CommonRestController {
      */\r
     @GET\r
     @Path("/healthcheck")\r
-    @ApiOperation(value = "Perform a system healthcheck",\r
-            notes = "Returns healthy status of the Policy API component",\r
+    @ApiOperation(value = "Perform a system healthcheck", notes = "Returns healthy status of the Policy API component",\r
             response = HealthCheckReport.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "HealthCheck", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"HealthCheck",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getHealthCheck(\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
@@ -153,37 +141,28 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns current statistics including the counters of API invocation",\r
             response = StatisticsReport.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Statistics", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
-    public Response getStatistics(\r
-            @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Statistics",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
+    public Response\r
+            getStatistics(@HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         updateApiStatisticsCounter(Target.OTHER, Result.SUCCESS, HttpMethod.GET);\r
 \r
@@ -201,35 +180,26 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns a list of existing policy types stored in Policy Framework",\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getAllPolicyTypes(\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
@@ -238,7 +208,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes", pfme);\r
+            LOGGER.debug("GET /policytypes", pfme);\r
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -257,36 +227,27 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns a list of all available versions for the specified policy type",\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getAllVersionsOfPolicyType(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
@@ -296,7 +257,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}", policyTypeId, pfme);\r
+            LOGGER.debug("GET /policytypes/{}", policyTypeId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -313,39 +274,29 @@ public class ApiRestController extends CommonRestController {
     @GET\r
     @Path("/policytypes/{policyTypeId}/versions/{versionId}")\r
     @ApiOperation(value = "Retrieve one particular version of a policy type",\r
-            notes = "Returns a particular version for the specified policy type",\r
-            response = ToscaServiceTemplate.class,\r
+            notes = "Returns a particular version for the specified policy type", response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getSpecificVersionOfPolicyType(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
             @PathParam("versionId") @ApiParam(value = "Version of policy type", required = true) String versionId,\r
@@ -356,7 +307,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/{}", policyTypeId, versionId, pfme);\r
+            LOGGER.debug("GET /policytypes/{}/versions/{}", policyTypeId, versionId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -372,39 +323,29 @@ public class ApiRestController extends CommonRestController {
     @GET\r
     @Path("/policytypes/{policyTypeId}/versions/latest")\r
     @ApiOperation(value = "Retrieve latest version of a policy type",\r
-            notes = "Returns latest version for the specified policy type",\r
-            response = ToscaServiceTemplate.class,\r
+            notes = "Returns latest version for the specified policy type", response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getLatestVersionOfPolicyType(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
@@ -414,7 +355,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/latest", policyTypeId, pfme);\r
+            LOGGER.debug("GET /policytypes/{}/versions/latest", policyTypeId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -429,40 +370,30 @@ public class ApiRestController extends CommonRestController {
      */\r
     @POST\r
     @Path("/policytypes")\r
-    @ApiOperation(value = "Create a new policy type",\r
-            notes = "Client should provide TOSCA body of the new policy type",\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
+    @ApiOperation(value = "Create a new policy type", notes = "Client should provide TOSCA body of the new policy type",\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 400, message = "Invalid Body"),\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid Body"),\r
+        @ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response createPolicyType(\r
             @ApiParam(value = "Entity body of policy type", required = true) ToscaServiceTemplate body,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
@@ -476,7 +407,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.SUCCESS, HttpMethod.POST);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("POST /policytypes", pfme);\r
+            LOGGER.debug("POST /policytypes", pfme);\r
             updateApiStatisticsCounter(Target.POLICY_TYPE, Result.FAILURE, HttpMethod.POST);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -494,41 +425,32 @@ public class ApiRestController extends CommonRestController {
     @Path("/policytypes/{policyTypeId}/versions/{versionId}")\r
     @ApiOperation(value = "Delete one version of a policy type",\r
             notes = "Rule 1: pre-defined policy types cannot be deleted;"\r
-                  + "Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted."\r
-                  + "The parameterizing TOSCA policies must be deleted first;",\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "PolicyType", },\r
+                    + "Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted."\r
+                    + "The parameterizing TOSCA policies must be deleted first;",\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"PolicyType",},\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response deleteSpecificVersionOfPolicyType(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
             @PathParam("versionId") @ApiParam(value = "Version of policy type", required = true) String versionId,\r
@@ -538,7 +460,7 @@ public class ApiRestController extends CommonRestController {
             ToscaServiceTemplate serviceTemplate = policyTypeProvider.deletePolicyType(policyTypeId, versionId);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("DELETE /policytypes/{}/versions/{}", policyTypeId, versionId, pfme);\r
+            LOGGER.debug("DELETE /policytypes/{}/versions/{}", policyTypeId, versionId, pfme);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
     }\r
@@ -557,40 +479,31 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns a list of all versions of specified policy created for the specified policy type version",\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getAllPolicies(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
@@ -599,7 +512,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/{}/policies", policyTypeId, policyTypeVersion, pfme);\r
+            LOGGER.debug("GET /policytypes/{}/versions/{}/policies", policyTypeId, policyTypeVersion, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -620,51 +533,41 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns a list of all version details of the specified policy",\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getAllVersionsOfPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
-            ToscaServiceTemplate serviceTemplate = policyProvider\r
-                    .fetchPolicies(policyTypeId, policyTypeVersion, policyId, null);\r
+            ToscaServiceTemplate serviceTemplate =\r
+                    policyProvider.fetchPolicies(policyTypeId, policyTypeVersion, policyId, null);\r
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("/policytypes/{}/versions/{}/policies/{}", policyTypeId, policyTypeVersion, policyId,\r
-                    pfme);\r
+            LOGGER.debug("/policytypes/{}/versions/{}/policies/{}", policyTypeId, policyTypeVersion, policyId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -686,52 +589,43 @@ public class ApiRestController extends CommonRestController {
             notes = "Returns a particular version of specified policy created for the specified policy type version",\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getSpecificVersionOfPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,\r
             @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
-            ToscaServiceTemplate serviceTemplate = policyProvider\r
-                    .fetchPolicies(policyTypeId, policyTypeVersion, policyId, policyVersion);\r
+            ToscaServiceTemplate serviceTemplate =\r
+                    policyProvider.fetchPolicies(policyTypeId, policyTypeVersion, policyId, policyVersion);\r
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/{}/policies/{}/versions/{}", policyTypeId,\r
-                    policyTypeVersion, policyId, policyVersion, pfme);\r
+            LOGGER.debug("GET /policytypes/{}/versions/{}/policies/{}/versions/{}", policyTypeId, policyTypeVersion,\r
+                    policyId, policyVersion, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -749,43 +643,33 @@ public class ApiRestController extends CommonRestController {
     @GET\r
     @Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest")\r
     @ApiOperation(value = "Retrieve the latest version of a particular policy",\r
-            notes = "Returns the latest version of specified policy",\r
-            response = ToscaServiceTemplate.class,\r
+            notes = "Returns the latest version of specified policy", response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getLatestVersionOfPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
@@ -795,8 +679,8 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/{}/policies/{}/versions/latest", policyTypeId,\r
-                    policyTypeVersion, policyId, pfme);\r
+            LOGGER.debug("GET /policytypes/{}/versions/{}/policies/{}/versions/latest", policyTypeId, policyTypeVersion,\r
+                    policyId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -814,53 +698,44 @@ public class ApiRestController extends CommonRestController {
     @GET\r
     @Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/deployed")\r
     @ApiOperation(value = "Retrieve deployed versions of a particular policy in pdp groups",\r
-            notes = "Returns deployed versions of specified policy in pdp groups",\r
-            response = ToscaPolicy.class, responseContainer = "List",\r
+            notes = "Returns deployed versions of specified policy in pdp groups", response = ToscaPolicy.class,\r
+            responseContainer = "List",\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response getDeployedVersionsOfPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
-            Map<Pair<String, String>, List<ToscaPolicy>> deployedPolicies = policyProvider\r
-                    .fetchDeployedPolicies(policyTypeId, policyTypeVersion, policyId);\r
+            Map<Pair<String, String>, List<ToscaPolicy>> deployedPolicies =\r
+                    policyProvider.fetchDeployedPolicies(policyTypeId, policyTypeVersion, policyId);\r
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.GET);\r
             return makeOkResponse(requestId, deployedPolicies);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("GET /policytypes/{}/versions/{}/policies/{}/versions/deployed", policyTypeId,\r
+            LOGGER.debug("GET /policytypes/{}/versions/{}/policies/{}/versions/deployed", policyTypeId,\r
                     policyTypeVersion, policyId, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.GET);\r
             return makeErrorResponse(requestId, pfme);\r
@@ -880,59 +755,48 @@ public class ApiRestController extends CommonRestController {
     @Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies")\r
     @ApiOperation(value = "Create a new policy for a policy type version",\r
             notes = "Client should provide TOSCA body of the new policy",\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 400, message = "Invalid Body"),\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid Body"),\r
+        @ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response createPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "ID of policy type", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,\r
             @ApiParam(value = "Entity body of policy", required = true) ToscaServiceTemplate body) {\r
 \r
         if (NetLoggerUtil.getNetworkLogger().isInfoEnabled()) {\r
             NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST,\r
-                            "/policytypes/" + policyTypeId + "/versions/" + policyTypeVersion + "/policies",\r
-                            toJson(body));\r
+                    "/policytypes/" + policyTypeId + "/versions/" + policyTypeVersion + "/policies", toJson(body));\r
         }\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
-            ToscaServiceTemplate serviceTemplate = policyProvider\r
-                    .createPolicy(policyTypeId, policyTypeVersion, body);\r
+            ToscaServiceTemplate serviceTemplate = policyProvider.createPolicy(policyTypeId, policyTypeVersion, body);\r
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.POST);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("POST /policytypes/{}/versions/{}/policies", policyTypeId, policyTypeVersion, pfme);\r
+            LOGGER.debug("POST /policytypes/{}/versions/{}/policies", policyTypeId, policyTypeVersion, pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.POST);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -949,39 +813,30 @@ public class ApiRestController extends CommonRestController {
     @Path("/policies")\r
     @ApiOperation(value = "Create one or more new policies",\r
             notes = "Client should provide TOSCA body of the new polic(ies)",\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "El Alto")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 400, message = "Invalid Body"),\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "El Alto")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid Body"),\r
+        @ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response createPolicies(\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,\r
             @ApiParam(value = "Entity body of policy", required = true) ToscaServiceTemplate body) {\r
@@ -995,7 +850,7 @@ public class ApiRestController extends CommonRestController {
             updateApiStatisticsCounter(Target.POLICY, Result.SUCCESS, HttpMethod.POST);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("POST /policies", pfme);\r
+            LOGGER.debug("POST /policies", pfme);\r
             updateApiStatisticsCounter(Target.POLICY, Result.FAILURE, HttpMethod.POST);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
@@ -1015,68 +870,63 @@ public class ApiRestController extends CommonRestController {
     @Path("/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}")\r
     @ApiOperation(value = "Delete a particular version of a policy",\r
             notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",\r
-            authorizations = @Authorization(value = "basicAuth"),\r
-            tags = { "Policy", },\r
+            authorizations = @Authorization(value = "basicAuth"), tags = {"Policy",},\r
             response = ToscaServiceTemplate.class,\r
             responseHeaders = {\r
-                    @ResponseHeader(name = "X-MinorVersion",\r
-                                    description = "Used to request or communicate a MINOR version back from the client"\r
-                                                + " to the server, and from the server back to the client",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-PatchVersion",\r
-                                    description = "Used only to communicate a PATCH version in a response for"\r
-                                                + " troubleshooting purposes only, and will not be provided by"\r
-                                                + " the client on request",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-LatestVersion",\r
-                                    description = "Used only to communicate an API's latest version",\r
-                                    response = String.class),\r
-                    @ResponseHeader(name = "X-ONAP-RequestID",\r
-                                    description = "Used to track REST transactions for logging purpose",\r
-                                    response = UUID.class)\r
-            },\r
-            extensions = {\r
-                    @Extension(name = "interface info", properties = {\r
-                            @ExtensionProperty(name = "api-version", value = "1.0.0"),\r
-                            @ExtensionProperty(name = "last-mod-release", value = "Dublin")\r
-                    })\r
-            })\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = 401, message = "Authentication Error"),\r
-            @ApiResponse(code = 403, message = "Authorization Error"),\r
-            @ApiResponse(code = 404, message = "Resource Not Found"),\r
-            @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),\r
-            @ApiResponse(code = 500, message = "Internal Server Error")\r
-        })\r
+                @ResponseHeader(name = "X-MinorVersion",\r
+                        description = "Used to request or communicate a MINOR version back from the client"\r
+                                + " to the server, and from the server back to the client",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-PatchVersion",\r
+                        description = "Used only to communicate a PATCH version in a response for"\r
+                                + " troubleshooting purposes only, and will not be provided by"\r
+                                + " the client on request",\r
+                        response = String.class),\r
+                @ResponseHeader(name = "X-LatestVersion",\r
+                        description = "Used only to communicate an API's latest version", response = String.class),\r
+                @ResponseHeader(name = "X-ONAP-RequestID",\r
+                        description = "Used to track REST transactions for logging purpose", response = UUID.class)},\r
+            extensions = {@Extension(name = "interface info",\r
+                    properties = {@ExtensionProperty(name = "api-version", value = "1.0.0"),\r
+                        @ExtensionProperty(name = "last-mod-release", value = "Dublin")})})\r
+    @ApiResponses(value = {@ApiResponse(code = 401, message = "Authentication Error"),\r
+        @ApiResponse(code = 403, message = "Authorization Error"),\r
+        @ApiResponse(code = 404, message = "Resource Not Found"),\r
+        @ApiResponse(code = 409, message = "Delete Conflict, Rule Violation"),\r
+        @ApiResponse(code = 500, message = "Internal Server Error")})\r
     public Response deleteSpecificVersionOfPolicy(\r
             @PathParam("policyTypeId") @ApiParam(value = "PolicyType ID", required = true) String policyTypeId,\r
-            @PathParam("policyTypeVersion")\r
-                @ApiParam(value = "Version of policy type", required = true) String policyTypeVersion,\r
+            @PathParam("policyTypeVersion") @ApiParam(value = "Version of policy type",\r
+                    required = true) String policyTypeVersion,\r
             @PathParam("policyId") @ApiParam(value = "ID of policy", required = true) String policyId,\r
             @PathParam("policyVersion") @ApiParam(value = "Version of policy", required = true) String policyVersion,\r
             @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {\r
 \r
         try (PolicyProvider policyProvider = new PolicyProvider()) {\r
-            ToscaServiceTemplate serviceTemplate = policyProvider\r
-                    .deletePolicy(policyTypeId, policyTypeVersion, policyId, policyVersion);\r
+            ToscaServiceTemplate serviceTemplate =\r
+                    policyProvider.deletePolicy(policyTypeId, policyTypeVersion, policyId, policyVersion);\r
             return makeOkResponse(requestId, serviceTemplate);\r
         } catch (PfModelException | PfModelRuntimeException pfme) {\r
-            LOGGER.error("DELETE /policytypes/{}/versions/{}/policies/{}/versions/{}", policyTypeId,\r
-                    policyTypeVersion, policyId, policyVersion, pfme);\r
+            LOGGER.debug("DELETE /policytypes/{}/versions/{}/policies/{}/versions/{}", policyTypeId, policyTypeVersion,\r
+                    policyId, policyVersion, pfme);\r
             return makeErrorResponse(requestId, pfme);\r
         }\r
     }\r
 \r
     private enum Target {\r
-        POLICY, POLICY_TYPE, OTHER\r
+        POLICY,\r
+        POLICY_TYPE,\r
+        OTHER\r
     }\r
 \r
     private enum Result {\r
-        SUCCESS, FAILURE\r
+        SUCCESS,\r
+        FAILURE\r
     }\r
 \r
     private enum HttpMethod {\r
-        POST, GET\r
+        POST,\r
+        GET\r
     }\r
 \r
     private void updateApiStatisticsCounter(Target target, Result result, HttpMethod http) {\r