diff options
author | seanbeirne <sean.beirne@est.tech> | 2023-07-25 16:54:03 +0100 |
---|---|---|
committer | Sean Beirne <sean.beirne@est.tech> | 2023-07-26 09:53:34 +0000 |
commit | 5272927ea8fd21487d640e22e62c087913e302f5 (patch) | |
tree | 1a2c32f2e98f86ed0ee34ebd2bae2ede076c8448 /src/main/java | |
parent | c0ebeaa0ddcb758874320097194dfd4aa8a947c4 (diff) |
DMI to NCMP Subscription Delete Response
Issue-ID: CPS-1809
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Change-Id: I482cdea009dccc97aea5e96d5d831603c6e21206
Diffstat (limited to 'src/main/java')
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumer.java b/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumer.java index d7622fae..bef68a67 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumer.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumer.java @@ -65,6 +65,9 @@ public class SubscriptionEventConsumer { if ("subscriptionCreated".equals(subscriptionType)) { sendSubscriptionResponseMessage(eventKey, "subscriptionCreatedStatus", formSubscriptionEventResponse(subscriptionEvent)); + } else if ("subscriptionDeleted".equals(subscriptionType)) { + sendSubscriptionResponseMessage(eventKey, "subscriptionDeletedStatus", + formSubscriptionEventResponse(subscriptionEvent)); } } } diff --git a/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventResponseMapper.java b/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventResponseMapper.java index d7609932..49bdfe31 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventResponseMapper.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventResponseMapper.java @@ -75,7 +75,8 @@ public class SubscriptionEventResponseMapper { final String subscriptionType, final String dmiName) { try { - return CloudEventBuilder.v1().withId(UUID.randomUUID().toString()) + return CloudEventBuilder.v1() + .withId(UUID.randomUUID().toString()) .withSource(URI.create(dmiName)) .withType(subscriptionType) .withDataSchema(URI.create("urn:cps:" + SubscriptionEventResponse.class.getName() + ":1.0.0")) |