Fix legacy policy type names 15/86415/1 3.0.2-ONAP
authorPamela Dragosh <pdragosh@research.att.com>
Fri, 26 Apr 2019 16:51:22 +0000 (12:51 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Fri, 26 Apr 2019 16:51:28 +0000 (12:51 -0400)
The default names were incorrect in the api path.

Issue-ID: POLICY-1704
Change-Id: Ib95a7954c6b4a6fef0e871dfd4130e600e03c957
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java

index c3e7356..ed6e1d8 100644 (file)
@@ -70,7 +70,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @GET
-    @Path("/policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/{policyId}")
+    @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}")
     @ApiOperation(value = "Retrieve all versions of a particular guard policy",
             notes = "Returns a list of all versions of the specified guard policy",
             response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
@@ -129,7 +129,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @GET
-    @Path("/policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
+    @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
     @ApiOperation(value = "Retrieve one version of a particular guard policy",
             notes = "Returns a particular version of a specified guard policy",
             response = LegacyGuardPolicyOutput.class, responseContainer = "Map",
@@ -189,7 +189,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @POST
-    @Path("/policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies")
+    @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies")
     @ApiOperation(value = "Create a new guard policy",
             notes = "Client should provide entity body of the new guard policy",
             authorizations = @Authorization(value = "basicAuth"),
@@ -248,7 +248,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @DELETE
-    @Path("/policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
+    @Path("/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/{policyId}/versions/{policyVersion}")
     @ApiOperation(value = "Delete a particular version of a guard policy",
             notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
             authorizations = @Authorization(value = "basicAuth"),
@@ -309,7 +309,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @GET
-    @Path("/policytypes/onap.policy.controlloop.operational/versions/1.0.0/policies/{policyId}")
+    @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/{policyId}")
     @ApiOperation(value = "Retrieve all versions of a particular operational policy",
             notes = "Returns a list of all versions of the specified operational policy",
             response = LegacyOperationalPolicy.class,
@@ -368,7 +368,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @GET
-    @Path("/policytypes/onap.policy.controlloop.operational/versions/1.0.0/"
+    @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
          + "policies/{policyId}/versions/{policyVersion}")
     @ApiOperation(value = "Retrieve one version of a particular operational policy",
             notes = "Returns a particular version of a specified operational policy",
@@ -428,7 +428,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @POST
-    @Path("/policytypes/onap.policy.controlloop.operational/versions/1.0.0/policies")
+    @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies")
     @ApiOperation(value = "Create a new operational policy",
             notes = "Client should provide entity body of the new operational policy",
             authorizations = @Authorization(value = "basicAuth"),
@@ -487,7 +487,7 @@ public class LegacyApiRestController {
      * @return the Response object containing the results of the API operation
      */
     @DELETE
-    @Path("/policytypes/onap.policy.controlloop.operational/versions/1.0.0/"
+    @Path("/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/"
          + "policies/{policyId}/versions/{policyVersion}")
     @ApiOperation(value = "Delete a particular version of a specified operational policy",
             notes = "Rule: the version that has been deployed in PDP group(s) cannot be deleted",
index 756c7ae..0d82054 100644 (file)
@@ -106,30 +106,30 @@ public class TestApiRestServer {
         + "onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/latest";
 
     private static final String GUARD_POLICIES =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies";
     private static final String GUARD_POLICIES_VDNS_FL =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/guard.frequency.scaleout";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout";
     private static final String GUARD_POLICIES_VDNS_MINMAX =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/guard.minmax.scaleout";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.minmax.scaleout";
     private static final String GUARD_POLICIES_VDNS_FL_VERSION = "policytypes/"
-        + "onap.policy.controlloop.guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/1.0.0";
+        + "onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/1.0.0";
     private static final String GUARD_POLICIES_VDNS_MINMAX_VERSION = "policytypes/"
-        + "onap.policy.controlloop.guard/versions/1.0.0/policies/guard.minmax.scaleout/versions/1.0.0";
+        + "onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.minmax.scaleout/versions/1.0.0";
 
     private static final String OPS_POLICIES =
-            "policytypes/onap.policy.controlloop.operational/versions/1.0.0/policies";
+            "policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies";
     private static final String OPS_POLICIES_VCPE =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/operational.restart";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.restart";
     private static final String OPS_POLICIES_VDNS =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/operational.scaleout";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.scaleout";
     private static final String OPS_POLICIES_VFIREWALL =
-            "policytypes/onap.policy.controlloop.guard/versions/1.0.0/policies/operational.modifyconfig";
+            "policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.modifyconfig";
     private static final String OPS_POLICIES_VCPE_VERSION = "policytypes/"
-        + "onap.policy.controlloop.guard/versions/1.0.0/policies/operational.restart/versions/1.0.0";
+        + "onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.restart/versions/1.0.0";
     private static final String OPS_POLICIES_VDNS_VERSION = "policytypes/"
-        + "onap.policy.controlloop.guard/versions/1.0.0/policies/operational.scaleout/versions/1.0.0";
+        + "onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.scaleout/versions/1.0.0";
     private static final String OPS_POLICIES_VFIREWALL_VERSION = "policytypes/"
-        + "onap.policy.controlloop.guard/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0";
+        + "onap.policies.controlloop.Guard/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0";
 
     private static String KEYSTORE = System.getProperty("user.dir") + "/src/test/resources/ssl/policy-keystore";
     private Main main;