summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-26 12:51:22 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-26 12:51:28 -0400
commitf79a9f73e315a9c150230c75f401542b1544aa88 (patch)
tree06acaec153bcf73ff8610538df8a60e0adbd7d67
parent91d017c10ca6e3314aa50c1d6c95bd2d93069d89 (diff)
Fix legacy policy type names3.0.2-ONAP
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>
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java16
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java24
2 files changed, 20 insertions, 20 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java b/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
index c3e73568..ed6e1d8c 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
@@ -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",
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
index 756c7ae0..0d820548 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
@@ -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;