summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlalena.aria <lalena.aria@att.com>2019-10-08 20:57:16 +0000
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-10-22 16:06:26 -0400
commit2e7e531a8d80178410a1c4e78e62443c9d9a7684 (patch)
tree0cdaf211303617fd20e75dbfc865e5a85ba621fd
parentab4d7bb7087197977c464031239c202b220e6ad4 (diff)
UEB Listener SdncBaseModel add extractValue for CapabilityAssignment
Changes made: Add UEB Listener SdncBaseModel add extractValue for extracting properties on CapabilityAssignment objects. Issue-ID: CCSDK-1820 Change-Id: I10bbced5e9279bc8ef2bf48a87b2e2de0cb74942 Signed-off-by: lalena.aria <lalena.aria@att.com>
-rwxr-xr-xdmaap-listener/pom.xml2
-rwxr-xr-xueb-listener/pom.xml2
-rw-r--r--ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java17
3 files changed, 19 insertions, 2 deletions
diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml
index f403fc3d..4d2395a8 100755
--- a/dmaap-listener/pom.xml
+++ b/dmaap-listener/pom.xml
@@ -24,7 +24,7 @@
<build.number>${maven.build.timestamp}</build.number>
<SWM_VERSION>${project.version}-${build.number}</SWM_VERSION>
- <ccsdk.sli.core.version>0.6.1-SNAPSHOT</ccsdk.sli.core.version>
+ <ccsdk.sli.core.version>0.7.0-SNAPSHOT</ccsdk.sli.core.version>
<ccsdk.sli.northbound.version>${project.version}</ccsdk.sli.northbound.version>
</properties>
diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml
index 00d7ead9..9e7e4169 100755
--- a/ueb-listener/pom.xml
+++ b/ueb-listener/pom.xml
@@ -22,7 +22,7 @@
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<build.number>${maven.build.timestamp}</build.number>
<SWM_VERSION>${project.version}-${build.number}</SWM_VERSION>
- <ccsdk.sli.core.version>0.6.1-SNAPSHOT</ccsdk.sli.core.version>
+ <ccsdk.sli.core.version>0.7.0-SNAPSHOT</ccsdk.sli.core.version>
<ccsdk.sli.northbound.version>${project.version}</ccsdk.sli.northbound.version>
</properties>
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java
index d3fef173..7ab431da 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java
@@ -794,6 +794,23 @@ public class SdncBaseModel {
}
}
+ protected String extractValue (CapabilityAssignment capability, String path, String name) {
+ String value = "";
+
+ if (capability.getProperties().containsKey(path)) {
+ Property property = capability.getProperties().get(path);
+ if (property != null && !property.getLeafPropertyValue(name).isEmpty()) {
+ value = property.getLeafPropertyValue(name).get(0);
+ }
+ }
+
+ if (value != null && !value.isEmpty() && !value.equalsIgnoreCase("null")) {
+ return value;
+ } else {
+ return "";
+ }
+ }
+
protected String extractBooleanValue (NodeTemplate nodeTemplate, String name) {
String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name);
if (value != null && !value.isEmpty()) {