From 0b278005ad98bcd862bd348d08f664005e9eda60 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 28 Oct 2019 08:51:10 -0400 Subject: Optimization improvements and test cases * StdBaseTranslator added helpful support methods and can now add obligations to either rule, policy or policy sets. * StdMatchablePolicyRequest improved to support optional policy-type as part of the request to refine the output results. * Added more tests to ensure that the decision is returning the appropriate results. * Added more Javadoc for code. * Added some sonar fix for either log or throw exception. Issue-ID: POLICY-2066 Change-Id: I90d6d90c2cdbb627e96cfce1d2632b2439a1e477 Signed-off-by: Pamela Dragosh --- .../vCPE.policies.optimization.input.tosca.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml') diff --git a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml b/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml index 80888149..919a2f8b 100644 --- a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml +++ b/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml @@ -9,6 +9,24 @@ topology_template: metadata: policy-id: OSDF_CASABLANCA.Affinity_Default policy-version: 1 + properties: + scope: [] + services: [] + resources: [] + geography: [] + identity: affinity_vCPE + applicableResources: any + affinityProperties: + qualifier: same + category: complex + - + OSDF_CASABLANCA.Affinity_Default_US: + type: onap.policies.optimization.AffinityPolicy + version: 1.0.0 + type_version: 1.0.0 + metadata: + policy-id: OSDF_CASABLANCA.Affinity_Default_US + policy-version: 1 properties: scope: [] services: [] @@ -20,12 +38,12 @@ topology_template: qualifier: same category: complex - - OSDF_CASABLANCA.Affinity_vCPE_0: + OSDF_CASABLANCA.Affinity_Default_vCPE_0: type: onap.policies.optimization.AffinityPolicy version: 1.0.0 type_version: 1.0.0 metadata: - policy-id: OSDF_CASABLANCA.Affinity_vCPE_0 + policy-id: OSDF_CASABLANCA.Affinity_Default_vCPE_0 policy-version: 1 properties: scope: [] -- cgit 1.2.3-korg