aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml8
-rw-r--r--src/main/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupsAnalyzer.java6
-rw-r--r--src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java12
-rw-r--r--src/test/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupAnalyzerTest.java35
-rw-r--r--src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java19
-rw-r--r--version.properties2
6 files changed, 41 insertions, 41 deletions
diff --git a/pom.xml b/pom.xml
index 00505619b..e565fdb1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.policy</groupId>
<artifactId>clamp</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.0.1-SNAPSHOT</version>
<name>policy-clamp</name>
@@ -51,7 +51,7 @@
- The POLICY-CLAMP backend, JAVA unit testing
- The POLICY-CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae
emulator written in python)
- - The POLICY-CLAMP frontend, Javascrip tests (NodeJS(NPM) + JEST and Enzyme for React)
+ - The POLICY-CLAMP frontend, Javascript tests (NodeJS(NPM) + JEST and Enzyme for React)
The test coverage for dev's can be found after a "clean install" build in:
- Clamp backend: target/jacoco-dev.exec (unit tests + integration tests merged)
@@ -109,6 +109,8 @@
<ui.react.src>ui-react</ui.react.src>
<ui.react.lib.src>ui-react-lib</ui.react.lib.src>
<npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url>
+
+ <policy.models.version>2.4.0</policy.models.version>
</properties>
<profiles>
@@ -381,7 +383,7 @@
<dependency>
<groupId>org.onap.policy.models</groupId>
<artifactId>policy-models-pdp</artifactId>
- <version>2.3.5</version>
+ <version>${policy.models.version}</version>
</dependency>
<!-- Others dependencies -->
diff --git a/src/main/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupsAnalyzer.java b/src/main/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupsAnalyzer.java
index 1d6d21977..768872750 100644
--- a/src/main/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupsAnalyzer.java
+++ b/src/main/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupsAnalyzer.java
@@ -33,7 +33,7 @@ import org.onap.policy.models.pdp.concepts.PdpGroup;
import org.onap.policy.models.pdp.concepts.PdpGroups;
import org.onap.policy.models.pdp.concepts.PdpSubGroup;
import org.onap.policy.models.pdp.enums.PdpState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* This is an utility class to do searching in pdp groups and create json object describing the result.
@@ -118,12 +118,12 @@ public class PdpGroupsAnalyzer {
JsonObject assignedPdpGroups = new JsonObject();
pdpGroupInfo.add(ASSIGNED_PDP_GROUPS_INFO, assignedPdpGroups);
- ToscaPolicyIdentifier toscaPolicyIdentifier = new ToscaPolicyIdentifier(policyName, version);
+ ToscaConceptIdentifier toscaConceptIdentifier = new ToscaConceptIdentifier(policyName, version);
pdpGroups.getGroups().stream().anyMatch(pdpGroup ->
pdpGroup.getPdpSubgroups().stream().anyMatch(
pdpSubGroup -> {
if (pdpSubGroup.getPolicies() != null && pdpSubGroup.getPolicies()
- .contains(toscaPolicyIdentifier)) {
+ .contains(toscaConceptIdentifier)) {
assignedPdpGroups.addProperty("pdpGroup", pdpGroup.getName());
assignedPdpGroups.addProperty("pdpSubGroup", pdpSubGroup.getPdpType());
return true;
diff --git a/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java b/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
index 35ae9ed64..b6c60d84c 100644
--- a/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
+++ b/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
@@ -47,7 +47,7 @@ import org.onap.policy.models.pdp.concepts.PdpGroup;
import org.onap.policy.models.pdp.concepts.PdpGroups;
import org.onap.policy.models.pdp.concepts.PdpSubGroup;
import org.onap.policy.models.pdp.enums.PdpState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@@ -275,20 +275,20 @@ public class PolicyModelServiceItCase {
policyModelsService.saveOrUpdatePolicyModel(getPolicyModel(POLICY_MODEL_TYPE_3, "yaml",
POLICY_MODEL_TYPE_3_VERSION_1, "TEST", "VARIANT", "user"));
- ToscaPolicyTypeIdentifier type1 = new ToscaPolicyTypeIdentifier("org.onap.testos", "1.0.0");
- ToscaPolicyTypeIdentifier type2 = new ToscaPolicyTypeIdentifier("org.onap.testos2", "2.0.0");
+ ToscaConceptIdentifier type1 = new ToscaConceptIdentifier("org.onap.testos", "1.0.0");
+ ToscaConceptIdentifier type2 = new ToscaConceptIdentifier("org.onap.testos2", "2.0.0");
PdpSubGroup pdpSubgroup1 = new PdpSubGroup();
pdpSubgroup1.setPdpType("subGroup1");
- List<ToscaPolicyTypeIdentifier> pdpTypeList = new LinkedList<>();
+ List<ToscaConceptIdentifier> pdpTypeList = new LinkedList<>();
pdpTypeList.add(type1);
pdpTypeList.add(type2);
pdpSubgroup1.setSupportedPolicyTypes(pdpTypeList);
- ToscaPolicyTypeIdentifier type3 = new ToscaPolicyTypeIdentifier("org.onap.testos3", "2.0.0");
+ ToscaConceptIdentifier type3 = new ToscaConceptIdentifier("org.onap.testos3", "2.0.0");
PdpSubGroup pdpSubgroup2 = new PdpSubGroup();
pdpSubgroup2.setPdpType("subGroup2");
- List<ToscaPolicyTypeIdentifier> pdpTypeList2 = new LinkedList<>();
+ List<ToscaConceptIdentifier> pdpTypeList2 = new LinkedList<>();
pdpTypeList2.add(type2);
pdpTypeList2.add(type3);
pdpSubgroup2.setSupportedPolicyTypes(pdpTypeList2);
diff --git a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupAnalyzerTest.java b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupAnalyzerTest.java
index 5a9cac07b..e6717418a 100644
--- a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupAnalyzerTest.java
+++ b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PdpGroupAnalyzerTest.java
@@ -33,8 +33,7 @@ import org.onap.policy.models.pdp.concepts.PdpGroup;
import org.onap.policy.models.pdp.concepts.PdpGroups;
import org.onap.policy.models.pdp.concepts.PdpSubGroup;
import org.onap.policy.models.pdp.enums.PdpState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* This test class validates the PdpGroupAnalyzer class.
@@ -52,33 +51,33 @@ public class PdpGroupAnalyzerTest {
// Those that do not work first
PdpSubGroup pdpSubgroupBad = new PdpSubGroup();
pdpSubgroupBad.setPdpType("subGroupBad");
- pdpSubgroupBad.setSupportedPolicyTypes(Arrays.asList(new ToscaPolicyTypeIdentifier("org.onap.test", "2.0.0"),
- new ToscaPolicyTypeIdentifier("org.onap.test.*", "1.0.0"),
- new ToscaPolicyTypeIdentifier("org.onip.testos", "1.0.0"),
- new ToscaPolicyTypeIdentifier("org.onap.testos3", "2.0.0"),
- new ToscaPolicyTypeIdentifier("org.onap.tes", "1.0.0"),
- new ToscaPolicyTypeIdentifier("org.onap", "1.0.0")
+ pdpSubgroupBad.setSupportedPolicyTypes(Arrays.asList(new ToscaConceptIdentifier("org.onap.test", "2.0.0"),
+ new ToscaConceptIdentifier("org.onap.test.*", "1.0.0"),
+ new ToscaConceptIdentifier("org.onip.testos", "1.0.0"),
+ new ToscaConceptIdentifier("org.onap.testos3", "2.0.0"),
+ new ToscaConceptIdentifier("org.onap.tes", "1.0.0"),
+ new ToscaConceptIdentifier("org.onap", "1.0.0")
));
- pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap", "1.0.0")));
- pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos", "2.0.0")));
- pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos", "1.0.1")));
- pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos.new", "1.0.0")));
- pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.*", "1.0.0")));
+ pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap", "1.0.0")));
+ pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos", "2.0.0")));
+ pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos", "1.0.1")));
+ pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos.new", "1.0.0")));
+ pdpSubgroupBad.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.*", "1.0.0")));
PdpSubGroup pdpSubgroup1 = new PdpSubGroup();
pdpSubgroup1.setPdpType("subGroup1");
pdpSubgroup1.setSupportedPolicyTypes(
- Arrays.asList(new ToscaPolicyTypeIdentifier("org.onap.*", "1.0.0")));
+ Arrays.asList(new ToscaConceptIdentifier("org.onap.*", "1.0.0")));
PdpSubGroup pdpSubgroup2 = new PdpSubGroup();
pdpSubgroup2.setPdpType("subGroup2");
- pdpSubgroup2.setSupportedPolicyTypes(Arrays.asList(new ToscaPolicyTypeIdentifier("org.onap.test", "1.0.0")));
- pdpSubgroup2.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos", "1.0.0")));
+ pdpSubgroup2.setSupportedPolicyTypes(Arrays.asList(new ToscaConceptIdentifier("org.onap.test", "1.0.0")));
+ pdpSubgroup2.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos", "1.0.0")));
PdpSubGroup pdpSubgroup3 = new PdpSubGroup();
pdpSubgroup3.setPdpType("subGroup3");
- pdpSubgroup3.setSupportedPolicyTypes(Arrays.asList(new ToscaPolicyTypeIdentifier("org.onap.test*", "1.0.0")));
- pdpSubgroup3.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos", "2.0.0")));
+ pdpSubgroup3.setSupportedPolicyTypes(Arrays.asList(new ToscaConceptIdentifier("org.onap.test*", "1.0.0")));
+ pdpSubgroup3.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos", "2.0.0")));
// Should match pdpSubgroup1
PdpGroup pdpGroup1 = new PdpGroup();
diff --git a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
index ac05d037f..7b8cbd824 100644
--- a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
+++ b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
@@ -36,8 +36,7 @@ import org.onap.policy.models.pdp.concepts.PdpGroup;
import org.onap.policy.models.pdp.concepts.PdpGroups;
import org.onap.policy.models.pdp.concepts.PdpSubGroup;
import org.onap.policy.models.pdp.enums.PdpState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.skyscreamer.jsonassert.JSONAssert;
/**
@@ -56,23 +55,23 @@ public class PoliciesPdpMergerTest {
PdpSubGroup pdpSubgroup1 = new PdpSubGroup();
pdpSubgroup1.setPdpType("subGroup1");
pdpSubgroup1.setSupportedPolicyTypes(
- Arrays.asList(new ToscaPolicyTypeIdentifier("org.onap.*", "1.0.0")));
+ Arrays.asList(new ToscaConceptIdentifier("org.onap.*", "1.0.0")));
PdpSubGroup pdpSubgroup2 = new PdpSubGroup();
pdpSubgroup2.setPdpType("subGroup2");
pdpSubgroup2.setSupportedPolicyTypes(
- Arrays.asList(new ToscaPolicyTypeIdentifier("onap.policies.monitoring.tcagen2", "1.0.0"),
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0")));
+ Arrays.asList(new ToscaConceptIdentifier("onap.policies.monitoring.tcagen2", "1.0.0"),
+ new ToscaConceptIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0")));
pdpSubgroup2.setPolicies(Arrays.asList(
- new ToscaPolicyIdentifier("MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0", "1.0.0")));
+ new ToscaConceptIdentifier("MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0", "1.0.0")));
PdpSubGroup pdpSubgroup3 = new PdpSubGroup();
pdpSubgroup3.setPdpType("subGroup3");
pdpSubgroup3.setSupportedPolicyTypes(
- Arrays.asList(new ToscaPolicyTypeIdentifier("onap.policies.monitoring.tcagen2", "1.0.0"),
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0")));
- pdpSubgroup3.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("org.onap.testos", "2.0.0"),
- new ToscaPolicyIdentifier("OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd", "1.0.0")));
+ Arrays.asList(new ToscaConceptIdentifier("onap.policies.monitoring.tcagen2", "1.0.0"),
+ new ToscaConceptIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0")));
+ pdpSubgroup3.setPolicies(Arrays.asList(new ToscaConceptIdentifier("org.onap.testos", "2.0.0"),
+ new ToscaConceptIdentifier("OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd", "1.0.0")));
// Should match pdpSubgroup1
PdpGroup pdpGroup1 = new PdpGroup();
diff --git a/version.properties b/version.properties
index 35775d32e..a55d4d200 100644
--- a/version.properties
+++ b/version.properties
@@ -27,7 +27,7 @@
major=6
minor=0
-patch=0
+patch=1
base_version=${major}.${minor}.${patch}