Use datatype in matchable translator 24/102024/2
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 19 Feb 2020 21:59:01 +0000 (16:59 -0500)
committerPamela Dragosh <pdragosh@research.att.com>
Thu, 20 Feb 2020 00:59:33 +0000 (19:59 -0500)
commit3f4d4125093ca000c735adc1d6430c39e31de38c
tree5386fae347d6445bdba7599d0f42aefc85d867df
parent56038a31a23e468f51c0b2ab349f748eafe4b6d2
Use datatype in matchable translator

With the new changes to models/api, the full policy template will
be retrieved along with inherited policy types and datatypes.

Changed api caller to return tosca template instead of individual
policy type so all policy types and data types are available.

Changed stdmatchabletranslator to be able to flexibly go deep with
list/map of datatypes of attributes. NOTE: This should be re-factored
at a later date as its a bit messy.

The naming application was used to test this code, but it was determined
by the CCSDK team that they will not do filtering this release. Instead,
switched to combined results policy type to return the full policy type.

Issue-ID: POLICY-1740
Change-Id: Ieb4e46e7fb2c639a1155be3bc07f5587c4f7b09a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java
applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java
applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java
applications/common/src/test/resources/matchable/onap.policies.Test-1.0.0.yaml
applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
applications/naming/src/main/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplication.java
applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java