aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteControllerV1.java8
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteProvider.java4
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java10
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java6
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java4
5 files changed, 16 insertions, 16 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteControllerV1.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteControllerV1.java
index 16716117..e377c7ca 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteControllerV1.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteControllerV1.java
@@ -87,7 +87,7 @@ public class PdpGroupDeleteControllerV1 extends PapRestControllerV1 {
}
/**
- * Deletes a PDP group.
+ * Deletes a particular version of a PDP group.
*
* @param requestId request ID used in ONAP logging
* @param groupName name of the PDP group to be deleted
@@ -162,7 +162,7 @@ public class PdpGroupDeleteControllerV1 extends PapRestControllerV1 {
@ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE)})
// @formatter:on
- public Response deletePolicies(@HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId,
+ public Response deletePolicy(@HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId,
@ApiParam(value = "PDP Policy Name", required = true) @PathParam("name") String policyName) {
Pair<Status, PdpGroupDeleteResponse> pair = provider.deletePolicy(policyName, null);
@@ -172,7 +172,7 @@ public class PdpGroupDeleteControllerV1 extends PapRestControllerV1 {
}
/**
- * Deletes a PDP policy.
+ * Deletes a specific version of a PDP policy.
*
* @param requestId request ID used in ONAP logging
* @param policyName name of the PDP Policy to be deleted
@@ -204,7 +204,7 @@ public class PdpGroupDeleteControllerV1 extends PapRestControllerV1 {
@ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE)})
// @formatter:on
- public Response deletePoliciesVersion(
+ public Response deletePolicyVersion(
@HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId,
@ApiParam(value = "PDP Policy Name", required = true) @PathParam("name") String policyName,
@ApiParam(value = "PDP Policy Version", required = true) @PathParam("version") String version) {
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteProvider.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteProvider.java
index f9619df3..2a1d240d 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteProvider.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeleteProvider.java
@@ -57,10 +57,10 @@ public class PdpGroupDeleteProvider {
}
/**
- * Deletes a PDP group.
+ * Deletes a PDP policy.
*
* @param policyId id of the policy to be deleted
- * @param version group version to delete; may be {@code null} if the group has only
+ * @param version policy version to delete; may be {@code null} if the policy has only
* one version
* @return a pair containing the status and the response
*/
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java
index a0a2ee8f..3de39465 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java
@@ -35,8 +35,8 @@ import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.models.pap.concepts.PdpGroup;
import org.onap.policy.models.pap.concepts.PdpGroupDeployResponse;
+import org.onap.policy.models.pap.concepts.PdpGroups;
import org.onap.policy.models.pap.concepts.PdpPolicies;
/**
@@ -50,13 +50,13 @@ public class PdpGroupDeployControllerV1 extends PapRestControllerV1 {
* Deploys or updates a PDP group.
*
* @param requestId request ID used in ONAP logging
- * @param group PDP group configuration
+ * @param groups PDP group configuration
* @return a response
*/
// @formatter:off
@POST
@Path("pdps")
- @ApiOperation(value = "Deploy or update PDP Group",
+ @ApiOperation(value = "Deploy or update PDP Groups",
notes = "Deploys or updates a PDP Group, returning optional error details",
response = PdpGroupDeployResponse.class,
tags = {"Policy Administration (PAP) API"},
@@ -79,9 +79,9 @@ public class PdpGroupDeployControllerV1 extends PapRestControllerV1 {
// @formatter:on
public Response deployGroup(@HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId,
- @ApiParam(value = "PDP Group Configuration", required = true) PdpGroup group) {
+ @ApiParam(value = "List of PDP Group Configuration", required = true) PdpGroups groups) {
- Pair<Status, PdpGroupDeployResponse> pair = provider.deployGroup(group);
+ Pair<Status, PdpGroupDeployResponse> pair = provider.deployGroup(groups);
return addLoggingHeaders(addVersionControlHeaders(Response.status(pair.getLeft())), requestId)
.entity(pair.getRight()).build();
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java
index e8ea357b..a6424fce 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java
@@ -22,8 +22,8 @@ package org.onap.policy.pap.main.rest;
import javax.ws.rs.core.Response;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.models.pap.concepts.PdpGroup;
import org.onap.policy.models.pap.concepts.PdpGroupDeployResponse;
+import org.onap.policy.models.pap.concepts.PdpGroups;
import org.onap.policy.models.pap.concepts.PdpPolicies;
/**
@@ -34,10 +34,10 @@ public class PdpGroupDeployProvider {
/**
* Deploys or updates a PDP group.
*
- * @param group PDP group configuration
+ * @param groups PDP group configuration
* @return a pair containing the status and the response
*/
- public Pair<Response.Status, PdpGroupDeployResponse> deployGroup(PdpGroup group) {
+ public Pair<Response.Status, PdpGroupDeployResponse> deployGroup(PdpGroups groups) {
/*
* TODO Lock for updates - return error if already locked.
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java
index 0384bf7e..dd4fe937 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java
@@ -82,7 +82,7 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
}
@Test
- public void testDeletePolicies() throws Exception {
+ public void testDeletePolicy() throws Exception {
String uri = DELETE_POLICIES_ENDPOINT + "/my-name";
Invocation.Builder invocationBuilder = sendRequest(uri);
@@ -101,7 +101,7 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
}
@Test
- public void testDeletePoliciesVersion() throws Exception {
+ public void testDeletePolicyVersion() throws Exception {
String uri = DELETE_POLICIES_ENDPOINT + "/my-name/versions/3";
Invocation.Builder invocationBuilder = sendRequest(uri);