aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checkstyle/pom.xml2
-rwxr-xr-xcps-application/pom.xml2
-rw-r--r--cps-bom/pom.xml2
-rwxr-xr-xcps-dependencies/pom.xml2
-rw-r--r--cps-events/pom.xml2
-rw-r--r--cps-ncmp-events/pom.xml2
-rw-r--r--cps-ncmp-rest-stub/pom.xml2
-rw-r--r--cps-ncmp-rest/pom.xml2
-rw-r--r--cps-ncmp-service/pom.xml2
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java7
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumerSpec.groovy14
-rwxr-xr-xcps-parent/pom.xml2
-rw-r--r--cps-path-parser/pom.xml2
-rwxr-xr-xcps-rest/pom.xml2
-rw-r--r--cps-ri/pom.xml2
-rw-r--r--cps-service/pom.xml2
-rw-r--r--integration-test/pom.xml2
-rw-r--r--jacoco-report/pom.xml2
-rw-r--r--pom.xml2
-rw-r--r--spotbugs/pom.xml2
-rwxr-xr-xversion.properties4
21 files changed, 35 insertions, 26 deletions
diff --git a/checkstyle/pom.xml b/checkstyle/pom.xml
index 71ff88cc87..59af7a43db 100644
--- a/checkstyle/pom.xml
+++ b/checkstyle/pom.xml
@@ -26,7 +26,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.cps</groupId>
<artifactId>checkstyle</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<profiles>
<profile>
diff --git a/cps-application/pom.xml b/cps-application/pom.xml
index cf5de3ccfb..4c46e462a1 100755
--- a/cps-application/pom.xml
+++ b/cps-application/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-bom/pom.xml b/cps-bom/pom.xml
index 88c78faee3..c9af839557 100644
--- a/cps-bom/pom.xml
+++ b/cps-bom/pom.xml
@@ -25,7 +25,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.cps</groupId>
<artifactId>cps-bom</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description>This artifact contains dependencyManagement declarations of all published CPS components.</description>
diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml
index 506ed9f188..770a66ad5a 100755
--- a/cps-dependencies/pom.xml
+++ b/cps-dependencies/pom.xml
@@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.cps</groupId>
<artifactId>cps-dependencies</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name>
diff --git a/cps-events/pom.xml b/cps-events/pom.xml
index 8fa2380caa..be0f4a73ff 100644
--- a/cps-events/pom.xml
+++ b/cps-events/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ncmp-events/pom.xml b/cps-ncmp-events/pom.xml
index 890fa0effb..494e12631e 100644
--- a/cps-ncmp-events/pom.xml
+++ b/cps-ncmp-events/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ncmp-rest-stub/pom.xml b/cps-ncmp-rest-stub/pom.xml
index c6eb0d7a5e..af289cbaab 100644
--- a/cps-ncmp-rest-stub/pom.xml
+++ b/cps-ncmp-rest-stub/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml
index bbf6b961a6..ecf66fc2cb 100644
--- a/cps-ncmp-rest/pom.xml
+++ b/cps-ncmp-rest/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ncmp-service/pom.xml b/cps-ncmp-service/pom.xml
index 1d7ca3813b..07ce152a4e 100644
--- a/cps-ncmp-service/pom.xml
+++ b/cps-ncmp-service/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
index 1361d98ffc..2685ce4ca9 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
@@ -44,6 +44,9 @@ public class SubscriptionEventConsumer {
@Value("${notification.enabled:true}")
private boolean notificationFeatureEnabled;
+ @Value("${ncmp.model-loader.subscription:false}")
+ private boolean subscriptionModelLoaderEnabled;
+
/**
* Consume the specified event.
*
@@ -60,7 +63,9 @@ public class SubscriptionEventConsumer {
}
if ("CM".equals(event.getDataType().getDataCategory())) {
log.debug("Consuming event {} ...", subscriptionEvent);
- persistSubscriptionEvent(subscriptionEvent);
+ if (subscriptionModelLoaderEnabled) {
+ persistSubscriptionEvent(subscriptionEvent);
+ }
if ("CREATE".equals(subscriptionEvent.getEventType().value())) {
log.info("Subscription for ClientID {} with name {} ...",
event.getSubscription().getClientID(),
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumerSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumerSpec.groovy
index 248eb8bbe2..d801e4ddf7 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumerSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumerSpec.groovy
@@ -50,6 +50,8 @@ class SubscriptionEventConsumerSpec extends MessagingBaseSpec {
def testEventSent = jsonObjectMapper.convertJsonString(jsonData, SubscriptionEvent.class)
and: 'notifications are enabled'
objectUnderTest.notificationFeatureEnabled = true
+ and: 'subscription model loader is enabled'
+ objectUnderTest.subscriptionModelLoaderEnabled = true
when: 'the valid event is consumed'
objectUnderTest.consumeSubscriptionEvent(testEventSent)
then: 'the event is mapped to a yangModelSubscription'
@@ -60,18 +62,20 @@ class SubscriptionEventConsumerSpec extends MessagingBaseSpec {
1 * mockSubscriptionEventForwarder.forwardCreateSubscriptionEvent(testEventSent)
}
- def 'Consume and persist valid CM create message where notifications are disabled'() {
+ def 'Consume valid CM create message where notifications and model loader are disabled'() {
given: 'an event with data category CM'
def jsonData = TestUtils.getResourceFileContent('avcSubscriptionCreationEvent.json')
def testEventSent = jsonObjectMapper.convertJsonString(jsonData, SubscriptionEvent.class)
and: 'notifications are disabled'
objectUnderTest.notificationFeatureEnabled = false
+ and: 'subscription model loader is disabled'
+ objectUnderTest.subscriptionModelLoaderEnabled = false
when: 'the valid event is consumed'
objectUnderTest.consumeSubscriptionEvent(testEventSent)
- then: 'the event is mapped to a yangModelSubscription'
- 1 * mockSubscriptionEventMapper.toYangModelSubscriptionEvent(testEventSent) >> yangModelSubscriptionEvent
- and: 'the event is persisted'
- 1 * mockSubscriptionPersistence.saveSubscriptionEvent(yangModelSubscriptionEvent)
+ then: 'the event is not mapped to a yangModelSubscription'
+ 0 * mockSubscriptionEventMapper.toYangModelSubscriptionEvent(*_) >> yangModelSubscriptionEvent
+ and: 'the event is not persisted'
+ 0 * mockSubscriptionPersistence.saveSubscriptionEvent(*_)
and: 'the event is not forwarded'
0 * mockSubscriptionEventForwarder.forwardCreateSubscriptionEvent(*_)
}
diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml
index 193a04e7d2..829ab04b68 100755
--- a/cps-parent/pom.xml
+++ b/cps-parent/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
diff --git a/cps-path-parser/pom.xml b/cps-path-parser/pom.xml
index 0784ccbbfb..5b861f76d6 100644
--- a/cps-path-parser/pom.xml
+++ b/cps-path-parser/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-rest/pom.xml b/cps-rest/pom.xml
index c27e515b77..9d4f6331be 100755
--- a/cps-rest/pom.xml
+++ b/cps-rest/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ri/pom.xml b/cps-ri/pom.xml
index ba743f28b2..f282069e35 100644
--- a/cps-ri/pom.xml
+++ b/cps-ri/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-service/pom.xml b/cps-service/pom.xml
index 86fef36439..47f5508ff1 100644
--- a/cps-service/pom.xml
+++ b/cps-service/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index 1d37fc1b04..acba37b997 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/jacoco-report/pom.xml b/jacoco-report/pom.xml
index ddaf14b153..8241ebc4b7 100644
--- a/jacoco-report/pom.xml
+++ b/jacoco-report/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 0997698701..63afbf1665 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.onap.cps</groupId>
<artifactId>cps-aggregator</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>cps</name>
diff --git a/spotbugs/pom.xml b/spotbugs/pom.xml
index e2d57747a8..7385805fb3 100644
--- a/spotbugs/pom.xml
+++ b/spotbugs/pom.xml
@@ -25,7 +25,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.cps</groupId>
<artifactId>spotbugs</artifactId>
- <version>3.2.7-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<properties>
<nexusproxy>https://nexus.onap.org</nexusproxy>
diff --git a/version.properties b/version.properties
index 169b253363..0777f6b538 100755
--- a/version.properties
+++ b/version.properties
@@ -21,8 +21,8 @@
# because they are used in Jenkins, whose plug-in doesn't support this
major=3
-minor=2
-patch=7
+minor=3
+patch=0
base_version=${major}.${minor}.${patch}