diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2023-10-20 14:30:41 +0530 |
---|---|---|
committer | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2023-10-20 14:31:01 +0530 |
commit | ea5ba02bdfd1ed6e16683b01f1f499cb2473e37e (patch) | |
tree | a12785119b185c6ec3777ad7826dc4c27f0c26ef /sdnr/wt/devicemanager-core/provider | |
parent | 70cc4c4295376e4af9cb9009a6ee5ddc389d61d9 (diff) |
Support multiple YANG revisions
Provide o-ran-supervision messages to VES collector
Issue-ID: CCSDK-3948
Change-Id: I16cb880414dde00a48fa59d8b90251beedae2c0e
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-core/provider')
-rw-r--r-- | sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java index 945d42550..a2e6c9a13 100644 --- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java +++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/VESCollectorServiceImpl.java @@ -44,6 +44,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESFaultFieldsPOJO; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESMessage; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESNotificationFieldsPOJO; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESPNFRegistrationFieldsPOJO; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESStndDefinedFieldsPOJO; import org.onap.ccsdk.features.sdnr.wt.devicemanager.vescollectorconnector.impl.config.VESCollectorCfgImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -204,4 +205,23 @@ public class VESCollectorServiceImpl implements VESCollectorService, IConfigChan return new VESMessage(objMapper.writeValueAsString(outerEvent)); } + /** + * Generates VES Event JSON containing commonEventHeader and stndDefined fields + * + * @param commonEventHeader + * @param stndDefinedFields + * @return VESMessage - representing the VES Event JSON + * @throws JsonProcessingException + */ + @Override + public VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, + VESStndDefinedFieldsPOJO stndDefinedFields) throws JsonProcessingException { + Map<String, Object> innerEvent = new HashMap<String, Object>(); + innerEvent.put("commonEventHeader", commonEventHeader); + innerEvent.put("stndDefinedFields", stndDefinedFields); + + Map<String, Object> outerEvent = new HashMap<String, Object>(); + outerEvent.put("event", innerEvent); + return new VESMessage(objMapper.writeValueAsString(outerEvent)); + } } |