diff options
author | Rashmi Pujar <rashmi.pujar1@bell.ca> | 2022-01-22 00:37:28 -0500 |
---|---|---|
committer | Rashmi Pujar <rashmi.pujar1@bell.ca> | 2022-01-24 14:06:57 -0500 |
commit | 632899642b6a1d1489a0b96932c9c38863a53a26 (patch) | |
tree | ab9665853aa637ab1d76d7c25523c77835d3ca3e /plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main | |
parent | c719ee941bd4202b617544e351a11a35b20b8a6a (diff) |
Add TOSCA policy status header field to APEX event create CLI
In order to expose the processing status of a TOSCA policy
to APEX-PDP, a new header field for APEX concept "event"
has been introduced to track this within an APEX policy
implementation. This field will be leveraged to extract
the TOSCA policy execution metrics. Note, that the field is
marked as optional for backward compatibility.
Unit tests have been augmented to test for the field wherever
applicable and the default empty value is retained for the others.
"example-grpc" module has been updated to include this field.
Exposing the TOSCA policy execution metrics is outside the
scope of this patch since the current changes are already
very large owing to the atomic nature of the change introduced.
Issue-ID: POLICY-3845
Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca>
Change-Id: Ief6d70f9abcfc8414e10aa51a27815ee9028e4c8
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main')
-rw-r--r-- | plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java index cd14f4a3b..8d9416fb1 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019-2021 Nordix Foundation. - * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -100,12 +100,13 @@ public final class Apex2JmsObjectEventConverter implements ApexEventProtocolConv // Create the Apex event // @formatter:off + // FIXME: Introduce new AxEvent field for APEX to Jms object conversion final var apexEvent = new ApexEvent( jmsIncomingObject.getClass().getSimpleName() + eventProtocolParameters.getIncomingEventSuffix(), eventProtocolParameters.getIncomingEventVersion(), jmsIncomingObject.toString().getClass().getPackage().getName(), eventProtocolParameters.getIncomingEventSource(), - eventProtocolParameters.getIncomingEventTarget()); + eventProtocolParameters.getIncomingEventTarget(), ""); // @formatter:on // Set the data on the apex event as the incoming object @@ -137,4 +138,4 @@ public final class Apex2JmsObjectEventConverter implements ApexEventProtocolConv // Return the single object from the Apex event message return apexEvent.values().iterator().next(); } -} +}
\ No newline at end of file |