From 632899642b6a1d1489a0b96932c9c38863a53a26 Mon Sep 17 00:00:00 2001 From: Rashmi Pujar Date: Sat, 22 Jan 2022 00:37:28 -0500 Subject: 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 Change-Id: Ief6d70f9abcfc8414e10aa51a27815ee9028e4c8 --- .../test/resources/events/Context_AvroEventAlbum_EventOutCompare.json | 3 ++- .../test/resources/events/Context_JavaEventAlbum_EventOutCompare.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'testsuites/integration/integration-uservice-test/src/test/resources') diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_AvroEventAlbum_EventOutCompare.json b/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_AvroEventAlbum_EventOutCompare.json index e043ea1e2..6c13b1f0e 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_AvroEventAlbum_EventOutCompare.json +++ b/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_AvroEventAlbum_EventOutCompare.json @@ -4,6 +4,7 @@ "nameSpace": "org.onap.policy.apex.test", "source": "External", "target": "Apex", + "toscaPolicyState": "", "AvroArray": [ "I", "once", @@ -114,4 +115,4 @@ "CustomString": { "stringValue": "I Wandered Lonely as a Cloud added to end of string" } -} +} \ No newline at end of file diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_JavaEventAlbum_EventOutCompare.json b/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_JavaEventAlbum_EventOutCompare.json index a0f8549e6..fa64b2eeb 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_JavaEventAlbum_EventOutCompare.json +++ b/testsuites/integration/integration-uservice-test/src/test/resources/events/Context_JavaEventAlbum_EventOutCompare.json @@ -4,6 +4,7 @@ "nameSpace": "org.onap.policy.apex.test", "source": "External", "target": "Apex", + "toscaPolicyState": "", "CustomBoolean": { "flag": false }, @@ -98,4 +99,4 @@ "JavaLong": 1234567890124, "JavaShort": 32001, "JavaString": "The four green provinces of Ireland added to end of string" -} +} \ No newline at end of file -- cgit 1.2.3-korg