diff options
Diffstat (limited to 'models-interactions/model-actors')
17 files changed, 43 insertions, 19 deletions
diff --git a/models-interactions/model-actors/actor.aai/pom.xml b/models-interactions/model-actors/actor.aai/pom.xml index 4b2dc453b..521d7bceb 100644 --- a/models-interactions/model-actors/actor.aai/pom.xml +++ b/models-interactions/model-actors/actor.aai/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.aai</artifactId> diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java index d89d8350a..a4b30652d 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java @@ -26,7 +26,6 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.MediaType; import org.onap.policy.aai.AaiConstants; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; @@ -70,8 +69,6 @@ public class AaiGetPnfOperation extends AaiGetOperation { protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) { Map<String, Object> headers = makeHeaders(); - headers.put("Accept", MediaType.APPLICATION_JSON); - StringBuilder str = new StringBuilder(getClient().getBaseUrl()); String path = getPath() + URI_SEP + URLEncoder.encode(getTargetEntity(), StandardCharsets.UTF_8); diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java index fe1179833..add9c647a 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.MediaType; import org.onap.policy.aai.AaiConstants; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; @@ -65,9 +64,7 @@ public class AaiGetTenantOperation extends AaiGetOperation { @Override protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) { - Map<String, Object> headers = makeHeaders(); - - headers.put("Accept", MediaType.APPLICATION_JSON); + final Map<String, Object> headers = makeHeaders(); StringBuilder str = new StringBuilder(getClient().getBaseUrl()); diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiUtil.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiUtil.java index 14edc3aa1..c44e9d80d 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiUtil.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiUtil.java @@ -22,6 +22,7 @@ package org.onap.policy.controlloop.actor.aai; import java.util.HashMap; import java.util.Map; +import javax.ws.rs.core.MediaType; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; /** @@ -44,6 +45,7 @@ public class AaiUtil { headers.put("X-FromAppId", "POLICY"); headers.put("X-TransactionId", params.getRequestId().toString()); + headers.put("Accept", MediaType.APPLICATION_JSON); return headers; } diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/BasicAaiOperation.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/BasicAaiOperation.java index 1f481ae0f..9479d063b 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/BasicAaiOperation.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/BasicAaiOperation.java @@ -70,5 +70,6 @@ public abstract class BasicAaiOperation extends BasicHttpOperation { protected void verifyHeaders(Map<String, Object> headers) { assertEquals("POLICY", headers.get("X-FromAppId").toString()); assertEquals(params.getRequestId().toString(), headers.get("X-TransactionId")); + assertEquals("application/json", headers.get("Accept").toString()); } } diff --git a/models-interactions/model-actors/actor.appc/pom.xml b/models-interactions/model-actors/actor.appc/pom.xml index 765f764e0..74b208ea7 100644 --- a/models-interactions/model-actors/actor.appc/pom.xml +++ b/models-interactions/model-actors/actor.appc/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.appc</artifactId> diff --git a/models-interactions/model-actors/actor.appclcm/pom.xml b/models-interactions/model-actors/actor.appclcm/pom.xml index e4c48cfd5..1450fb618 100644 --- a/models-interactions/model-actors/actor.appclcm/pom.xml +++ b/models-interactions/model-actors/actor.appclcm/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.appclcm</artifactId> diff --git a/models-interactions/model-actors/actor.cds/pom.xml b/models-interactions/model-actors/actor.cds/pom.xml index a01c32b4f..a46780779 100644 --- a/models-interactions/model-actors/actor.cds/pom.xml +++ b/models-interactions/model-actors/actor.cds/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.cds</artifactId> <dependencies> diff --git a/models-interactions/model-actors/actor.cds/src/test/resources/org/onap/policy/simulators/cds/my_artifact-subscribe.json b/models-interactions/model-actors/actor.cds/src/test/resources/org/onap/policy/simulators/cds/my_artifact-subscribe.json new file mode 100644 index 000000000..307ee9316 --- /dev/null +++ b/models-interactions/model-actors/actor.cds/src/test/resources/org/onap/policy/simulators/cds/my_artifact-subscribe.json @@ -0,0 +1,27 @@ +{ + "commonHeader": { + "timestamp": "2020-03-20T14:00:25.217Z", + "requestId": "123456-1000", + "subRequestId": "sub-123456-1000", + "flag": { + }, + "originatorId": "sdnc" + }, + "actionIdentifiers": { + "blueprintName": "my_artifact", + "blueprintVersion": "1.0.0", + "actionName": "subscribe", + "mode": "sync" + }, + "status": { + "code": 200, + "message": "success", + "eventType": "EVENT_COMPONENT_EXECUTED", + "timestamp": "2020-07-02T14:56:25.608Z" + }, + "payload": { + "subscription-response": { + "status": "success" + } + } +}
\ No newline at end of file diff --git a/models-interactions/model-actors/actor.guard/pom.xml b/models-interactions/model-actors/actor.guard/pom.xml index cf2b2ff1a..9c82ecc52 100644 --- a/models-interactions/model-actors/actor.guard/pom.xml +++ b/models-interactions/model-actors/actor.guard/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.guard</artifactId> diff --git a/models-interactions/model-actors/actor.sdnc/pom.xml b/models-interactions/model-actors/actor.sdnc/pom.xml index 37df2b7f7..9fa01027b 100644 --- a/models-interactions/model-actors/actor.sdnc/pom.xml +++ b/models-interactions/model-actors/actor.sdnc/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.sdnc</artifactId> diff --git a/models-interactions/model-actors/actor.sdnr/pom.xml b/models-interactions/model-actors/actor.sdnr/pom.xml index 813e11399..9e0613e57 100644 --- a/models-interactions/model-actors/actor.sdnr/pom.xml +++ b/models-interactions/model-actors/actor.sdnr/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.sdnr</artifactId> diff --git a/models-interactions/model-actors/actor.so/pom.xml b/models-interactions/model-actors/actor.so/pom.xml index 78599f203..96a9510da 100644 --- a/models-interactions/model-actors/actor.so/pom.xml +++ b/models-interactions/model-actors/actor.so/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.so</artifactId> diff --git a/models-interactions/model-actors/actor.test/pom.xml b/models-interactions/model-actors/actor.test/pom.xml index 4c3b7d94d..4c83822fa 100644 --- a/models-interactions/model-actors/actor.test/pom.xml +++ b/models-interactions/model-actors/actor.test/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.test</artifactId> diff --git a/models-interactions/model-actors/actor.vfc/pom.xml b/models-interactions/model-actors/actor.vfc/pom.xml index d03ff5cc8..54a8fb80a 100644 --- a/models-interactions/model-actors/actor.vfc/pom.xml +++ b/models-interactions/model-actors/actor.vfc/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actor.vfc</artifactId> diff --git a/models-interactions/model-actors/actorServiceProvider/pom.xml b/models-interactions/model-actors/actorServiceProvider/pom.xml index 3c2ad0aa2..b2570f3e5 100644 --- a/models-interactions/model-actors/actorServiceProvider/pom.xml +++ b/models-interactions/model-actors/actorServiceProvider/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <artifactId>actorServiceProvider</artifactId> diff --git a/models-interactions/model-actors/pom.xml b/models-interactions/model-actors/pom.xml index 4e30c5901..0d0679c5d 100644 --- a/models-interactions/model-actors/pom.xml +++ b/models-interactions/model-actors/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.policy.models</groupId> <artifactId>policy-models-interactions</artifactId> - <version>2.3.2-SNAPSHOT</version> + <version>2.3.5-SNAPSHOT</version> </parent> <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> |