From ea5bf0a1c8a4e525d2cee03841b8e8f9b3563ed0 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 18 Jul 2017 20:32:15 -0400 Subject: [CCSDK-6] Populate seed code Add seed code for sli/northbound repository Update groupId to org.onap.ccsdk.sli.northbound Update to use CCSDK version of sli core Change-Id: Id3a154a53150a74f4b65060544e76f3e0cad932e Signed-off-by: Dan Timoney --- dmaap-listener/.gitignore | 12 ++ dmaap-listener/.sonar/checkstyle.xml | 1 + dmaap-listener/.sonar/pmd.xml | 67 +++++++ dmaap-listener/pom.xml | 115 ++++++++++++ dmaap-listener/src/assembly/assemble_zip.xml | 61 +++++++ .../openecomp/sdnc/dmaapclient/DmaapListener.java | 165 +++++++++++++++++ .../sdnc/dmaapclient/DummyDmaapConsumer.java | 37 ++++ .../sdnc/dmaapclient/InvalidMessageException.java | 37 ++++ .../sdnc/dmaapclient/SdncDmaapConsumer.java | 146 +++++++++++++++ .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 196 +++++++++++++++++++++ .../sdnc/dmaapclient/SdncOdlConnection.java | 159 +++++++++++++++++ .../src/main/resources/edgeRouterStatusChange.map | 23 +++ dmaap-listener/src/main/resources/log4j.properties | 37 ++++ .../src/main/resources/preferredRoute.txt | 1 + .../src/main/scripts/start-dmaap-listener.sh | 69 ++++++++ .../src/main/scripts/stop-dmaap-listener.sh | 52 ++++++ dmaap-listener/src/site/apt/index.apt | 46 +++++ dmaap-listener/src/site/site.xml | 31 ++++ 18 files changed, 1255 insertions(+) create mode 100755 dmaap-listener/.gitignore create mode 100755 dmaap-listener/.sonar/checkstyle.xml create mode 100755 dmaap-listener/.sonar/pmd.xml create mode 100755 dmaap-listener/pom.xml create mode 100644 dmaap-listener/src/assembly/assemble_zip.xml create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java create mode 100644 dmaap-listener/src/main/resources/edgeRouterStatusChange.map create mode 100644 dmaap-listener/src/main/resources/log4j.properties create mode 100644 dmaap-listener/src/main/resources/preferredRoute.txt create mode 100644 dmaap-listener/src/main/scripts/start-dmaap-listener.sh create mode 100644 dmaap-listener/src/main/scripts/stop-dmaap-listener.sh create mode 100644 dmaap-listener/src/site/apt/index.apt create mode 100644 dmaap-listener/src/site/site.xml (limited to 'dmaap-listener') diff --git a/dmaap-listener/.gitignore b/dmaap-listener/.gitignore new file mode 100755 index 000000000..1b8a6ba9d --- /dev/null +++ b/dmaap-listener/.gitignore @@ -0,0 +1,12 @@ +org.eclipse.core.resources.prefs +.classpath +.project +.settings +.idea +.externalToolBuilders +maven-eclipse.xml +*.class +target/ +MANIFEST.MF +.DS_STORE +.metadata diff --git a/dmaap-listener/.sonar/checkstyle.xml b/dmaap-listener/.sonar/checkstyle.xml new file mode 100755 index 000000000..3fa231535 --- /dev/null +++ b/dmaap-listener/.sonar/checkstyle.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dmaap-listener/.sonar/pmd.xml b/dmaap-listener/.sonar/pmd.xml new file mode 100755 index 000000000..80343b3bd --- /dev/null +++ b/dmaap-listener/.sonar/pmd.xml @@ -0,0 +1,67 @@ + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 2 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + 5 + + + 2 + + + 3 + + + 3 + + + diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml new file mode 100755 index 000000000..9ab23cdea --- /dev/null +++ b/dmaap-listener/pom.xml @@ -0,0 +1,115 @@ + + 4.0.0 + org.onap.ccsdk.sli.northbound + jar + dmaap-listener + 0.0.1-SNAPSHOT + + DMAAP Listener + DMAAP Listener + + org.onap.ccsdk.sli.northbound + sdnc-northbound + 0.0.1-SNAPSHOT + + + 1.1.7-SNAPSHOT + 2.9.0.pr1 + true + /opt/app/dmaap-listener + 0.2.12 + yyMMdd-HHmmss + ${maven.build.timestamp} + ${project.version}-${build.number} + + + + + + com.att.nsa + dmaapClient + ${dmaap.listener.version} + + + org.slf4j + slf4j-api + 1.7.10 + + + org.slf4j + slf4j-log4j12 + 1.6.1 + compile + + + log4j + log4j + 1.2.17 + + + com.fasterxml.jackson.core + jackson-core + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${fasterxml.jackson.version} + + + junit + junit + ${junit.version} + test + + + org.onap.ccsdk.sli.core + dblib-provider + ${sdnctl.dblib.version} + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + true + + 1.7 + 1.7 + + + + + + maven-assembly-plugin + 2.6 + + + create-zip + + single + + package + + true + ${project.artifactId}.${project.version} + true + + src/assembly/assemble_zip.xml + + false + + + + + + + + + diff --git a/dmaap-listener/src/assembly/assemble_zip.xml b/dmaap-listener/src/assembly/assemble_zip.xml new file mode 100644 index 000000000..15f6bf4d2 --- /dev/null +++ b/dmaap-listener/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + + + assemble_zip + + zip + + + false + + + + src/main/scripts + bin + + + target + lib + + *.jar + + + + src/main/resources + lib + + *.properties + *.map + + + + + + lib + true + runtime + + + diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java new file mode 100644 index 000000000..7096d83bf --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java @@ -0,0 +1,165 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DmaapListener { + + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final Logger LOG = LoggerFactory + .getLogger(DmaapListener.class); + + public static void main(String[] args) { + + Properties properties = new Properties(); + + + String propFileName = DMAAP_LISTENER_PROPERTIES; + + if (args.length > 0) { + propFileName = args[0]; + } + + String propPath = null; + String propDir = System.getenv(SDNC_CONFIG_DIR); + + List consumers = new LinkedList(); + + if (propDir == null) { + + propDir = "/opt/sdnc/data/properties"; + } + + if (!propFileName.startsWith("/")) { + propPath = propDir + "/" + propFileName; + } + + File propFile = new File(propPath); + + if (!propFile.canRead()) { + LOG.error("Cannot read properties file "+propPath); + System.exit(1); + } + + try { + properties.load(new FileInputStream(propFile)); + } catch (Exception e) { + LOG.error("Caught exception loading properties from "+propPath, e); + System.exit(1); + } + + String subscriptionStr = properties.getProperty("subscriptions"); + + boolean threadsRunning = false; + + LOG.debug("Dmaap subscriptions : "+subscriptionStr); + + if (subscriptionStr != null) { + String[] subscriptions = subscriptionStr.split(";"); + + for (int i = 0; i < subscriptions.length; i++) { + String[] subscription = subscriptions[i].split(":"); + String consumerClassName = subscription[0]; + String propertyPath = subscription[1]; + + LOG.debug("Handling subscription [" + consumerClassName + "," + propertyPath + "]"); + + if (propertyPath == null) { + LOG.error("Invalid subscription (" + subscriptions[i] + ") property file missing"); + continue; + } + + if (!propertyPath.startsWith("/")) { + propertyPath = propDir + "/" + propertyPath; + } + + Class consumerClass = null; + + try { + consumerClass = Class.forName(consumerClassName); + } catch (Exception e) { + LOG.error("Could not find DMaap consumer class " + consumerClassName); + } + + if (consumerClass != null) { + + SdncDmaapConsumer consumer = null; + + try { + consumer = (SdncDmaapConsumer) consumerClass.newInstance(); + } catch (Exception e) { + LOG.error("Could not create consumer from class " + consumerClassName, e); + } + + if (consumer != null) { + LOG.debug("Initializing consumer " + consumerClassName + "(" + propertyPath + ")"); + consumer.init(properties, propertyPath); + + if (consumer.isReady()) { + Thread consumerThread = new Thread(consumer); + consumerThread.start(); + consumers.add(consumer); + threadsRunning = true; + LOG.info("Started consumer thread (" + consumerClassName + " : " + propertyPath + ")"); + } else { + LOG.debug("Consumer " + consumerClassName + " is not ready"); + } + } + + } + + } + } + + while (threadsRunning) { + + threadsRunning = false; + for (SdncDmaapConsumer consumer : consumers) { + if (consumer.isRunning()) { + threadsRunning = true; + } + } + + if (!threadsRunning) { + break; + } + + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + + } + } + + LOG.info("No listener threads running - exitting"); + + } +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java new file mode 100644 index 000000000..5edc1c908 --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DummyDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory + .getLogger(DummyDmaapConsumer.class); + + @Override + public void processMsg(String msg) { + LOG.info("Consumed message: \n"+msg); + } + +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java new file mode 100644 index 000000000..3de5df6c2 --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +public class InvalidMessageException extends Exception { + + public InvalidMessageException() { + super(); + } + + public InvalidMessageException(String msg) { + super(msg); + } + + public InvalidMessageException(String msg, Throwable t) { + super(msg, t); + } +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java new file mode 100644 index 000000000..5b55bda5b --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java @@ -0,0 +1,146 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.att.nsa.mr.client.MRClientFactory; +import com.att.nsa.mr.client.MRConsumer; +import com.att.nsa.mr.client.response.MRConsumerResponse; + +public abstract class SdncDmaapConsumer implements Runnable { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncDmaapConsumer.class); + + private String propertiesPath = ""; + private Properties properties = null; + MRConsumer consumer = null; + MRConsumerResponse consumerResponse = null; + boolean running = false; + boolean ready = false; + int fetchPause = 5000; // Default pause between fetchs - 5 seconds + + public boolean isReady() { + return ready; + } + + int timeout = 15000; // Default timeout - 15 seconds + + public boolean isRunning() { + return running; + } + + public SdncDmaapConsumer() { + + } + + public SdncDmaapConsumer(Properties properties, String propertiesPath) { + init(properties, propertiesPath); + } + + public String getProperty(String name) { + return(properties.getProperty(name, "")); + } + + public void init(Properties properties, String propertiesPath) { + + this.propertiesPath = propertiesPath; + + try { + + this.properties = (Properties) properties.clone(); + + this.properties.load(new FileInputStream(new File(propertiesPath))); + + String timeoutStr = properties.getProperty("timeout"); + + if ((timeoutStr != null) && (timeoutStr.length() > 0)) { + try { + timeout = Integer.parseInt(timeoutStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for timeout ("+timeoutStr+")"); + } + } + + String fetchPauseStr = properties.getProperty("fetchPause"); + if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { + try { + fetchPause = Integer.parseInt(fetchPauseStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric valud specified for fetchPause ("+fetchPauseStr+")"); + } + } + + this.consumer = MRClientFactory.createConsumer(propertiesPath); + ready = true; + } catch (Exception e) { + LOG.error("Error initializing DMaaP consumer from file "+propertiesPath, e); + } + } + + + @Override + public void run() { + if (ready) { + + running = true; + + while (running) { + + try { + boolean noData = true; + consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); + for (String msg : consumerResponse.getActualMessages()) { + noData = false; + LOG.info("Received message from DMaaP:\n"+msg); + processMsg(msg); + } + + if (noData) { + if (fetchPause > 0) { + + LOG.info("No data received from fetch. Pausing "+fetchPause+" ms before retry"); + Thread.sleep(fetchPause); + } else { + + LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); + } + } + } catch (Exception e) { + LOG.error("Caught exception reading from DMaaP", e); + running = false; + } + + + } + } + + } + + abstract public void processMsg(String msg) throws InvalidMessageException; +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java new file mode 100644 index 000000000..7e9c069ac --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -0,0 +1,196 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; + + +public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncFlatJsonDmaapConsumer.class); + + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + + + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + processMsg(msg, null); + } + + public void processMsg(String msg, String mapDirName) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode instarRootNode = null; + ObjectNode sdncRootNode = null; + + String instarMsgName = null; + + try { + instarRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + Iterator> instarFields = instarRootNode.fields(); + + while (instarFields.hasNext()) { + Map.Entry entry = instarFields.next(); + + instarMsgName = entry.getKey(); + instarRootNode = entry.getValue(); + break; + } + + Map fieldMap = loadMap(instarMsgName, mapDirName); + + if (fieldMap == null) { + throw new InvalidMessageException("Unable to process message - cannot load field mappings"); + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + throw new InvalidMessageException("No SDNC endpoint known for message "+instarMsgName); + } + + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + sdncRootNode = oMapper.createObjectNode(); + ObjectNode inputNode = oMapper.createObjectNode(); + + + for (String fromField : fieldMap.keySet()) { + + if (!SDNC_ENDPOINT.equals(fromField)) { + JsonNode curNode = instarRootNode.get(fromField); + if (curNode != null) { + String fromValue = curNode.textValue(); + + inputNode.put(fieldMap.get(fromField), fromValue); + } + } + } + sdncRootNode.put("input", inputNode); + + try { + String rpcMsgbody = oMapper.writeValueAsString(sdncRootNode); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n"+rpcMsgbody); + } + } catch (Exception e) { + + } + + } + + private Map loadMap(String msgType, String mapDirName) { + Map results = new HashMap(); + + + if (mapDirName == null) { + String rootdir = System.getenv(DMAAPLISTENERROOT); + + if ((rootdir == null) || (rootdir.length() == 0)) { + rootdir = "/opt/app/dmaap-listener"; + } + + mapDirName = rootdir + "/lib"; + + } + + String mapFilename = mapDirName + "/" + msgType + ".map"; + + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error("Cannot read map file ("+mapFilename+")"); + return(null); + } + + try { + BufferedReader mapReader = new BufferedReader(new FileReader(mapFile)); + + String curLine = null; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#"))) { + + if (curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map "+mapFilename, e); + return(null); + } + + return(results); + } + + + +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java new file mode 100644 index 000000000..6c6f308fb --- /dev/null +++ b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java @@ -0,0 +1,159 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdnc.dmaapclient; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.ProtocolException; +import java.net.URL; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SdncOdlConnection { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncOdlConnection.class); + + private HttpURLConnection httpConn = null; + + private String url = null; + private String user = null; + private String password = null; + + private class SdncAuthenticator extends Authenticator { + + private String user; + private String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + + } + + private SdncOdlConnection() { + + } + + private SdncOdlConnection(String url, String user, String password) { + this.url = url; + this.user = user; + this.password = password; + + try { + URL sdncUrl = new URL(url); + Authenticator.setDefault(new SdncAuthenticator(user, password)); + + this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); + } catch (Exception e) { + LOG.error("Unable to create http connection", e); + } + } + + public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException + { + return (new SdncOdlConnection(url, user, password)); + } + + + + public String send(String method, String contentType, String msg) throws IOException { + + LOG.info("Sending REST " + method + " to " + url); + LOG.info("Message body:\n" + msg); + String authStr = user + ":" + password; + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); + + httpConn.setRequestMethod(method); + httpConn.setRequestProperty("Content-Type", contentType); + httpConn.setRequestProperty("Accept", contentType); + + httpConn.setDoInput(true); + httpConn.setDoOutput(true); + httpConn.setUseCaches(false); + + if (httpConn instanceof HttpsURLConnection) { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); + } + + // Write message + httpConn.setRequestProperty("Content-Length", "" + msg.length()); + DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); + outStr.write(msg.getBytes()); + outStr.close(); + + // Read response + BufferedReader respRdr; + + LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); + + if (httpConn.getResponseCode() < 300) { + + respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); + } else { + respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); + } + + StringBuffer respBuff = new StringBuffer(); + + String respLn; + + while ((respLn = respRdr.readLine()) != null) { + respBuff.append(respLn + "\n"); + } + respRdr.close(); + + String respString = respBuff.toString(); + + LOG.info("Response body :\n" + respString); + + return (respString); + + } + + +} diff --git a/dmaap-listener/src/main/resources/edgeRouterStatusChange.map b/dmaap-listener/src/main/resources/edgeRouterStatusChange.map new file mode 100644 index 000000000..57644bbd5 --- /dev/null +++ b/dmaap-listener/src/main/resources/edgeRouterStatusChange.map @@ -0,0 +1,23 @@ +# SDN-C URL +SDNC.endpoint => FLOWRED-API:process-edge-router-status-change + +# Field mapping +equip_id => equip_id +ptnii_equip_name => equip-name +equip_type.equip_type => equip-type +ip_addr => loopback0 +router_prov_status => prov-status +country.region => region +country_abbr => country +equip_name_code => equip-name-code +as_number => as-number +loopback1 => loopback1 +loopback2 => loopback2 +loopback3 => loopback3 +loopback40 => loopback40 +loopback65535 => loopback65535 +inms_list => inms-list +encrypted_access_flag => encrypted-access-flag +sw_name => sw-name +nmipaddr => nm-addr +function_code => function-code \ No newline at end of file diff --git a/dmaap-listener/src/main/resources/log4j.properties b/dmaap-listener/src/main/resources/log4j.properties new file mode 100644 index 000000000..ba815871b --- /dev/null +++ b/dmaap-listener/src/main/resources/log4j.properties @@ -0,0 +1,37 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 ONAP Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +log4j.rootLogger=DEBUG,CONSOLE,LOGFILE + +# CONSOLE is set to be a ConsoleAppender using a PatternLayout. +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=ERROR +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n + +# LOGFILE is set to be a File appender using a PatternLayout. +log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender +log4j.appender.LOGFILE.File=/opt/app/dmaap-listener/logs/dmaap-listener.log +log4j.appender.LOGFILE.Append=true +log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout +log4j.appender.LOGFILE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n +log4j.appender.LOGFILE.MaxFileSize=10MB +log4j.appender.LOGFILE.MaxBackupIndex=10 diff --git a/dmaap-listener/src/main/resources/preferredRoute.txt b/dmaap-listener/src/main/resources/preferredRoute.txt new file mode 100644 index 000000000..662b0aa7d --- /dev/null +++ b/dmaap-listener/src/main/resources/preferredRoute.txt @@ -0,0 +1 @@ +preferredRouteKey=MR1 \ No newline at end of file diff --git a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh new file mode 100644 index 000000000..5eeb62bbf --- /dev/null +++ b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 ONAP Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +PROPERTY_DIR=${PROPERTY_DIR:-/opt/sdnc/data/properties} + +LISTENER=dmaap-listener + + + +PIDFILE=/tmp/.${LISTENER}-pid +UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/app/dmaap-listener} +JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle} +JAVA_OPTS=${JAVA_OPTS:--Dhttps.protocols=TLSv1.1,TLSv1.2} +JAVA=${JAVA:-${JAVA_HOME}/bin/java} + +# Redirect output from script to $LISTENER.out +exec >> ${UEBLISTENERROOT}/logs/$LISTENER.out +exec 2>&1 + +if [ -f $PIDFILE ] +then + pid=$(cat $PIDFILE) + if [ "$pid" != "" ] + then + if kill -0 $pid + then + echo "$LISTENER already running" + exit 0 + fi + fi +fi + +if [ ! -d ${UEBLISTENERROOT}/logs ] +then + mkdir ${UEBLISTENERROOT}/logs +fi + +for file in ${UEBLISTENERROOT}/lib/*.jar +do + LISTENERCLASSPATH=$LISTENERCLASSPATH:$file +done + +${JAVA} ${JAVA_OPTS} -Dlog4j.configuration=file:${UEBLISTENERROOT}/lib/log4j.properties -cp ${LISTENERCLASSPATH} com.att.sdnctl.dmaapclient.DmaapListener & + + +echo $! > $PIDFILE + +echo "$LISTENER started!" +exit 0 diff --git a/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh new file mode 100644 index 000000000..42de474fb --- /dev/null +++ b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 ONAP Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +PROPERTY_DIR=${PROPERTY_DIR:-/opt/sdnc/data/properties} + +LISTENER=dmaap-listener + + +PIDFILE=/tmp/.${LISTENER}-pid +UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/app/dmaap-listener} + +if [ -f $PIDFILE ] +then + pid=$(cat $PIDFILE) + if [ "$pid" != "" ] + then + if kill -0 $pid + then + echo "Stopping $LISTENER" + kill $pid && rm $PIDFILE + exit 0 + else + echo "$LISTENER not running" + exit 1 + fi + else + echo "$LISTENER not running" + exit 1 + fi +fi + + diff --git a/dmaap-listener/src/site/apt/index.apt b/dmaap-listener/src/site/apt/index.apt new file mode 100644 index 000000000..dd9d3ec39 --- /dev/null +++ b/dmaap-listener/src/site/apt/index.apt @@ -0,0 +1,46 @@ +~~~ +~~ ============LICENSE_START======================================================= +~~ openECOMP : SDN-C +~~ ================================================================================ +~~ Copyright (C) 2017 ONAP Intellectual Property. All rights +~~ reserved. +~~ ================================================================================ +~~ Licensed under the Apache License, Version 2.0 (the "License"); +~~ you may not use this file except in compliance with the License. +~~ You may obtain a copy of the License at +~~ +~~ http://www.apache.org/licenses/LICENSE-2.0 +~~ +~~ Unless required by applicable law or agreed to in writing, software +~~ distributed under the License is distributed on an "AS IS" BASIS, +~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~~ See the License for the specific language governing permissions and +~~ limitations under the License. +~~ ============LICENSE_END========================================================= +~~~ + + --- + UEB Listener + --- + + +UEB Listener + + The UEB Listener is a daemon that listens for notifications from SDC, posted to UEB (Universal Event Bus). + On receipt of an event, the UEB listener downloads any artifacts posted and examines them to determine if + the format (the outer XML tag) matches a supported format. If so, it posts the file to the ASDC-API REST + API in order to update the SDN-C database. + +File Locations + + * Root directory : /opt/app/ueb-listener + + * Log files : /opt/app/ueb-listener/logs + + * Incoming files to be processed : /opt/app/ueb-listener/spool/asdc/incoming + + * Files already processed : /opt/app/ueb-listener/spool/asdc/archive + + + + diff --git a/dmaap-listener/src/site/site.xml b/dmaap-listener/src/site/site.xml new file mode 100644 index 000000000..356c9c959 --- /dev/null +++ b/dmaap-listener/src/site/site.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + -- cgit 1.2.3-korg From 41df62392ed3d1775c29b7cc1feb161108026c39 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 15 Aug 2017 14:10:37 -0400 Subject: Refactor rest of sli/northbound Update remainder of sli/northbound to replace references to openECOMP with references to ONAP Change-Id: I2c321c9ec3f3138f3b7377ce1e0a8ff7e8f29bcc Issue-ID: CCSDK-25 Signed-off-by: Dan Timoney --- .../sli/northbound/dmaapclient/DmaapListener.java | 165 +++ .../northbound/dmaapclient/DummyDmaapConsumer.java | 37 + .../dmaapclient/InvalidMessageException.java | 37 + .../northbound/dmaapclient/SdncDmaapConsumer.java | 146 +++ .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 196 ++++ .../northbound/dmaapclient/SdncOdlConnection.java | 159 +++ .../openecomp/sdnc/dmaapclient/DmaapListener.java | 165 --- .../sdnc/dmaapclient/DummyDmaapConsumer.java | 37 - .../sdnc/dmaapclient/InvalidMessageException.java | 37 - .../sdnc/dmaapclient/SdncDmaapConsumer.java | 146 --- .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 196 ---- .../sdnc/dmaapclient/SdncOdlConnection.java | 159 --- example-settings.xml | 163 --- jenkins-settings.xml | 168 --- .../sli/northbound/uebclient/SdncARModel.java | 53 + .../sli/northbound/uebclient/SdncArtifactMap.java | 134 +++ .../sli/northbound/uebclient/SdncBaseModel.java | 297 ++++++ .../sli/northbound/uebclient/SdncNodeModel.java | 145 +++ .../northbound/uebclient/SdncOdlConnection.java | 158 +++ .../sli/northbound/uebclient/SdncServiceModel.java | 98 ++ .../sli/northbound/uebclient/SdncUebCallback.java | 1125 ++++++++++++++++++++ .../sli/northbound/uebclient/SdncUebClient.java | 65 ++ .../northbound/uebclient/SdncUebConfiguration.java | 280 +++++ .../sli/northbound/uebclient/SdncVFCModel.java | 69 ++ .../sli/northbound/uebclient/SdncVFModel.java | 56 + .../northbound/uebclient/SdncVFModuleModel.java | 45 + .../org/openecomp/sdnc/uebclient/SdncARModel.java | 53 - .../openecomp/sdnc/uebclient/SdncArtifactMap.java | 134 --- .../openecomp/sdnc/uebclient/SdncBaseModel.java | 297 ------ .../openecomp/sdnc/uebclient/SdncNodeModel.java | 145 --- .../sdnc/uebclient/SdncOdlConnection.java | 158 --- .../openecomp/sdnc/uebclient/SdncServiceModel.java | 98 -- .../openecomp/sdnc/uebclient/SdncUebCallback.java | 1125 -------------------- .../openecomp/sdnc/uebclient/SdncUebClient.java | 65 -- .../sdnc/uebclient/SdncUebConfiguration.java | 280 ----- .../org/openecomp/sdnc/uebclient/SdncVFCModel.java | 69 -- .../org/openecomp/sdnc/uebclient/SdncVFModel.java | 56 - .../sdnc/uebclient/SdncVFModuleModel.java | 45 - 38 files changed, 3265 insertions(+), 3596 deletions(-) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java delete mode 100644 dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java delete mode 100644 example-settings.xml delete mode 100644 jenkins-settings.xml create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java create mode 100644 ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncARModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncArtifactMap.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncBaseModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncNodeModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncOdlConnection.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncServiceModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebCallback.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebConfiguration.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFCModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java delete mode 100644 ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModuleModel.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java new file mode 100644 index 000000000..b2976294b --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -0,0 +1,165 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DmaapListener { + + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final Logger LOG = LoggerFactory + .getLogger(DmaapListener.class); + + public static void main(String[] args) { + + Properties properties = new Properties(); + + + String propFileName = DMAAP_LISTENER_PROPERTIES; + + if (args.length > 0) { + propFileName = args[0]; + } + + String propPath = null; + String propDir = System.getenv(SDNC_CONFIG_DIR); + + List consumers = new LinkedList(); + + if (propDir == null) { + + propDir = "/opt/sdnc/data/properties"; + } + + if (!propFileName.startsWith("/")) { + propPath = propDir + "/" + propFileName; + } + + File propFile = new File(propPath); + + if (!propFile.canRead()) { + LOG.error("Cannot read properties file "+propPath); + System.exit(1); + } + + try { + properties.load(new FileInputStream(propFile)); + } catch (Exception e) { + LOG.error("Caught exception loading properties from "+propPath, e); + System.exit(1); + } + + String subscriptionStr = properties.getProperty("subscriptions"); + + boolean threadsRunning = false; + + LOG.debug("Dmaap subscriptions : "+subscriptionStr); + + if (subscriptionStr != null) { + String[] subscriptions = subscriptionStr.split(";"); + + for (int i = 0; i < subscriptions.length; i++) { + String[] subscription = subscriptions[i].split(":"); + String consumerClassName = subscription[0]; + String propertyPath = subscription[1]; + + LOG.debug("Handling subscription [" + consumerClassName + "," + propertyPath + "]"); + + if (propertyPath == null) { + LOG.error("Invalid subscription (" + subscriptions[i] + ") property file missing"); + continue; + } + + if (!propertyPath.startsWith("/")) { + propertyPath = propDir + "/" + propertyPath; + } + + Class consumerClass = null; + + try { + consumerClass = Class.forName(consumerClassName); + } catch (Exception e) { + LOG.error("Could not find DMaap consumer class " + consumerClassName); + } + + if (consumerClass != null) { + + SdncDmaapConsumer consumer = null; + + try { + consumer = (SdncDmaapConsumer) consumerClass.newInstance(); + } catch (Exception e) { + LOG.error("Could not create consumer from class " + consumerClassName, e); + } + + if (consumer != null) { + LOG.debug("Initializing consumer " + consumerClassName + "(" + propertyPath + ")"); + consumer.init(properties, propertyPath); + + if (consumer.isReady()) { + Thread consumerThread = new Thread(consumer); + consumerThread.start(); + consumers.add(consumer); + threadsRunning = true; + LOG.info("Started consumer thread (" + consumerClassName + " : " + propertyPath + ")"); + } else { + LOG.debug("Consumer " + consumerClassName + " is not ready"); + } + } + + } + + } + } + + while (threadsRunning) { + + threadsRunning = false; + for (SdncDmaapConsumer consumer : consumers) { + if (consumer.isRunning()) { + threadsRunning = true; + } + } + + if (!threadsRunning) { + break; + } + + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + + } + } + + LOG.info("No listener threads running - exitting"); + + } +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java new file mode 100644 index 000000000..a3bc46153 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DummyDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory + .getLogger(DummyDmaapConsumer.class); + + @Override + public void processMsg(String msg) { + LOG.info("Consumed message: \n"+msg); + } + +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java new file mode 100644 index 000000000..b54adaf06 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +public class InvalidMessageException extends Exception { + + public InvalidMessageException() { + super(); + } + + public InvalidMessageException(String msg) { + super(msg); + } + + public InvalidMessageException(String msg, Throwable t) { + super(msg, t); + } +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java new file mode 100644 index 000000000..f6d8ff862 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -0,0 +1,146 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.att.nsa.mr.client.MRClientFactory; +import com.att.nsa.mr.client.MRConsumer; +import com.att.nsa.mr.client.response.MRConsumerResponse; + +public abstract class SdncDmaapConsumer implements Runnable { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncDmaapConsumer.class); + + private String propertiesPath = ""; + private Properties properties = null; + MRConsumer consumer = null; + MRConsumerResponse consumerResponse = null; + boolean running = false; + boolean ready = false; + int fetchPause = 5000; // Default pause between fetchs - 5 seconds + + public boolean isReady() { + return ready; + } + + int timeout = 15000; // Default timeout - 15 seconds + + public boolean isRunning() { + return running; + } + + public SdncDmaapConsumer() { + + } + + public SdncDmaapConsumer(Properties properties, String propertiesPath) { + init(properties, propertiesPath); + } + + public String getProperty(String name) { + return(properties.getProperty(name, "")); + } + + public void init(Properties properties, String propertiesPath) { + + this.propertiesPath = propertiesPath; + + try { + + this.properties = (Properties) properties.clone(); + + this.properties.load(new FileInputStream(new File(propertiesPath))); + + String timeoutStr = properties.getProperty("timeout"); + + if ((timeoutStr != null) && (timeoutStr.length() > 0)) { + try { + timeout = Integer.parseInt(timeoutStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for timeout ("+timeoutStr+")"); + } + } + + String fetchPauseStr = properties.getProperty("fetchPause"); + if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { + try { + fetchPause = Integer.parseInt(fetchPauseStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric valud specified for fetchPause ("+fetchPauseStr+")"); + } + } + + this.consumer = MRClientFactory.createConsumer(propertiesPath); + ready = true; + } catch (Exception e) { + LOG.error("Error initializing DMaaP consumer from file "+propertiesPath, e); + } + } + + + @Override + public void run() { + if (ready) { + + running = true; + + while (running) { + + try { + boolean noData = true; + consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); + for (String msg : consumerResponse.getActualMessages()) { + noData = false; + LOG.info("Received message from DMaaP:\n"+msg); + processMsg(msg); + } + + if (noData) { + if (fetchPause > 0) { + + LOG.info("No data received from fetch. Pausing "+fetchPause+" ms before retry"); + Thread.sleep(fetchPause); + } else { + + LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); + } + } + } catch (Exception e) { + LOG.error("Caught exception reading from DMaaP", e); + running = false; + } + + + } + } + + } + + abstract public void processMsg(String msg) throws InvalidMessageException; +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java new file mode 100644 index 000000000..0e2a32646 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -0,0 +1,196 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; + + +public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncFlatJsonDmaapConsumer.class); + + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + + + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + processMsg(msg, null); + } + + public void processMsg(String msg, String mapDirName) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode instarRootNode = null; + ObjectNode sdncRootNode = null; + + String instarMsgName = null; + + try { + instarRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + Iterator> instarFields = instarRootNode.fields(); + + while (instarFields.hasNext()) { + Map.Entry entry = instarFields.next(); + + instarMsgName = entry.getKey(); + instarRootNode = entry.getValue(); + break; + } + + Map fieldMap = loadMap(instarMsgName, mapDirName); + + if (fieldMap == null) { + throw new InvalidMessageException("Unable to process message - cannot load field mappings"); + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + throw new InvalidMessageException("No SDNC endpoint known for message "+instarMsgName); + } + + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + sdncRootNode = oMapper.createObjectNode(); + ObjectNode inputNode = oMapper.createObjectNode(); + + + for (String fromField : fieldMap.keySet()) { + + if (!SDNC_ENDPOINT.equals(fromField)) { + JsonNode curNode = instarRootNode.get(fromField); + if (curNode != null) { + String fromValue = curNode.textValue(); + + inputNode.put(fieldMap.get(fromField), fromValue); + } + } + } + sdncRootNode.put("input", inputNode); + + try { + String rpcMsgbody = oMapper.writeValueAsString(sdncRootNode); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n"+rpcMsgbody); + } + } catch (Exception e) { + + } + + } + + private Map loadMap(String msgType, String mapDirName) { + Map results = new HashMap(); + + + if (mapDirName == null) { + String rootdir = System.getenv(DMAAPLISTENERROOT); + + if ((rootdir == null) || (rootdir.length() == 0)) { + rootdir = "/opt/app/dmaap-listener"; + } + + mapDirName = rootdir + "/lib"; + + } + + String mapFilename = mapDirName + "/" + msgType + ".map"; + + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error("Cannot read map file ("+mapFilename+")"); + return(null); + } + + try { + BufferedReader mapReader = new BufferedReader(new FileReader(mapFile)); + + String curLine = null; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#"))) { + + if (curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map "+mapFilename, e); + return(null); + } + + return(results); + } + + + +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java new file mode 100644 index 000000000..4d16dd2a0 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java @@ -0,0 +1,159 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.ProtocolException; +import java.net.URL; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SdncOdlConnection { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncOdlConnection.class); + + private HttpURLConnection httpConn = null; + + private String url = null; + private String user = null; + private String password = null; + + private class SdncAuthenticator extends Authenticator { + + private String user; + private String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + + } + + private SdncOdlConnection() { + + } + + private SdncOdlConnection(String url, String user, String password) { + this.url = url; + this.user = user; + this.password = password; + + try { + URL sdncUrl = new URL(url); + Authenticator.setDefault(new SdncAuthenticator(user, password)); + + this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); + } catch (Exception e) { + LOG.error("Unable to create http connection", e); + } + } + + public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException + { + return (new SdncOdlConnection(url, user, password)); + } + + + + public String send(String method, String contentType, String msg) throws IOException { + + LOG.info("Sending REST " + method + " to " + url); + LOG.info("Message body:\n" + msg); + String authStr = user + ":" + password; + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); + + httpConn.setRequestMethod(method); + httpConn.setRequestProperty("Content-Type", contentType); + httpConn.setRequestProperty("Accept", contentType); + + httpConn.setDoInput(true); + httpConn.setDoOutput(true); + httpConn.setUseCaches(false); + + if (httpConn instanceof HttpsURLConnection) { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); + } + + // Write message + httpConn.setRequestProperty("Content-Length", "" + msg.length()); + DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); + outStr.write(msg.getBytes()); + outStr.close(); + + // Read response + BufferedReader respRdr; + + LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); + + if (httpConn.getResponseCode() < 300) { + + respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); + } else { + respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); + } + + StringBuffer respBuff = new StringBuffer(); + + String respLn; + + while ((respLn = respRdr.readLine()) != null) { + respBuff.append(respLn + "\n"); + } + respRdr.close(); + + String respString = respBuff.toString(); + + LOG.info("Response body :\n" + respString); + + return (respString); + + } + + +} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java deleted file mode 100644 index 7096d83bf..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DmaapListener.java +++ /dev/null @@ -1,165 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -import java.io.File; -import java.io.FileInputStream; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DmaapListener { - - private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; - private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - private static final Logger LOG = LoggerFactory - .getLogger(DmaapListener.class); - - public static void main(String[] args) { - - Properties properties = new Properties(); - - - String propFileName = DMAAP_LISTENER_PROPERTIES; - - if (args.length > 0) { - propFileName = args[0]; - } - - String propPath = null; - String propDir = System.getenv(SDNC_CONFIG_DIR); - - List consumers = new LinkedList(); - - if (propDir == null) { - - propDir = "/opt/sdnc/data/properties"; - } - - if (!propFileName.startsWith("/")) { - propPath = propDir + "/" + propFileName; - } - - File propFile = new File(propPath); - - if (!propFile.canRead()) { - LOG.error("Cannot read properties file "+propPath); - System.exit(1); - } - - try { - properties.load(new FileInputStream(propFile)); - } catch (Exception e) { - LOG.error("Caught exception loading properties from "+propPath, e); - System.exit(1); - } - - String subscriptionStr = properties.getProperty("subscriptions"); - - boolean threadsRunning = false; - - LOG.debug("Dmaap subscriptions : "+subscriptionStr); - - if (subscriptionStr != null) { - String[] subscriptions = subscriptionStr.split(";"); - - for (int i = 0; i < subscriptions.length; i++) { - String[] subscription = subscriptions[i].split(":"); - String consumerClassName = subscription[0]; - String propertyPath = subscription[1]; - - LOG.debug("Handling subscription [" + consumerClassName + "," + propertyPath + "]"); - - if (propertyPath == null) { - LOG.error("Invalid subscription (" + subscriptions[i] + ") property file missing"); - continue; - } - - if (!propertyPath.startsWith("/")) { - propertyPath = propDir + "/" + propertyPath; - } - - Class consumerClass = null; - - try { - consumerClass = Class.forName(consumerClassName); - } catch (Exception e) { - LOG.error("Could not find DMaap consumer class " + consumerClassName); - } - - if (consumerClass != null) { - - SdncDmaapConsumer consumer = null; - - try { - consumer = (SdncDmaapConsumer) consumerClass.newInstance(); - } catch (Exception e) { - LOG.error("Could not create consumer from class " + consumerClassName, e); - } - - if (consumer != null) { - LOG.debug("Initializing consumer " + consumerClassName + "(" + propertyPath + ")"); - consumer.init(properties, propertyPath); - - if (consumer.isReady()) { - Thread consumerThread = new Thread(consumer); - consumerThread.start(); - consumers.add(consumer); - threadsRunning = true; - LOG.info("Started consumer thread (" + consumerClassName + " : " + propertyPath + ")"); - } else { - LOG.debug("Consumer " + consumerClassName + " is not ready"); - } - } - - } - - } - } - - while (threadsRunning) { - - threadsRunning = false; - for (SdncDmaapConsumer consumer : consumers) { - if (consumer.isRunning()) { - threadsRunning = true; - } - } - - if (!threadsRunning) { - break; - } - - try { - Thread.sleep(10000); - } catch (InterruptedException e) { - - } - } - - LOG.info("No listener threads running - exitting"); - - } -} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java deleted file mode 100644 index 5edc1c908..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/DummyDmaapConsumer.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DummyDmaapConsumer extends SdncDmaapConsumer { - - private static final Logger LOG = LoggerFactory - .getLogger(DummyDmaapConsumer.class); - - @Override - public void processMsg(String msg) { - LOG.info("Consumed message: \n"+msg); - } - -} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java deleted file mode 100644 index 3de5df6c2..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/InvalidMessageException.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -public class InvalidMessageException extends Exception { - - public InvalidMessageException() { - super(); - } - - public InvalidMessageException(String msg) { - super(msg); - } - - public InvalidMessageException(String msg, Throwable t) { - super(msg, t); - } -} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java deleted file mode 100644 index 5b55bda5b..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncDmaapConsumer.java +++ /dev/null @@ -1,146 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -import java.io.File; -import java.io.FileInputStream; -import java.util.Properties; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.att.nsa.mr.client.MRClientFactory; -import com.att.nsa.mr.client.MRConsumer; -import com.att.nsa.mr.client.response.MRConsumerResponse; - -public abstract class SdncDmaapConsumer implements Runnable { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncDmaapConsumer.class); - - private String propertiesPath = ""; - private Properties properties = null; - MRConsumer consumer = null; - MRConsumerResponse consumerResponse = null; - boolean running = false; - boolean ready = false; - int fetchPause = 5000; // Default pause between fetchs - 5 seconds - - public boolean isReady() { - return ready; - } - - int timeout = 15000; // Default timeout - 15 seconds - - public boolean isRunning() { - return running; - } - - public SdncDmaapConsumer() { - - } - - public SdncDmaapConsumer(Properties properties, String propertiesPath) { - init(properties, propertiesPath); - } - - public String getProperty(String name) { - return(properties.getProperty(name, "")); - } - - public void init(Properties properties, String propertiesPath) { - - this.propertiesPath = propertiesPath; - - try { - - this.properties = (Properties) properties.clone(); - - this.properties.load(new FileInputStream(new File(propertiesPath))); - - String timeoutStr = properties.getProperty("timeout"); - - if ((timeoutStr != null) && (timeoutStr.length() > 0)) { - try { - timeout = Integer.parseInt(timeoutStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric value specified for timeout ("+timeoutStr+")"); - } - } - - String fetchPauseStr = properties.getProperty("fetchPause"); - if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { - try { - fetchPause = Integer.parseInt(fetchPauseStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric valud specified for fetchPause ("+fetchPauseStr+")"); - } - } - - this.consumer = MRClientFactory.createConsumer(propertiesPath); - ready = true; - } catch (Exception e) { - LOG.error("Error initializing DMaaP consumer from file "+propertiesPath, e); - } - } - - - @Override - public void run() { - if (ready) { - - running = true; - - while (running) { - - try { - boolean noData = true; - consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); - for (String msg : consumerResponse.getActualMessages()) { - noData = false; - LOG.info("Received message from DMaaP:\n"+msg); - processMsg(msg); - } - - if (noData) { - if (fetchPause > 0) { - - LOG.info("No data received from fetch. Pausing "+fetchPause+" ms before retry"); - Thread.sleep(fetchPause); - } else { - - LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); - } - } - } catch (Exception e) { - LOG.error("Caught exception reading from DMaaP", e); - running = false; - } - - - } - } - - } - - abstract public void processMsg(String msg) throws InvalidMessageException; -} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java deleted file mode 100644 index 7e9c069ac..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ /dev/null @@ -1,196 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.PasswordAuthentication; -import java.net.URL; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLSession; - -import org.apache.commons.codec.binary.Base64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; - - -public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncFlatJsonDmaapConsumer.class); - - private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; - private static final String SDNC_ENDPOINT = "SDNC.endpoint"; - - - - @Override - public void processMsg(String msg) throws InvalidMessageException { - - processMsg(msg, null); - } - - public void processMsg(String msg, String mapDirName) throws InvalidMessageException { - - if (msg == null) { - throw new InvalidMessageException("Null message"); - } - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode instarRootNode = null; - ObjectNode sdncRootNode = null; - - String instarMsgName = null; - - try { - instarRootNode = oMapper.readTree(msg); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } - - Iterator> instarFields = instarRootNode.fields(); - - while (instarFields.hasNext()) { - Map.Entry entry = instarFields.next(); - - instarMsgName = entry.getKey(); - instarRootNode = entry.getValue(); - break; - } - - Map fieldMap = loadMap(instarMsgName, mapDirName); - - if (fieldMap == null) { - throw new InvalidMessageException("Unable to process message - cannot load field mappings"); - } - - if (!fieldMap.containsKey(SDNC_ENDPOINT)) { - throw new InvalidMessageException("No SDNC endpoint known for message "+instarMsgName); - } - - String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); - - sdncRootNode = oMapper.createObjectNode(); - ObjectNode inputNode = oMapper.createObjectNode(); - - - for (String fromField : fieldMap.keySet()) { - - if (!SDNC_ENDPOINT.equals(fromField)) { - JsonNode curNode = instarRootNode.get(fromField); - if (curNode != null) { - String fromValue = curNode.textValue(); - - inputNode.put(fieldMap.get(fromField), fromValue); - } - } - } - sdncRootNode.put("input", inputNode); - - try { - String rpcMsgbody = oMapper.writeValueAsString(sdncRootNode); - String odlUrlBase = getProperty("sdnc.odl.url-base"); - String odlUser = getProperty("sdnc.odl.user"); - String odlPassword = getProperty("sdnc.odl.password"); - - if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { - SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); - - conn.send("POST", "application/json", rpcMsgbody); - } else { - LOG.info("POST message body would be:\n"+rpcMsgbody); - } - } catch (Exception e) { - - } - - } - - private Map loadMap(String msgType, String mapDirName) { - Map results = new HashMap(); - - - if (mapDirName == null) { - String rootdir = System.getenv(DMAAPLISTENERROOT); - - if ((rootdir == null) || (rootdir.length() == 0)) { - rootdir = "/opt/app/dmaap-listener"; - } - - mapDirName = rootdir + "/lib"; - - } - - String mapFilename = mapDirName + "/" + msgType + ".map"; - - File mapFile = new File(mapFilename); - - if (!mapFile.canRead()) { - LOG.error("Cannot read map file ("+mapFilename+")"); - return(null); - } - - try { - BufferedReader mapReader = new BufferedReader(new FileReader(mapFile)); - - String curLine = null; - - while ((curLine = mapReader.readLine()) != null) { - curLine = curLine.trim(); - - if ((curLine.length() > 0) && (!curLine.startsWith("#"))) { - - if (curLine.contains("=>")) { - String[] entry = curLine.split("=>"); - if (entry.length == 2) { - results.put(entry[0].trim(), entry[1].trim()); - } - } - } - } - mapReader.close(); - } catch (Exception e) { - LOG.error("Caught exception reading map "+mapFilename, e); - return(null); - } - - return(results); - } - - - -} diff --git a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java deleted file mode 100644 index 6c6f308fb..000000000 --- a/dmaap-listener/src/main/java/org/openecomp/sdnc/dmaapclient/SdncOdlConnection.java +++ /dev/null @@ -1,159 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.dmaapclient; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.PasswordAuthentication; -import java.net.ProtocolException; -import java.net.URL; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLSession; - -import org.apache.commons.codec.binary.Base64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class SdncOdlConnection { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncOdlConnection.class); - - private HttpURLConnection httpConn = null; - - private String url = null; - private String user = null; - private String password = null; - - private class SdncAuthenticator extends Authenticator { - - private String user; - private String passwd; - - SdncAuthenticator(String user, String passwd) { - this.user = user; - this.passwd = passwd; - } - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(user, passwd.toCharArray()); - } - - } - - private SdncOdlConnection() { - - } - - private SdncOdlConnection(String url, String user, String password) { - this.url = url; - this.user = user; - this.password = password; - - try { - URL sdncUrl = new URL(url); - Authenticator.setDefault(new SdncAuthenticator(user, password)); - - this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); - } catch (Exception e) { - LOG.error("Unable to create http connection", e); - } - } - - public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException - { - return (new SdncOdlConnection(url, user, password)); - } - - - - public String send(String method, String contentType, String msg) throws IOException { - - LOG.info("Sending REST " + method + " to " + url); - LOG.info("Message body:\n" + msg); - String authStr = user + ":" + password; - String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); - - httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); - - httpConn.setRequestMethod(method); - httpConn.setRequestProperty("Content-Type", contentType); - httpConn.setRequestProperty("Accept", contentType); - - httpConn.setDoInput(true); - httpConn.setDoOutput(true); - httpConn.setUseCaches(false); - - if (httpConn instanceof HttpsURLConnection) { - HostnameVerifier hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); - } - - // Write message - httpConn.setRequestProperty("Content-Length", "" + msg.length()); - DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); - outStr.write(msg.getBytes()); - outStr.close(); - - // Read response - BufferedReader respRdr; - - LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); - - if (httpConn.getResponseCode() < 300) { - - respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); - } else { - respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); - } - - StringBuffer respBuff = new StringBuffer(); - - String respLn; - - while ((respLn = respRdr.readLine()) != null) { - respBuff.append(respLn + "\n"); - } - respRdr.close(); - - String respString = respBuff.toString(); - - LOG.info("Response body :\n" + respString); - - return (respString); - - } - - -} diff --git a/example-settings.xml b/example-settings.xml deleted file mode 100644 index 2e7ce6445..000000000 --- a/example-settings.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - openecomp-release - - - openecomp-release - openecomp-release - https://ecomp-nexus:8443/repository/maven-releases/ - - true - never - - - false - - - - - - openecomp-release - openecomp-release - https://ecomp-nexus:8443/repository/maven-releases/ - - true - never - - - false - - - - - - - openecomp-snapshots - - - openecomp-snapshot - openecomp-snapshot - https://ecomp-nexus:8443/repository/maven-snapshots/ - - false - - - true - - - - - - openecomp-snapshot - openecomp-snapshot - https://ecomp-nexus:8443/repository/maven-snapshots/ - - false - - - true - - - - - - opendaylight-release - - - opendaylight-mirror - opendaylight-mirror - https://nexus.opendaylight.org/content/repositories/public/ - - true - never - - - false - - - - - - opendaylight-mirror - opendaylight-mirror - https://nexus.opendaylight.org/content/repositories/public/ - - true - never - - - false - - - - - - - opendaylight-snapshots - - - opendaylight-snapshot - opendaylight-snapshot - https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ - - false - - - true - - - - - - opendaylight-snapshot - opendaylight-snapshot - https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ - - false - - - true - - - - - - - - openecomp-release - openecomp-snapshots - opendaylight-release - opendaylight-snapshots - - - - - nexus - USERNAME - PASSWORD - - - openecomp-release - USERNAME - PASSWORD - - - openecomp-snapshot - USERNAME - PASSWORD - - - diff --git a/jenkins-settings.xml b/jenkins-settings.xml deleted file mode 100644 index 344994f85..000000000 --- a/jenkins-settings.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - openecomp-release - - - openecomp-release - openecomp-release - https://ecomp-nexus:8443/repository/maven-releases/ - - true - never - - - false - - - - - - openecomp-release - openecomp-release - https://ecomp-nexus:8443/repository/maven-releases/ - - true - never - - - false - - - - - - - openecomp-snapshots - - - openecomp-snapshot - openecomp-snapshot - https://ecomp-nexus:8443/repository/maven-snapshots/ - - false - - - true - - - - - - openecomp-snapshot - openecomp-snapshot - https://ecomp-nexus:8443/repository/maven-snapshots/ - - false - - - true - - - - - - opendaylight-release - - - opendaylight-mirror - opendaylight-mirror - https://nexus.opendaylight.org/content/repositories/public/ - - true - never - - - false - - - - - - opendaylight-mirror - opendaylight-mirror - https://nexus.opendaylight.org/content/repositories/public/ - - true - never - - - false - - - - - - - opendaylight-snapshots - - - opendaylight-snapshot - opendaylight-snapshot - https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ - - false - - - true - - - - - - opendaylight-snapshot - opendaylight-snapshot - https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ - - false - - - true - - - - - - - - openecomp-release - openecomp-snapshots - opendaylight-release - opendaylight-snapshots - - - - - nexus - ${ecomp.nexus.user} - ${ecomp.nexus.password} - - - openecomp-release - ${ecomp.nexus.user} - ${ecomp.nexus.password} - - - openecomp-snapshot - ${ecomp.nexus.user} - ${ecomp.nexus.password} - - - sdnc-javadoc - ${ecomp.nexus.user} - ${ecomp.nexus.password} - - - diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java new file mode 100644 index 000000000..3be906181 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.Metadata; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncARModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncARModel.class); + + public SdncARModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { + + super(sdcCsarHelper, nodeTemplate); + + // extract metadata + Metadata metadata = nodeTemplate.getMetadata(); + addParameter("type", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_TYPE)); + + // extract properties + //addParameter("role", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_ROLE)); + //addParameter("type", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_TYPE)); - wrong location, get from metadata + addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_ECOMPGENERATEDNAMING)); + addParameter("naming_policy", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_NAMINGPOLICY)); + //addParameter("depending_service", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_DEPENDINGSERVICE)); + //addParameter("service_dependency", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_SERVICEDEPENDENCY)); + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java new file mode 100644 index 000000000..d979a3206 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java @@ -0,0 +1,134 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncArtifactMap { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncArtifactMap.class); + + public class SdncArtifactType { + private String tag; + private String artifactType; + private String rpc; + private int pass; + + public String getTag() { + return tag; + } + public String getArtifactType() { + return artifactType; + } + public String getRpc() { + return rpc; + } + + public int getPass() { + return pass; + } + + public String getRpcUrl(String base) { + return(base+rpc); + } + + private SdncArtifactType(String tag, String rpc, String pass) { + this.tag = tag; + this.rpc = rpc; + try { + this.pass = Integer.parseInt(pass); + } catch (Exception e) { + LOG.error("Invalid pass value for artifact map entry ("+tag+","+rpc+","+pass+")"); + } + } + } + + + + private Map mapItems = new HashMap(); + + private int NumPasses = 1; + + public int getNumPasses() { + return NumPasses; + } + + public void load(String fileName) { + + File mapFile = new File(fileName); + + if (mapFile.exists() && mapFile.canRead()) { + + BufferedReader rdr = null; + try { + + rdr = new BufferedReader(new FileReader(mapFile)); + + for (String ln ; (ln = rdr.readLine()) != null ; ) { + String[] lnFields = ln.split(","); + if (lnFields.length == 3) { + SdncArtifactType entry = new SdncArtifactType(lnFields[0], lnFields[1], lnFields[2]); + mapItems.put(entry.getTag(), entry); + if (entry.getPass() + 1 > NumPasses ) { + NumPasses = entry.getPass() + 1; + } + } + } + + + } catch (Exception e) { + LOG.error("Caught exception reading artifact map", e); + return; + } finally { + if (rdr != null) { + try { + rdr.close(); + } catch (IOException e) { + + } + } + } + } + } + + public SdncArtifactType getMapping(String tag) { + if (mapItems.containsKey(tag)) { + return(mapItems.get(tag)); + } else { + return(null); + } + } + + public static SdncArtifactMap getInstance() { + return new SdncArtifactMap(); + } + +} 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 new file mode 100644 index 000000000..707eee7e4 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java @@ -0,0 +1,297 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import java.util.HashMap; +import java.util.Map; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.Group; +import org.openecomp.sdc.toscaparser.api.Metadata; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncBaseModel.class); + + protected String customizationUUID = null; + protected String invariantUUID = null; + protected String model_yaml = null; + protected String version = null; + + protected Map params = null; + protected ISdcCsarHelper sdcCsarHelper = null; + + public SdncBaseModel() { + + } + + public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) { + + params = new HashMap(); + this.sdcCsarHelper = sdcCsarHelper; + + // extract service metadata + invariantUUID = extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID); + addParameter("invariant_uuid",invariantUUID); + addParameter("version",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_VERSION)); + addParameter("name",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME)); + addParameter("description",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)); + addParameter("type",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_TYPE)); + addParameter("category",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_CATEGORY)); + } + + public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { + + params = new HashMap(); + this.sdcCsarHelper = sdcCsarHelper; + + // extract nodeTemplate metadata + Metadata metadata = nodeTemplate.getMetadata(); + customizationUUID = extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID); + addParameter("invariant_uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)); + addParameter("uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_UUID)); + addParameter("version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VERSION)); + } + + public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group) { + + params = new HashMap(); + this.sdcCsarHelper = sdcCsarHelper; + + // extract group metadata + Metadata metadata = group.getMetadata(); + //customizationUUID = extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULECUSTOMIZATIONUUID); - returning null + customizationUUID = extractValue (metadata, "vfModuleModelCustomizationUUID"); + addParameter("invariant_uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELINVARIANTUUID)); + addParameter("uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID)); + addParameter("version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELVERSION)); + } + + protected void addParameter (String name, String value) { + if (value != null && !value.isEmpty()) { + params.put(name, "\"" + value + "\""); + } + } + + protected void addIntParameter (String name, String value) { + if (value != null && !value.isEmpty()) { + params.put(name, value); + } + } + + public static void addIntParameter (String name, String value, Map params) { + if (value != null && !value.isEmpty()) { + params.put(name, value); + } + } + + public static void addParameter (String name, String value, Map params) { + if (value != null && !value.isEmpty()) { + params.put(name, "\"" + value + "\""); + } + } + + protected String extractValue (Metadata metadata, String name) { + String value = sdcCsarHelper.getMetadataPropertyValue(metadata, name); + if (value != null) { + return value; + } else { + return ""; + } + } + + public static String extractValue (ISdcCsarHelper sdcCsarHelper, Metadata metadata, String name) { + String value = sdcCsarHelper.getMetadataPropertyValue(metadata, name); + if (value != null) { + return value; + } else { + return ""; + } + } + + protected String extractValue (NodeTemplate nodeTemplate, String name) { + String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); + if (value != null) { + return value; + } else { + return ""; + } + } + + public static String extractValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { + String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); + if (value != null) { + return value; + } else { + return ""; + } + } + + protected String extractBooleanValue (NodeTemplate nodeTemplate, String name) { + String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); + if (value != null && !value.isEmpty()) { + return value.contains("true") ? "Y" : "N"; + } else { + return ""; + } + } + + public static String extractBooleanValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { + String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); + if (value != null && !value.isEmpty()) { + return value.contains("true") ? "Y" : "N"; + } else { + return ""; + } + } + + protected String extractValue (Group group, String name) { + String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); + if (value != null) { + return value; + } else { + return ""; + } + } + + protected String extractBooleanValue (Group group, String name) { + String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); + if (value != null && !value.isEmpty()) { + return value.contains("true") ? "Y" : "N"; + } else { + return ""; + } + } + + protected String extractInputDefaultValue (String name) { + String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); + if (value != null) { + return value; + } else { + return ""; + } + } + + protected String extractBooleanInputDefaultValue (String name) { + String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); + if (value != null && !value.isEmpty()) { + return value.contains("true") ? "Y" : "N"; + } else { + return ""; + } + } + + public static String extractInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { + String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); + if (value != null) { + return value; + } else { + return ""; + } + } + + public static String extractBooleanInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { + String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); + if (value != null && !value.isEmpty()) { + return value.contains("true") ? "Y" : "N"; + } else { + return ""; + } + } + + public static String extractSubstitutionMappingTypeName (ISdcCsarHelper sdcCsarHelper) { + String value = sdcCsarHelper.getServiceSubstitutionMappingsTypeName(); + if (value != null) { + return value; + } else { + return ""; + } + } + + public String getCustomizationUUID() { + return ("\"" + customizationUUID + "\""); + } + public String getCustomizationUUIDNoQuotes() { + return (customizationUUID); + } + public void setCustomizationUUID(String customizationUUID) { + this.customizationUUID = customizationUUID; + } + + public String getSql(String tableName, String model_yaml) { + + StringBuilder sb = new StringBuilder(); + sb.append("INSERT into " + tableName + " (customization_uuid, model_yaml, "); + + int paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + sb.append(paramKey); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(") values (" + getCustomizationUUID() + ", \"" + model_yaml + "\", "); + + paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + String paramValue = params.get(paramKey); + sb.append(paramValue); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(");"); + return sb.toString(); + } + + public static String getSql(String tableName, String keyName, String keyValue, String model_yaml, Map params) { + + StringBuilder sb = new StringBuilder(); + sb.append("INSERT into " + tableName + " (" + keyName + ", "); + + int paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + sb.append(paramKey); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(") values (" + keyValue + ", "); + + paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + String paramValue = params.get(paramKey); + sb.append(paramValue); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(");"); + return sb.toString(); + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java new file mode 100644 index 000000000..dcf668ed8 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java @@ -0,0 +1,145 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncNodeModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncNodeModel.class); + + private String serviceUUID = null; + private String ecompGeneratedNaming = null; + private String [] bindingUuids = null; + + // Using ASDC TOSCA Parser 17.07 + public SdncNodeModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { + + super(sdcCsarHelper, nodeTemplate); + + // extract inputs + String ecompGeneratedNaming = extractBooleanInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING); + addParameter("ecomp_generated_naming",ecompGeneratedNaming); + addParameter("naming_policy", extractInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY)); + + // extract properties + addParameter("network_type", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE)); + addParameter("network_role", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE)); + addParameter("network_scope", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE)); + addParameter("network_technology", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY)); + + // extract properties - network_assignments + addParameter("is_shared_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISSHAREDNETWORK)); + addParameter("is_external_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISEXTERNALNETWORK)); + + // extract properties - network_assignments - ipv4_subnet_default_assignment + String useIpv4 = extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#use_ipv4"); + addParameter("use_ipv4", useIpv4); + addParameter("ipv4_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#dhcp_enabled")); + if (useIpv4.contains("Y")) { + addParameter("ipv4_ip_version", "ipv4"); + } + addParameter("ipv4_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#cidr_mask")); + addParameter("eipam_v4_address_plan", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#ip_network_address_plan")); + + // extract properties - network_assignments - ipv6_subnet_default_assignment + String useIpv6 = extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#use_ipv6"); + addParameter("use_ipv6", useIpv6); + addParameter("ipv6_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#dhcp_enabled")); + if (useIpv6.contains("Y")) { + addParameter("ipv6_ip_version", "ipv6"); + } + addParameter("ipv6_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#cidr_mask")); + addParameter("eipam_v6_address_plan", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#ip_network_address_plan")); + + // extract properties - provider_network + addParameter("is_provider_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK)); + addParameter("physical_network_name", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_PHYSICALNETWORKNAME)); + + // extract properties - network_flows + addParameter("is_bound_to_vpn", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_ISBOUNDTOVPN)); + + // extract properties - network_flows - vpn_bindings + String vpnBindingString = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_VPNBINDING); + bindingUuids = vpnBindingString.split(","); + +} + + public String getServiceUUID() { + return serviceUUID; + } + public void setServiceUUID(String serviceUUID) { + this.serviceUUID = serviceUUID; + } + + public String getEcompGeneratedNaming() { + return ecompGeneratedNaming; + } + public void setEcompGeneratedNaming(String ecompGeneratedNaming) { + this.ecompGeneratedNaming = ecompGeneratedNaming; + if (ecompGeneratedNaming != null && !ecompGeneratedNaming.isEmpty()) { + params.put("ecomp_generated_naming", "\"" + ecompGeneratedNaming + "\""); + } + } + + public String getSql(String model_yaml) { + + StringBuilder sb = new StringBuilder(); + sb.append("INSERT into NETWORK_MODEL (service_uuid, customization_uuid, model_yaml, "); + + int paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + sb.append(paramKey); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(") values (" + serviceUUID + ", " + getCustomizationUUID() + ", \"" + model_yaml + "\", "); + + paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + String paramValue = params.get(paramKey); + sb.append(paramValue); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(");"); + return sb.toString(); + } + + public String getVpnBindingsSql() { + + StringBuilder sb = new StringBuilder(); + for (int i=0; i < bindingUuids.length; i++) { + sb.append("INSERT into VPN_BINDINGS (network_customization_uuid, binding_uuid) values (" + getCustomizationUUID() + ", \"" + bindingUuids[i] + "\"); "); + } + + return sb.toString(); + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java new file mode 100644 index 000000000..7bee801d2 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java @@ -0,0 +1,158 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.URL; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SdncOdlConnection { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncOdlConnection.class); + + private HttpURLConnection httpConn = null; + + private String url = null; + private String user = null; + private String password = null; + + private class SdncAuthenticator extends Authenticator { + + private String user; + private String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + + } + + private SdncOdlConnection() { + + } + + private SdncOdlConnection(String url, String user, String password) { + this.url = url; + this.user = user; + this.password = password; + + try { + URL sdncUrl = new URL(url); + Authenticator.setDefault(new SdncAuthenticator(user, password)); + + this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); + } catch (Exception e) { + LOG.error("Unable to create http connection", e); + } + } + + public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException + { + return (new SdncOdlConnection(url, user, password)); + } + + + + public String send(String method, String contentType, String msg) throws IOException { + + LOG.info("Sending REST " + method + " to " + url); + LOG.info("Message body:\n" + msg); + String authStr = user + ":" + password; + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); + + httpConn.setRequestMethod(method); + httpConn.setRequestProperty("Content-Type", contentType); + httpConn.setRequestProperty("Accept", contentType); + + httpConn.setDoInput(true); + httpConn.setDoOutput(true); + httpConn.setUseCaches(false); + + if (httpConn instanceof HttpsURLConnection) { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); + } + + // Write message + httpConn.setRequestProperty("Content-Length", "" + msg.length()); + DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); + outStr.write(msg.getBytes()); + outStr.close(); + + // Read response + BufferedReader respRdr; + + LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); + + if (httpConn.getResponseCode() < 300) { + + respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); + } else { + respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); + } + + StringBuffer respBuff = new StringBuffer(); + + String respLn; + + while ((respLn = respRdr.readLine()) != null) { + respBuff.append(respLn + "\n"); + } + respRdr.close(); + + String respString = respBuff.toString(); + + LOG.info("Response body :\n" + respString); + + return (respString); + + } + + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java new file mode 100644 index 000000000..86a4d2a25 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java @@ -0,0 +1,98 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.Metadata; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncServiceModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncServiceModel.class); + + private String UUID = null; + private String serviceInstanceNamePrefix = null; + private String filename = null; + + public SdncServiceModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) { + + super(sdcCsarHelper, metadata); + + UUID = extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_UUID); + + // extract service topology template input data + addParameter("ecomp_naming",extractBooleanInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING)); + addParameter("naming_policy",extractInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY)); + } + + public String getServiceUUID() { + return ("\"" + UUID + "\""); + } + public void setServiceUUID(String serviceUUID) { + this.UUID = serviceUUID; + } + public String getServiceInstanceNamePrefix() { + return serviceInstanceNamePrefix; + } + public void setServiceInstanceNamePrefix(String serviceInstanceNamePrefix) { + if (serviceInstanceNamePrefix != null && !serviceInstanceNamePrefix.isEmpty()) { + this.serviceInstanceNamePrefix = serviceInstanceNamePrefix; + params.put("service_instance_name_prefix", "\"" + serviceInstanceNamePrefix + "\""); + } + } + public String getFilename() { + return filename; + } + public void setFilename(String filename) { + this.filename = filename; + } + + public String getSql(String model_yaml) { + + StringBuilder sb = new StringBuilder(); + sb.append("INSERT into SERVICE_MODEL (service_uuid, model_yaml, filename, "); + + int paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + sb.append(paramKey); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(") values (" + getServiceUUID() + ", \"" + model_yaml + "\", \"" + filename + "\", "); + + paramCount = 0; + for (String paramKey : params.keySet()) { + paramCount++; + String paramValue = params.get(paramKey); + sb.append(paramValue); + if (paramCount < params.size()) sb.append(", "); + } + + sb.append(");"); + return sb.toString(); + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java new file mode 100644 index 000000000..fd304208c --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -0,0 +1,1125 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import javax.sql.rowset.CachedRowSet; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.tuple.Pair; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.onap.ccsdk.sli.northbound.uebclient.SdncArtifactMap.SdncArtifactType; +import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.consumer.IDistributionStatusMessage; +import org.openecomp.sdc.api.consumer.INotificationCallback; +import org.openecomp.sdc.api.notification.IArtifactInfo; +import org.openecomp.sdc.api.notification.INotificationData; +import org.openecomp.sdc.api.notification.IResourceInstance; +import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; +import org.openecomp.sdc.api.results.IDistributionClientResult; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; +import org.openecomp.sdc.toscaparser.api.Group; +import org.openecomp.sdc.toscaparser.api.Metadata; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.openecomp.sdc.utils.ArtifactTypeEnum; +import org.openecomp.sdc.utils.DistributionActionResultEnum; +import org.openecomp.sdc.utils.DistributionStatusEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +public class SdncUebCallback implements INotificationCallback { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncUebCallback.class); + + private static DBResourceManager jdbcDataSource = null; + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + + + private class SdncAuthenticator extends Authenticator { + + private final String user; + private final String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + + } + + private class DeployableArtifact { + SdncArtifactType type; + IArtifactInfo artifactInfo; + String svcName; + String resourceName; + String artifactName; + String artifactVersion; + File file; + + public String getArtifactName() { + return artifactName; + } + + + + public String getArtifactVersion() { + return artifactVersion; + } + + + public SdncArtifactType getType() { + return type; + } + + + + public IArtifactInfo getArtifactInfo() { + return artifactInfo; + } + + + public File getFile() { + return file; + } + + + + + public DeployableArtifact(SdncArtifactType type, String svcName, String resourceName, IArtifactInfo artifactInfo, File file) { + this.type = type; + this.artifactInfo = artifactInfo; + this.svcName = svcName; + this.resourceName = resourceName; + this.artifactName = artifactInfo.getArtifactName(); + this.artifactVersion = artifactInfo.getArtifactVersion(); + this.file = file; + } + + + public DeployableArtifact(SdncArtifactType type, String svcName, String resourceName, String artifactName, String artifactVersion, File file) { + this.type = type; + this.artifactInfo = null; + this.svcName = svcName; + this.resourceName = resourceName; + this.artifactName = artifactName; + this.artifactVersion = artifactVersion; + this.file = file; + } + + + + public String getSvcName() { + return svcName; + } + + + + public String getResourceName() { + return resourceName; + } + + } + + private final IDistributionClient client; + private final SdncUebConfiguration config; + + private LinkedList deployList[]; + + private static void setJdbcDataSource() throws IOException { + + String propPath = null; + String propDir = System.getenv(SDNC_CONFIG_DIR); + if (propDir == null) { + + propDir = "/opt/sdnc/data/properties"; + } + propPath = propDir + "/dblib.properties"; + File propFile = new File(propPath); + + if (!propFile.exists()) { + + throw new FileNotFoundException( + "Missing configuration properties file : " + + propFile); + } + + Properties props = new Properties(); + props.load(new FileInputStream(propFile)); + + try { + jdbcDataSource = DBResourceManager.create(props); + } catch(Throwable exc) { + LOG.error("", exc); + } + + if(((DBResourceManager)jdbcDataSource).isActive()){ + LOG.warn( "DBLIB: JDBC DataSource has been initialized."); + } else { + LOG.warn( "DBLIB: JDBC DataSource did not initialize successfully."); + } + } + + private static void loadArtifactMap() { + + } + + public SdncUebCallback(IDistributionClient client, SdncUebConfiguration config) { + this.client = client; + this.config = config; + + } + + @Override + public void activateCallback(INotificationData data) { + + LOG.info("Received notification : ("+data.getDistributionID()+","+data.getServiceName()+","+data.getServiceVersion()+ + ","+data.getServiceDescription() + ")"); + + String incomingDirName = config.getIncomingDir(); + String archiveDirName = config.getArchiveDir(); + + File incomingDir = null; + File archiveDir = null; + + if (!incomingDir.exists()) { + incomingDir.mkdirs(); + } + + + if (!archiveDir.exists()) { + archiveDir.mkdirs(); + } + + // Process service level artifacts + List artifactList = data.getServiceArtifacts(); + + if (artifactList != null) { + + incomingDir = new File(incomingDirName + "/" + escapeFilename(data.getServiceName())); + if (!incomingDir.exists()) { + incomingDir.mkdirs(); + } + + archiveDir = new File(archiveDirName + "/" + escapeFilename(data.getServiceName())); + if (!archiveDir.exists()) { + archiveDir.mkdirs(); + } + for (IArtifactInfo curArtifact : artifactList) + { + + LOG.info("Received artifact " + curArtifact.getArtifactName()); + + handleArtifact(data, data.getServiceName(), null, null, curArtifact, incomingDir, archiveDir); + } + } + + + // Process resource level artifacts + for (IResourceInstance curResource : data.getResources()) { + + LOG.info("Received resource : "+curResource.getResourceName()); + artifactList = curResource.getArtifacts(); + + if (artifactList != null) { + + incomingDir = new File(incomingDirName + "/" + escapeFilename(data.getServiceName()) + "/" + escapeFilename(curResource.getResourceName())); + if (!incomingDir.exists()) { + incomingDir.mkdirs(); + } + + archiveDir = new File(archiveDirName + "/" + escapeFilename(data.getServiceName()) + "/" + escapeFilename(curResource.getResourceName())); + if (!archiveDir.exists()) { + archiveDir.mkdirs(); + } + for (IArtifactInfo curArtifact : artifactList) + { + + LOG.info("Received artifact " + curArtifact.getArtifactName()); + + handleArtifact(data, data.getServiceName(), curResource.getResourceName(), curResource.getResourceType(), curArtifact, incomingDir, archiveDir); + } + } + } + + deployDownloadedFiles(incomingDir, archiveDir, data); + + + } + + + public void deployDownloadedFiles(File incomingDir, File archiveDir, INotificationData data) { + + if (incomingDir == null) { + incomingDir = new File(config.getIncomingDir()); + + if (!incomingDir.exists()) { + incomingDir.mkdirs(); + } + + } + + if (archiveDir == null) { + archiveDir = new File(config.getArchiveDir()); + + if (!archiveDir.exists()) { + archiveDir.mkdirs(); + } + } + + String curFileName = ""; + try (DirectoryStream stream = Files.newDirectoryStream(incomingDir.toPath())) { + for (Path file: stream) { + curFileName = file.toString(); + handleSuccessfulDownload(null,null, null, null, file.toFile(), archiveDir); + } + } catch (Exception x) { + // IOException can never be thrown by the iteration. + // In this snippet, it can only be thrown by newDirectoryStream. + LOG.warn("Cannot process spool file "+ curFileName, x); + } + + // Deploy scheduled deployments + int numPasses = config.getMaxPasses(); + + deployList = new LinkedList[numPasses]; + + for (int i = 0 ; i < numPasses ; i++) { + deployList[i] = new LinkedList(); + } + for (int pass = 0 ; pass < config.getMaxPasses() ; pass++) { + + if (deployList[pass] != null) { + while (! deployList[pass].isEmpty()) { + DeployableArtifact artifact = deployList[pass].pop(); + + DistributionStatusEnum deployResult = DistributionStatusEnum.DEPLOY_ERROR; + + + try { + + deployResult = deploySpoolFile(artifact); + } catch (Exception e) { + LOG.error("Caught exception trying to deploy file", e); + } + + + IArtifactInfo artifactInfo = artifact.getArtifactInfo(); + + if ((artifactInfo != null) && (data != null)) { + IDistributionClientResult deploymentStatus; + deploymentStatus = client.sendDeploymentStatus(buildStatusMessage( + client, data, artifactInfo, + deployResult)); + } + + } + } + } + } + + private void handleArtifact(INotificationData data, String svcName, String resourceName, String resourceType, IArtifactInfo artifact, File incomingDir, File archiveDir) { + + // Download Artifact + IDistributionClientDownloadResult downloadResult = client + .download(artifact); + + if (downloadResult == null) { + + handleFailedDownload(data, artifact); + return; + } + + byte[] payloadBytes = downloadResult.getArtifactPayload(); + + if (payloadBytes == null) { + handleFailedDownload(data, artifact); + return; + } + + String payload = new String(payloadBytes); + + + File spoolFile = new File(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName()); + + boolean writeSucceeded = false; + + try { + FileWriter spoolFileWriter = new FileWriter(spoolFile); + spoolFileWriter.write(payload); + spoolFileWriter.close(); + writeSucceeded = true; + } catch (Exception e) { + LOG.error("Unable to save downloaded file to spool directory ("+ incomingDir.getAbsolutePath() +")", e); + } + + + if (writeSucceeded && (downloadResult.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS)) { + handleSuccessfulDownload(data, svcName, resourceName, artifact, spoolFile, archiveDir); + + + } else { + handleFailedDownload(data, artifact); + } + + } + + private void handleFailedDownload(INotificationData data, + IArtifactInfo relevantArtifact) { + // Send Download Status + IDistributionClientResult sendDownloadStatus = client + .sendDownloadStatus(buildStatusMessage(client, data, + relevantArtifact, DistributionStatusEnum.DOWNLOAD_ERROR)); + } + + private void handleSuccessfulDownload(INotificationData data, String svcName, String resourceName, + IArtifactInfo artifact, File spoolFile, File archiveDir) { + + if ((data != null) && (artifact != null)) { + // Send Download Status + IDistributionClientResult sendDownloadStatus = client + .sendDownloadStatus(buildStatusMessage(client, data, artifact, DistributionStatusEnum.DOWNLOAD_OK)); + } + + // If an override file exists, read that instead of the file we just downloaded + ArtifactTypeEnum artifactEnum = ArtifactTypeEnum.YANG_XML; + + boolean toscaYamlType = false; + if (artifact != null) { + String artifactTypeString = artifact.getArtifactType(); + if (artifactTypeString.contains("TOSCA_TEMPLATE")) { + toscaYamlType = true; + } + } else { + if (spoolFile.toString().contains(".yml") || spoolFile.toString().contains(".csar")) { + toscaYamlType = true; + } + } + String overrideFileName = config.getOverrideFile(); + if ((overrideFileName != null) && (overrideFileName.length() > 0)) { + File overrideFile = new File(overrideFileName); + + if (overrideFile.exists()) { + artifactEnum = ArtifactTypeEnum.YANG_XML; + spoolFile = overrideFile; + } + + } + + if (toscaYamlType == true) { + processToscaYaml (data, svcName, resourceName, artifact, spoolFile, archiveDir); + + try { + Path source = spoolFile.toPath(); + Path targetDir = archiveDir.toPath(); + + Files.move(source, targetDir.resolve(source.getFileName()), StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + LOG.warn("Could not move "+spoolFile.getAbsolutePath()+" to "+archiveDir.getAbsolutePath(), e); + } + + return; + } + + // Process spool file + Document spoolDoc = null; + File transformedFile = null; + + // Apply XSLTs and get Doc object + try { + if (!spoolFile.isDirectory()) { + transformedFile = applyXslts(spoolFile); + } + } catch (Exception e) { + LOG.error("Caught exception trying to parse XML file", e); + } + + if (transformedFile != null) { + try { + + try { + + DocumentBuilderFactory dbf = DocumentBuilderFactory + .newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + + spoolDoc = db.parse(transformedFile); + } catch (Exception e) { + LOG.error( + "Caught exception trying to parse transformed XML file " + + transformedFile.getAbsolutePath(), e); + } + + } catch (Exception e) { + LOG.error("Caught exception trying to deploy file", e); + } + } + + + if (spoolDoc != null) { + // Analyze file type + SdncArtifactType artifactType = analyzeFileType(artifactEnum, + spoolFile, spoolDoc); + + if (artifactType != null) { + + scheduleDeployment(artifactType, svcName, resourceName, artifact, spoolFile.getName(), transformedFile); + + } + + // SDNGC-2660 : Move file to archive directory even if it is an unrecognized type so that + // we do not keep trying and failing to process it. + try { + Path source = spoolFile.toPath(); + Path targetDir = archiveDir.toPath(); + + Files.move(source, targetDir.resolve(source.getFileName()), StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + LOG.warn("Could not move "+spoolFile.getAbsolutePath()+" to "+archiveDir.getAbsolutePath(), e); + } + } + + + } + + + private void processToscaYaml(INotificationData data, String svcName, String resourceName, + IArtifactInfo artifact, File spoolFile, File archiveDir) { + + // Use ASDC Dist Client 1.1.5 with TOSCA parsing APIs to extract relevant TOSCA model data + + // TOSCA data extraction flow 1707: + // Use ASDC dist-client to get yaml string - not yet available + String model_yaml = null; + LOG.info("Process TOSCA YAML file: "+spoolFile.toString()); + + SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); + ISdcCsarHelper sdcCsarHelper = null; + try { + sdcCsarHelper = factory.getSdcCsarHelper(spoolFile.getAbsolutePath()); + } catch (SdcToscaParserException e) { + LOG.error("Could not create SDC TOSCA Parser ", e); + factory.close(); + return; + } + + // Ingest Service Data - 1707 + Metadata serviceMetadata = sdcCsarHelper.getServiceMetadata(); + SdncServiceModel serviceModel = new SdncServiceModel(sdcCsarHelper, serviceMetadata); + serviceModel.setFilename(spoolFile.toString().substring(spoolFile.toString().lastIndexOf("/")+1)); // will be csar file name + serviceModel.setServiceInstanceNamePrefix(SdncBaseModel.extractSubstitutionMappingTypeName(sdcCsarHelper).substring(SdncBaseModel.extractSubstitutionMappingTypeName(sdcCsarHelper).lastIndexOf(".")+1)); + + try { + cleanUpExistingToscaServiceData(serviceModel.getServiceUUID()); + LOG.info("Call insertToscaData for SERVICE_MODEL serviceUUID = " + serviceModel.getServiceUUID()); + insertToscaData(serviceModel.getSql(model_yaml)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the SERVICE_MODEL table ", e); + factory.close(); + return; + } + + // Ingest Network (VL) Data - 1707 + //List vlNodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VL"); + List vlNodeTemplatesList = sdcCsarHelper.getServiceVlList(); + + for (NodeTemplate nodeTemplate : vlNodeTemplatesList) { + SdncNodeModel nodeModel = new SdncNodeModel (sdcCsarHelper, nodeTemplate); + nodeModel.setServiceUUID(serviceModel.getServiceUUID()); + nodeModel.setEcompGeneratedNaming(SdncBaseModel.extractBooleanInputDefaultValue(sdcCsarHelper, SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING));//service_naming#default#ecomp_generated_naming + + try { + cleanUpExistingToscaData("NETWORK_MODEL", "customization_uuid", nodeModel.getCustomizationUUID()); + cleanUpExistingToscaData("VPN_BINDINGS", "network_customization_uuid", nodeModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for NETWORK_MODEL customizationUUID = " + nodeModel.getCustomizationUUID()); + // using ASDC dist-client use method for get yaml string + insertToscaData(nodeModel.getSql(model_yaml)); + insertToscaData(nodeModel.getVpnBindingsSql()); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the NETWORK_MODEL table ", e); + } + } + + // Ingest Allotted Resource Data - 1707 + List arNodeTemplatesList = sdcCsarHelper.getAllottedResources(); + + for (NodeTemplate nodeTemplate : arNodeTemplatesList) { + SdncARModel nodeModel = new SdncARModel (sdcCsarHelper, nodeTemplate); + + try { + cleanUpExistingToscaData("ALLOTTED_RESOURCE_MODEL", "customization_uuid", nodeModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for ALLOTTED_RESOURCE_MODEL customizationUUID = " + nodeModel.getCustomizationUUID()); + // using ASDC dist-client use method for get yaml string + insertToscaData(nodeModel.getSql("ALLOTTED_RESOURCE_MODEL", model_yaml)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the NETWORK_MODEL table ", e); + } + } + + // Ingest Network (VF) Data - 1707 + //List nodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VF"); + List vfNodeTemplatesList = sdcCsarHelper.getServiceVfList(); + + for (NodeTemplate nodeTemplate : vfNodeTemplatesList) { + SdncVFModel vfNodeModel = new SdncVFModel (sdcCsarHelper, nodeTemplate); + + try { + cleanUpExistingToscaData("VF_MODEL", "customization_uuid", vfNodeModel.getCustomizationUUID()) ; + LOG.info("Call insertToscaData for VF_MODEL customizationUUID = " + vfNodeModel.getCustomizationUUID()); + insertToscaData(vfNodeModel.getSql("VF_MODEL", model_yaml)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VF_MODEL table ", e); + } + + // For each VF, insert VF_MODULE_MODEL data + List vfModules = sdcCsarHelper.getVfModulesByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); + for (Group group : vfModules){ + SdncVFModuleModel vfModuleModel = new SdncVFModuleModel(sdcCsarHelper, group); + + try { + cleanUpExistingToscaData("VF_MODULE_MODEL", "customization_uuid", vfModuleModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for VF_MODULE_MODEL customizationUUID = " + vfModuleModel.getCustomizationUUID()); + insertToscaData(vfModuleModel.getSql("VF_MODULE_MODEL", model_yaml)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VF_MODULE_MODEL table ", e); + } + + // For each VF Module, get the VFC list, insert VF_MODULE_TO_VFC_MAPPING data + // List groupMembers = sdcCsarHelper.getMembersOfGroup(group); - old version + // For each vfcNode (group member) in the groupMembers list, extract vm_type and vm_count. + // Insert vf_module.customizationUUID, vfcNode.customizationUUID and vm_type and vm_count into VF_MODULE_TO_VFC_MAPPING + List groupMembers = sdcCsarHelper.getMembersOfVfModule(nodeTemplate, group); // not yet available + for (NodeTemplate vfcNode : groupMembers){ + SdncVFCModel vfcModel = new SdncVFCModel(sdcCsarHelper, vfcNode); + + try { + cleanUpExistingToscaData("VF_MODULE_TO_VFC_MAPPING", "vf_module_customization_uuid", vfModuleModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for VF_MODULE_TO_VFC_MAPPING customizationUUID = " + vfModuleModel.getCustomizationUUID()); + insertToscaData("insert into VF_MODULE_TO_VFC_MAPPING (vf_module_customization_uuid, vfc_customization_uuid, vm_type, vm_count) values (" + + vfModuleModel.getCustomizationUUID() + ", " + vfcModel.getCustomizationUUID() + ", \"" + vfcModel.getVmType() + "\", \"" + vfcModel.getVmCount() + "\")"); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VF_MODULE_TO_VFC_MAPPING table ", e); + } + + } + + } + + // For each VF, insert VFC_MODEL data + List vfcNodes = sdcCsarHelper.getVfcListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); + for (NodeTemplate vfcNode : vfcNodes){ + SdncVFCModel vfcModel = new SdncVFCModel(sdcCsarHelper, vfcNode); + + try { + cleanUpExistingToscaData("VFC_MODEL", "customization_uuid", vfcModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for VFC_MODEL customizationUUID = " + vfcModel.getCustomizationUUID()); + insertToscaData(vfcModel.getSql("VFC_MODEL", model_yaml)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VFC_MODEL table ", e); + } + + } + + // For each VF, insert VF_TO_NETWORK_ROLE_MAPPING data + List cpNodes = sdcCsarHelper.getCpListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); + for (NodeTemplate cpNode : cpNodes){ + + // Insert into VF_TO_NETWORK_ROLE_MAPPING vf_customization_uuid and network_role + String cpNetworkRole = sdcCsarHelper.getNodeTemplatePropertyLeafValue(cpNode, "network_role_tag"); + + try { + cleanUpExistingToscaData("VF_TO_NETWORK_ROLE_MAPPING", "vf_customization_uuid", vfNodeModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for VF_TO_NETWORK_ROLE_MAPPING vfCustomizationUUID = " + vfNodeModel.getCustomizationUUID()); + insertToscaData("insert into VF_TO_NETWORK_ROLE_MAPPING (vf_customization_uuid, network_role) values (" + + vfNodeModel.getCustomizationUUID() + ", \"" + cpNetworkRole + "\")"); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VF_TO_NETWORK_ROLE_MAPPING table ", e); + } + + // Insert VFC_TO_NETWORK_ROLE_MAPPING data + Map mappingParams = new HashMap(); + //String cpNetworkRoleTag = "\"" + sdcCsarHelper.getNodeTemplatePropertyLeafValue(cpNode, SdcPropertyNames.PROPERTY_NAME_NETWORKROLETAG) + "\""; + // extract network_role, network_role_tag and virtual_binding from this cpNode + SdncBaseModel.addParameter("network_role", SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "network_role"), mappingParams); + SdncBaseModel.addParameter("network_role_tag", SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "network_role_tag"), mappingParams); + String virtualBinding = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "requirements#virtualBinding") + "\""; + + // get list of cpNodes and vfcNodes with matching virtualBinding + List> matchList = sdcCsarHelper.getNodeTemplatePairsByReqName(sdcCsarHelper.getCpListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()), sdcCsarHelper.getVfcListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()), virtualBinding); + for (Pair match : matchList) { // should be 1 match? + + // extract values from the left "CP" Node + SdncBaseModel.addParameter("ipv4_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams); + //SdncBaseModel.addParameter("ipv4_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams); + SdncBaseModel.addParameter("ipv4_ip_version", "dummy_ipv4_vers", mappingParams); + SdncBaseModel.addParameter("ipv6_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams); + //SdncBaseModel.addParameter("ipv6_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams); + SdncBaseModel.addParameter("ipv6_ip_version", "dummy_ipv6_vers", mappingParams); + //String extcp_subnetpool_id = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_SUBNETPOOLID) + "\""; // need path to subnetpoolid + + // extract values from the right "VFC" Node + String vfcCustomizationUuid = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getRight().getMetadata(), "customization_uuid") + "\""; + SdncBaseModel.addParameter("vm_type", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_VMTYPE), mappingParams); + SdncBaseModel.addIntParameter("ipv4_count", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT), mappingParams); + SdncBaseModel.addIntParameter("ipv6_count", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT), mappingParams); + + try { + cleanUpExistingToscaData("VFC_TO_NETWORK_ROLE_MAPPING", "vfc_customization_uuid", vfcCustomizationUuid); + LOG.info("Call insertToscaData for VFC_TO_NETWORK_ROLE_MAPPING vfcCustomizationUUID = " + vfcCustomizationUuid); + insertToscaData(SdncBaseModel.getSql("VFC_TO_NETWORK_ROLE_MAPPING", "vfc_customization_uuid", vfcCustomizationUuid, "", mappingParams)); + } catch (IOException e) { + LOG.error("Could not insert Tosca YAML data into the VFC_TO_NETWORK_ROLE_MAPPING table ", e); + } + + } + + } // CP loop + + } // VF loop + + // Close ASDC TOSCA Parser factory - we are done processing this distribution + factory.close(); + + if ((artifact != null) && (data != null)) { + LOG.info("Update to SDN-C succeeded"); + IDistributionClientResult deploymentStatus; + deploymentStatus = client.sendDeploymentStatus(buildStatusMessage( + client, data, artifact, + DistributionStatusEnum.DEPLOY_OK)); + } + + } + + private void cleanUpExistingToscaData(String tableName, String keyName, String keyValue) throws IOException + { + + if (jdbcDataSource == null) { + setJdbcDataSource(); + } + try { + int rowCount = 0; + CachedRowSet data = jdbcDataSource.getData("SELECT * from " + tableName + " where " + keyName + " = " + keyValue + ";", null, ""); + while(data.next()) { + rowCount ++; + } + if (rowCount != 0) { + LOG.info("cleanUpExistingToscaData: " + keyValue); + jdbcDataSource.writeData("DELETE from " + tableName + " where " + keyName + " = " + keyValue + ";", null, null); + } + + } catch (SQLException e) { + LOG.error("Could not clean up existing " + tableName + " for " + keyValue, e); + } + + } + + + private void cleanUpExistingToscaServiceData(String serviceUUID) throws IOException + { + + if (jdbcDataSource == null) { + setJdbcDataSource(); + } + try { + int rowCount = 0; + CachedRowSet data = jdbcDataSource.getData("SELECT * from SERVICE_MODEL where service_uuid = " + serviceUUID + ";", null, ""); + while(data.next()) { + rowCount ++; + } + if (rowCount != 0) { + LOG.info("cleanUpExistingToscaData: " + serviceUUID); + jdbcDataSource.writeData("DELETE from NETWORK_MODEL where service_uuid = " + serviceUUID + ";", null, null); + jdbcDataSource.writeData("DELETE from SERVICE_MODEL where service_uuid = " + serviceUUID + ";", null, null); + } + + } catch (SQLException e) { + LOG.error("Could not clean up existing NETWORK_MODEL and SERVICE_MODEL for service_UUID " + serviceUUID, e); + } + + } + + + private void insertToscaData(String toscaDataString) throws IOException + { + LOG.debug("insertToscaData: " + toscaDataString); + + if (jdbcDataSource == null) { + setJdbcDataSource(); + } + try { + + jdbcDataSource.writeData(toscaDataString, null, null); + + } catch (SQLException e) { + LOG.error("Could not insert Tosca YAML data into the database ", e); + } + + } + + + private SdncArtifactType analyzeFileType(ArtifactTypeEnum artifactType, File spoolFile, Document spoolDoc) { + + if (artifactType != ArtifactTypeEnum.YANG_XML) { + LOG.error("Unexpected artifact type - expecting YANG_XML, got "+artifactType); + return (null); + } + + // Examine outer tag + + try { + + + Element root = spoolDoc.getDocumentElement(); + + String rootName = root.getTagName(); + + if (rootName.contains(":")) { + String[] rootNameElems = rootName.split(":"); + rootName = rootNameElems[rootNameElems.length - 1]; + } + + if (rootName != null) { + SdncArtifactType mapEntry = config.getMapping(rootName); + + + if (mapEntry == null) { + + LOG.error("Unexpected file contents - root tag is "+rootName); + } + return(mapEntry); + } else { + LOG.error("Cannot get root tag from file"); + return(null); + } + + } catch (Exception e) { + LOG.error("Could not parse YANG_XML file "+spoolFile.getName(), e); + return(null); + } + } + + private void scheduleDeployment(SdncArtifactType type, String svcName, String resourceName, IArtifactInfo artifactInfo, String spoolFileName, File spoolFile) { + + if (type.getPass() < deployList.length) { + + if (artifactInfo != null) { + LOG.debug("Scheduling "+artifactInfo.getArtifactName()+" version "+artifactInfo.getArtifactVersion()+" for deployment"); + + deployList[type.getPass()].add(new DeployableArtifact(type, svcName, resourceName, artifactInfo, spoolFile)); + } else { + SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.SSS");//dd/MM/yyyy + Date now = new Date(); + String artifactVersion = sdfDate.format(now); + LOG.debug("Scheduling "+spoolFileName+" version "+artifactVersion+" for deployment"); + String artifactName = spoolFileName; + if (artifactInfo != null) { + artifactName = artifactInfo.getArtifactName(); + } + deployList[type.getPass()].add(new DeployableArtifact(type, svcName, resourceName, artifactName, artifactVersion, spoolFile)); + } + } else { + LOG.info("Pass for type "+type.getTag()+" is "+type.getPass()+" which is not <= "+deployList.length); + } + } + + + private DistributionStatusEnum deploySpoolFile(DeployableArtifact artifact) { + + DistributionStatusEnum deployResult = DistributionStatusEnum.DEPLOY_OK; + + StringBuffer msgBuffer = new StringBuffer(); + + + String namespace = config.getAsdcApiNamespace(); + if ((namespace == null) || (namespace.length() == 0)) { + namespace="com:att:sdnctl:asdcapi"; + } + + msgBuffer.append("\n"); + + String svcName = artifact.getSvcName(); + String resourceName = artifact.getResourceName(); + String artifactName = artifact.getArtifactName(); + + if (svcName != null) { + if (resourceName != null) { + artifactName = svcName + "/" + resourceName + "/" + artifactName; + } else { + artifactName = svcName + "/" + artifactName; + } + } + + msgBuffer.append(""+artifactName+"\n"); + msgBuffer.append(""+artifact.getArtifactVersion()+"\n"); + + + try { + BufferedReader rdr = new BufferedReader(new FileReader(artifact.getFile())); + + String curLine = rdr.readLine(); + + while (curLine != null) { + + if (!curLine.startsWith("\n"); + + + byte[] msgBytes = msgBuffer.toString().getBytes(); + + Document results = postRestXml(artifact.getType().getRpcUrl(config.getAsdcApiBaseUrl()), msgBytes); + + if (results == null) { + + deployResult = DistributionStatusEnum.DEPLOY_ERROR; + } else { + + XPathFactory xpf = XPathFactory.newInstance(); + XPath xp = xpf.newXPath(); + + String asdcApiResponseCode = "500"; + + try { + + asdcApiResponseCode = xp.evaluate("//asdc-api-response-code[position()=1]/text()", results.getDocumentElement()); + } catch (Exception e) { + LOG.error("Caught exception retrying to evaluate xpath", e); + } + + if (asdcApiResponseCode.contains("200")) { + LOG.info("Update to SDN-C succeeded"); + deployResult = DistributionStatusEnum.DEPLOY_OK; + } else { + LOG.info("Update to SDN-C failed (response code "+asdcApiResponseCode+")"); + + if (asdcApiResponseCode.contains("409")) { + deployResult = DistributionStatusEnum.ALREADY_DEPLOYED; + } else { + + deployResult = DistributionStatusEnum.DEPLOY_ERROR; + } + } + } + + + + return(deployResult); + } + + + + + + public static IDistributionStatusMessage buildStatusMessage( + final IDistributionClient client, final INotificationData data, + final IArtifactInfo relevantArtifact, + final DistributionStatusEnum status) { + IDistributionStatusMessage statusMessage = new IDistributionStatusMessage() { + + @Override + public long getTimestamp() { + long currentTimeMillis = System.currentTimeMillis(); + return currentTimeMillis; + } + + @Override + public DistributionStatusEnum getStatus() { + return status; + } + + @Override + public String getDistributionID() { + return data.getDistributionID(); + } + + @Override + public String getConsumerID() { + return client.getConfiguration().getConsumerID(); + } + + @Override + public String getArtifactURL() { + return relevantArtifact.getArtifactURL(); + } + }; + return statusMessage; + + } + + private HttpURLConnection getRestXmlConnection(String urlString, String method) throws IOException + { + URL sdncUrl = new URL(urlString); + Authenticator.setDefault(new SdncAuthenticator(config.getSdncUser(), config.getSdncPasswd())); + + HttpURLConnection conn = (HttpURLConnection) sdncUrl.openConnection(); + + String authStr = config.getSdncUser()+":"+config.getSdncPasswd(); + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + conn.addRequestProperty("Authentication", "Basic "+encodedAuthStr); + + conn.setRequestMethod(method); + conn.setRequestProperty("Content-Type", "application/xml"); + conn.setRequestProperty("Accept", "application/xml"); + + conn.setDoInput(true); + conn.setDoOutput(true); + conn.setUseCaches(false); + + return(conn); + + } + + private Document postRestXml(String urlString, byte[] msgBytes) { + Document response = null; + + try { + SdncOdlConnection odlConn = SdncOdlConnection.newInstance(urlString, config.getSdncUser(), config.getSdncPasswd()); + + String sdncResp = odlConn.send("POST", "application/xml", new String(msgBytes)); + + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + + + response = db.parse(new ByteArrayInputStream(sdncResp.getBytes())); + } catch (Exception e) { + LOG.error("Caught exception posting to ODL tier", e); + } + + return(response); + + } + + private File applyXslts(File srcFile) { + + Document doc = null; + + + File inFile = srcFile; + File outFile = null; + + String xsltPathList = config.getXsltPathList(); + + if ((xsltPathList == null) || (xsltPathList.length() == 0)) { + outFile = inFile; + } else { + + String[] xsltPaths = xsltPathList.split(","); + + for (String xsltPath : xsltPaths) { + try{ + + outFile = File.createTempFile("tmp", "xml"); + TransformerFactory factory = TransformerFactory.newInstance(); + Source xslt = new StreamSource(new File(xsltPath)); + Transformer transformer = factory.newTransformer(xslt); + Source text = new StreamSource(inFile); + + + transformer.transform(text, new StreamResult(outFile)); + + inFile = outFile; + + } catch (Exception e) { + LOG.error("Caught exception trying to apply XSLT template "+xsltPath, e); + + } + + } + } + + // After transformations, parse transformed XML + + + return(outFile); + } + + private String escapeFilename(String str) { + StringBuffer retval = new StringBuffer(); + + for (int i = 0 ; i < str.length() ; i++) { + char curchar = str.charAt(i); + if (Character.isJavaIdentifierPart(curchar)) { + retval.append(curchar); + } + } + + return(retval.toString()); + + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java new file mode 100644 index 000000000..e8ffc3333 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java @@ -0,0 +1,65 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.results.IDistributionClientResult; +import org.openecomp.sdc.impl.DistributionClientFactory; +import org.openecomp.sdc.utils.DistributionActionResultEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncUebClient { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncUebConfiguration.class); + + public static void main(String[] args) { + IDistributionClient client = DistributionClientFactory + .createDistributionClient(); + + SdncUebConfiguration config = new SdncUebConfiguration(); + + SdncUebCallback cb = new SdncUebCallback(client, config); + + LOG.info("Scanning for local distribution artifacts before starting client"); + cb.deployDownloadedFiles(null, null, null); + + LOG.info("Initializing ASDC distribution client"); + + IDistributionClientResult result = client.init( + config, cb); + + LOG.info("Initialized ASDC distribution client - results = " + + result.getDistributionMessageResult()); + + if (result.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS) { + LOG.info("Starting client..."); + IDistributionClientResult start = client.start(); + LOG.info("Client startup result = " + + start.getDistributionMessageResult()); + } + + + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java new file mode 100644 index 000000000..bf0d5b823 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java @@ -0,0 +1,280 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +import org.openecomp.sdc.api.consumer.IConfiguration; +import org.openecomp.sdc.utils.ArtifactTypeEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncUebConfiguration implements IConfiguration{ + + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final Logger LOG = LoggerFactory + .getLogger(SdncUebConfiguration.class); + + private String asdcAddress = null; + private String consumerGroup = null; + private String consumerID = null; + private String environmentName = null; + private String password = null; + private int pollingInterval = 30; + private int pollingTimeout = 15; + private List relevantArtifactTypes = null; + private String user = null; + + private String sdncUser = null; + private String sdncPasswd = null; + private String asdcApiBaseUrl = null; + private String asdcApiNamespace = null; + + private SdncArtifactMap artifactMap = SdncArtifactMap.getInstance(); + + public String getAsdcApiNamespace() { + return asdcApiNamespace; + } + + private String incomingDir = null; + + private String archiveDir = null; + + private String overrideFile = null; + + private boolean activateServerTLSAuth; + private String keyStorePassword; + private String keyStorePath; + + private String xsltPathList; + + public String getXsltPathList() { + return xsltPathList; + } + + public String getOverrideFile() { + return overrideFile; + } + + public SdncUebConfiguration() { + + try { + init(); + } catch (Exception e) { + LOG.error("Cannot initialize SdncUebConfiguration", e); + } + } + + public void init() throws IOException { + String propPath = null; + String propDir = System.getenv(SDNC_CONFIG_DIR); + if (propDir == null) { + + propDir = "/opt/sdnc/data/properties"; + } + propPath = propDir + "/ueb-listener.properties"; + File propFile = new File(propPath); + + + if (!propFile.exists()) { + + throw new FileNotFoundException( + "Missing configuration properties file : " + + propFile); + } + + Properties props = new Properties(); + props.load(new FileInputStream(propFile)); + + asdcAddress = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.asdc-address"); + consumerGroup = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.consumer-group"); + consumerID = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.consumer-id"); + environmentName = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.environment-name"); + password = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.password"); + user = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.user"); + + sdncUser = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.sdnc-user"); + sdncPasswd = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd"); + asdcApiBaseUrl = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url"); + asdcApiNamespace = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.asdc-api-namespace"); + + incomingDir = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.spool.incoming"); + archiveDir = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.spool.archive"); + overrideFile = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.override-file"); + + String curval = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.polling-interval"); + if ((curval != null) && (curval.length() > 0)) { + try { + pollingInterval = Integer.parseInt(curval); + } catch (Exception e) { + LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-interval ("+curval+")"); + } + } + + curval = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.polling-timeout"); + if ((curval != null) && (curval.length() > 0)) { + try { + pollingTimeout = Integer.parseInt(curval); + } catch (Exception e) { + LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-timeout ("+curval+")"); + } + } + + curval = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.relevant-artifact-types"); + if ((curval != null) && (curval.length() > 0)) { + String[] artifactTypes = curval.split(","); + + relevantArtifactTypes = new LinkedList(); + + for (int i = 0 ; i < artifactTypes.length ; i++) { + try { + if (ArtifactTypeEnum.valueOf(artifactTypes[i]) != null) { + relevantArtifactTypes.add(artifactTypes[i]); + } else { + LOG.warn("Skipping unrecognized artifact type "+artifactTypes[i]); + } + } catch (Exception e) { + + LOG.warn("Caught exception validating artifact type "+artifactTypes[i], e); + } + + } + + } + + curval = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.activate-server-tls-auth", "false"); + activateServerTLSAuth = "true".equalsIgnoreCase(curval); + keyStorePath = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.keystore-path"); + keyStorePassword = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.keystore-password"); + xsltPathList = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.xslt-path-list"); + + + String artifactMapFile = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.artifact-map"); + if (artifactMapFile != null) { + artifactMap.load(artifactMapFile); + } + + } + + @Override + public String getAsdcAddress() { + return asdcAddress; + } + + @Override + public String getConsumerGroup() { + return consumerGroup; + } + + @Override + public String getConsumerID() { + return consumerID; + } + + @Override + public String getEnvironmentName() { + return environmentName; + } + + @Override + public String getPassword() { + return password; + } + + @Override + public int getPollingInterval() { + return pollingInterval; + } + + @Override + public int getPollingTimeout() { + return pollingTimeout; + } + + @Override + public List getRelevantArtifactTypes() { + return relevantArtifactTypes; + } + + @Override + public String getUser() { + return user; + } + + + public String getSdncUser() { + return sdncUser; + } + + public String getSdncPasswd() { + return sdncPasswd; + } + + public String getAsdcApiBaseUrl() { + return asdcApiBaseUrl; + } + + @Override + public boolean activateServerTLSAuth() { + return activateServerTLSAuth; + } + + @Override + public String getKeyStorePassword() { + return keyStorePassword; + } + + @Override + public String getKeyStorePath() { + return keyStorePath; + } + + public String getIncomingDir() { + return incomingDir; + } + + public String getArchiveDir() { + return archiveDir; + } + + public int getMaxPasses() { + return(artifactMap.getNumPasses()); + } + + public SdncArtifactMap.SdncArtifactType getMapping(String tag) { + return(artifactMap.getMapping(tag)); + } + + @Override + public boolean isFilterInEmptyResources() { + // TODO Auto-generated method stub + return false; + } + + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java new file mode 100644 index 000000000..76f015f9a --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncVFCModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncVFCModel.class); + + private String vmType = null; + private String vmCount = null; + + public SdncVFCModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { + + super(sdcCsarHelper, nodeTemplate); + + // extract properties + vmType = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPE); + //vmCount = extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMCOUNT); - need path to vm_count + vmCount = "1"; + addParameter("vm_type", vmType); + addParameter("vm_type_tag", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPETAG)); + addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_ECOMPGENERATEDNAMING)); + addParameter("naming_policy", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_NAMINGPOLICY)); + addParameter("nfc_naming_code", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFCCODE)); + } + + public String getVmType() { + return vmType; + } + + public void setVmType(String vmType) { + this.vmType = vmType; + } + + public String getVmCount() { + return vmCount; + } + + public void setVmCount(String vmCount) { + this.vmCount = vmCount; + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java new file mode 100644 index 000000000..cd79689b4 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java @@ -0,0 +1,56 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.Metadata; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncVFModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncVFModel.class); + + public SdncVFModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { + + super(sdcCsarHelper, nodeTemplate); + + // extract metadata + Metadata metadata = nodeTemplate.getMetadata(); + addParameter("name", extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME)); + addParameter("vendor", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDOR)); + addParameter("vendor_version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDORRELEASE)); + + // extract properties + addParameter("ecomp_generated_naming", extractBooleanValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_ECOMPGENERATEDNAMING)); + addParameter("naming_policy", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_NAMINGPOLICY)); + addParameter("nf_type", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE)); + addParameter("nf_role", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE)); + addParameter("nf_code", extractValue( nodeTemplate, "nf_naming_code")); + addParameter("nf_function", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION)); + addParameter("avail_zone_max_count", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONEMAXCOUNT)); + } + +} diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java new file mode 100644 index 000000000..7ae6c3107 --- /dev/null +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.uebclient; + +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; +import org.openecomp.sdc.toscaparser.api.Group; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncVFModuleModel extends SdncBaseModel { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncVFModuleModel.class); + + public SdncVFModuleModel(ISdcCsarHelper sdcCsarHelper, Group group) { + + super(sdcCsarHelper, group); + + // extract properties + addParameter("vf_module_type", extractValue(group, SdcPropertyNames.PROPERTY_NAME_VFMODULETYPE)); + addIntParameter("availability_zone_count", extractValue(group, SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONECOUNT)); + addParameter("ecomp_generated_vm_assignments", extractBooleanValue(group, SdcPropertyNames.PROPERTY_NAME_ECOMPGENERATEDVMASSIGNMENTS)); + } + +} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncARModel.java deleted file mode 100644 index 3472b443a..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncARModel.java +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncARModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncARModel.class); - - public SdncARModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - - super(sdcCsarHelper, nodeTemplate); - - // extract metadata - Metadata metadata = nodeTemplate.getMetadata(); - addParameter("type", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_TYPE)); - - // extract properties - //addParameter("role", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_ROLE)); - //addParameter("type", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_TYPE)); - wrong location, get from metadata - addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_ECOMPGENERATEDNAMING)); - addParameter("naming_policy", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_NAMINGPOLICY)); - //addParameter("depending_service", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_DEPENDINGSERVICE)); - //addParameter("service_dependency", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_SERVICEDEPENDENCY)); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncArtifactMap.java deleted file mode 100644 index 4a9f02a8e..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncArtifactMap.java +++ /dev/null @@ -1,134 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncArtifactMap { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncArtifactMap.class); - - public class SdncArtifactType { - private String tag; - private String artifactType; - private String rpc; - private int pass; - - public String getTag() { - return tag; - } - public String getArtifactType() { - return artifactType; - } - public String getRpc() { - return rpc; - } - - public int getPass() { - return pass; - } - - public String getRpcUrl(String base) { - return(base+rpc); - } - - private SdncArtifactType(String tag, String rpc, String pass) { - this.tag = tag; - this.rpc = rpc; - try { - this.pass = Integer.parseInt(pass); - } catch (Exception e) { - LOG.error("Invalid pass value for artifact map entry ("+tag+","+rpc+","+pass+")"); - } - } - } - - - - private Map mapItems = new HashMap(); - - private int NumPasses = 1; - - public int getNumPasses() { - return NumPasses; - } - - public void load(String fileName) { - - File mapFile = new File(fileName); - - if (mapFile.exists() && mapFile.canRead()) { - - BufferedReader rdr = null; - try { - - rdr = new BufferedReader(new FileReader(mapFile)); - - for (String ln ; (ln = rdr.readLine()) != null ; ) { - String[] lnFields = ln.split(","); - if (lnFields.length == 3) { - SdncArtifactType entry = new SdncArtifactType(lnFields[0], lnFields[1], lnFields[2]); - mapItems.put(entry.getTag(), entry); - if (entry.getPass() + 1 > NumPasses ) { - NumPasses = entry.getPass() + 1; - } - } - } - - - } catch (Exception e) { - LOG.error("Caught exception reading artifact map", e); - return; - } finally { - if (rdr != null) { - try { - rdr.close(); - } catch (IOException e) { - - } - } - } - } - } - - public SdncArtifactType getMapping(String tag) { - if (mapItems.containsKey(tag)) { - return(mapItems.get(tag)); - } else { - return(null); - } - } - - public static SdncArtifactMap getInstance() { - return new SdncArtifactMap(); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncBaseModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncBaseModel.java deleted file mode 100644 index 39c50aed0..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncBaseModel.java +++ /dev/null @@ -1,297 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import java.util.HashMap; -import java.util.Map; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Group; -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncBaseModel.class); - - protected String customizationUUID = null; - protected String invariantUUID = null; - protected String model_yaml = null; - protected String version = null; - - protected Map params = null; - protected ISdcCsarHelper sdcCsarHelper = null; - - public SdncBaseModel() { - - } - - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) { - - params = new HashMap(); - this.sdcCsarHelper = sdcCsarHelper; - - // extract service metadata - invariantUUID = extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID); - addParameter("invariant_uuid",invariantUUID); - addParameter("version",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_VERSION)); - addParameter("name",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME)); - addParameter("description",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)); - addParameter("type",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_TYPE)); - addParameter("category",extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_CATEGORY)); - } - - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - - params = new HashMap(); - this.sdcCsarHelper = sdcCsarHelper; - - // extract nodeTemplate metadata - Metadata metadata = nodeTemplate.getMetadata(); - customizationUUID = extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID); - addParameter("invariant_uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)); - addParameter("uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_UUID)); - addParameter("version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VERSION)); - } - - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group) { - - params = new HashMap(); - this.sdcCsarHelper = sdcCsarHelper; - - // extract group metadata - Metadata metadata = group.getMetadata(); - //customizationUUID = extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULECUSTOMIZATIONUUID); - returning null - customizationUUID = extractValue (metadata, "vfModuleModelCustomizationUUID"); - addParameter("invariant_uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELINVARIANTUUID)); - addParameter("uuid", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID)); - addParameter("version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELVERSION)); - } - - protected void addParameter (String name, String value) { - if (value != null && !value.isEmpty()) { - params.put(name, "\"" + value + "\""); - } - } - - protected void addIntParameter (String name, String value) { - if (value != null && !value.isEmpty()) { - params.put(name, value); - } - } - - public static void addIntParameter (String name, String value, Map params) { - if (value != null && !value.isEmpty()) { - params.put(name, value); - } - } - - public static void addParameter (String name, String value, Map params) { - if (value != null && !value.isEmpty()) { - params.put(name, "\"" + value + "\""); - } - } - - protected String extractValue (Metadata metadata, String name) { - String value = sdcCsarHelper.getMetadataPropertyValue(metadata, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - public static String extractValue (ISdcCsarHelper sdcCsarHelper, Metadata metadata, String name) { - String value = sdcCsarHelper.getMetadataPropertyValue(metadata, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractValue (NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - public static String extractValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractBooleanValue (NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - public static String extractBooleanValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - protected String extractValue (Group group, String name) { - String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractBooleanValue (Group group, String name) { - String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - protected String extractInputDefaultValue (String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractBooleanInputDefaultValue (String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - public static String extractInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null) { - return value; - } else { - return ""; - } - } - - public static String extractBooleanInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - public static String extractSubstitutionMappingTypeName (ISdcCsarHelper sdcCsarHelper) { - String value = sdcCsarHelper.getServiceSubstitutionMappingsTypeName(); - if (value != null) { - return value; - } else { - return ""; - } - } - - public String getCustomizationUUID() { - return ("\"" + customizationUUID + "\""); - } - public String getCustomizationUUIDNoQuotes() { - return (customizationUUID); - } - public void setCustomizationUUID(String customizationUUID) { - this.customizationUUID = customizationUUID; - } - - public String getSql(String tableName, String model_yaml) { - - StringBuilder sb = new StringBuilder(); - sb.append("INSERT into " + tableName + " (customization_uuid, model_yaml, "); - - int paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - sb.append(paramKey); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(") values (" + getCustomizationUUID() + ", \"" + model_yaml + "\", "); - - paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - String paramValue = params.get(paramKey); - sb.append(paramValue); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(");"); - return sb.toString(); - } - - public static String getSql(String tableName, String keyName, String keyValue, String model_yaml, Map params) { - - StringBuilder sb = new StringBuilder(); - sb.append("INSERT into " + tableName + " (" + keyName + ", "); - - int paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - sb.append(paramKey); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(") values (" + keyValue + ", "); - - paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - String paramValue = params.get(paramKey); - sb.append(paramValue); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(");"); - return sb.toString(); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncNodeModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncNodeModel.java deleted file mode 100644 index f8e5a5b8f..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncNodeModel.java +++ /dev/null @@ -1,145 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncNodeModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncNodeModel.class); - - private String serviceUUID = null; - private String ecompGeneratedNaming = null; - private String [] bindingUuids = null; - - // Using ASDC TOSCA Parser 17.07 - public SdncNodeModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - - super(sdcCsarHelper, nodeTemplate); - - // extract inputs - String ecompGeneratedNaming = extractBooleanInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING); - addParameter("ecomp_generated_naming",ecompGeneratedNaming); - addParameter("naming_policy", extractInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY)); - - // extract properties - addParameter("network_type", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE)); - addParameter("network_role", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE)); - addParameter("network_scope", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE)); - addParameter("network_technology", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY)); - - // extract properties - network_assignments - addParameter("is_shared_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISSHAREDNETWORK)); - addParameter("is_external_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISEXTERNALNETWORK)); - - // extract properties - network_assignments - ipv4_subnet_default_assignment - String useIpv4 = extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#use_ipv4"); - addParameter("use_ipv4", useIpv4); - addParameter("ipv4_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#dhcp_enabled")); - if (useIpv4.contains("Y")) { - addParameter("ipv4_ip_version", "ipv4"); - } - addParameter("ipv4_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#cidr_mask")); - addParameter("eipam_v4_address_plan", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#ip_network_address_plan")); - - // extract properties - network_assignments - ipv6_subnet_default_assignment - String useIpv6 = extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#use_ipv6"); - addParameter("use_ipv6", useIpv6); - addParameter("ipv6_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#dhcp_enabled")); - if (useIpv6.contains("Y")) { - addParameter("ipv6_ip_version", "ipv6"); - } - addParameter("ipv6_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#cidr_mask")); - addParameter("eipam_v6_address_plan", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#ip_network_address_plan")); - - // extract properties - provider_network - addParameter("is_provider_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK)); - addParameter("physical_network_name", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_PHYSICALNETWORKNAME)); - - // extract properties - network_flows - addParameter("is_bound_to_vpn", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_ISBOUNDTOVPN)); - - // extract properties - network_flows - vpn_bindings - String vpnBindingString = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_VPNBINDING); - bindingUuids = vpnBindingString.split(","); - -} - - public String getServiceUUID() { - return serviceUUID; - } - public void setServiceUUID(String serviceUUID) { - this.serviceUUID = serviceUUID; - } - - public String getEcompGeneratedNaming() { - return ecompGeneratedNaming; - } - public void setEcompGeneratedNaming(String ecompGeneratedNaming) { - this.ecompGeneratedNaming = ecompGeneratedNaming; - if (ecompGeneratedNaming != null && !ecompGeneratedNaming.isEmpty()) { - params.put("ecomp_generated_naming", "\"" + ecompGeneratedNaming + "\""); - } - } - - public String getSql(String model_yaml) { - - StringBuilder sb = new StringBuilder(); - sb.append("INSERT into NETWORK_MODEL (service_uuid, customization_uuid, model_yaml, "); - - int paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - sb.append(paramKey); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(") values (" + serviceUUID + ", " + getCustomizationUUID() + ", \"" + model_yaml + "\", "); - - paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - String paramValue = params.get(paramKey); - sb.append(paramValue); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(");"); - return sb.toString(); - } - - public String getVpnBindingsSql() { - - StringBuilder sb = new StringBuilder(); - for (int i=0; i < bindingUuids.length; i++) { - sb.append("INSERT into VPN_BINDINGS (network_customization_uuid, binding_uuid) values (" + getCustomizationUUID() + ", \"" + bindingUuids[i] + "\"); "); - } - - return sb.toString(); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncOdlConnection.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncOdlConnection.java deleted file mode 100644 index 4e0cffab1..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncOdlConnection.java +++ /dev/null @@ -1,158 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.PasswordAuthentication; -import java.net.URL; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLSession; - -import org.apache.commons.codec.binary.Base64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class SdncOdlConnection { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncOdlConnection.class); - - private HttpURLConnection httpConn = null; - - private String url = null; - private String user = null; - private String password = null; - - private class SdncAuthenticator extends Authenticator { - - private String user; - private String passwd; - - SdncAuthenticator(String user, String passwd) { - this.user = user; - this.passwd = passwd; - } - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(user, passwd.toCharArray()); - } - - } - - private SdncOdlConnection() { - - } - - private SdncOdlConnection(String url, String user, String password) { - this.url = url; - this.user = user; - this.password = password; - - try { - URL sdncUrl = new URL(url); - Authenticator.setDefault(new SdncAuthenticator(user, password)); - - this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); - } catch (Exception e) { - LOG.error("Unable to create http connection", e); - } - } - - public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException - { - return (new SdncOdlConnection(url, user, password)); - } - - - - public String send(String method, String contentType, String msg) throws IOException { - - LOG.info("Sending REST " + method + " to " + url); - LOG.info("Message body:\n" + msg); - String authStr = user + ":" + password; - String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); - - httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); - - httpConn.setRequestMethod(method); - httpConn.setRequestProperty("Content-Type", contentType); - httpConn.setRequestProperty("Accept", contentType); - - httpConn.setDoInput(true); - httpConn.setDoOutput(true); - httpConn.setUseCaches(false); - - if (httpConn instanceof HttpsURLConnection) { - HostnameVerifier hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); - } - - // Write message - httpConn.setRequestProperty("Content-Length", "" + msg.length()); - DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); - outStr.write(msg.getBytes()); - outStr.close(); - - // Read response - BufferedReader respRdr; - - LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); - - if (httpConn.getResponseCode() < 300) { - - respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); - } else { - respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); - } - - StringBuffer respBuff = new StringBuffer(); - - String respLn; - - while ((respLn = respRdr.readLine()) != null) { - respBuff.append(respLn + "\n"); - } - respRdr.close(); - - String respString = respBuff.toString(); - - LOG.info("Response body :\n" + respString); - - return (respString); - - } - - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncServiceModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncServiceModel.java deleted file mode 100644 index 0f645d7a3..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncServiceModel.java +++ /dev/null @@ -1,98 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncServiceModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncServiceModel.class); - - private String UUID = null; - private String serviceInstanceNamePrefix = null; - private String filename = null; - - public SdncServiceModel(ISdcCsarHelper sdcCsarHelper, Metadata metadata) { - - super(sdcCsarHelper, metadata); - - UUID = extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_UUID); - - // extract service topology template input data - addParameter("ecomp_naming",extractBooleanInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING)); - addParameter("naming_policy",extractInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY)); - } - - public String getServiceUUID() { - return ("\"" + UUID + "\""); - } - public void setServiceUUID(String serviceUUID) { - this.UUID = serviceUUID; - } - public String getServiceInstanceNamePrefix() { - return serviceInstanceNamePrefix; - } - public void setServiceInstanceNamePrefix(String serviceInstanceNamePrefix) { - if (serviceInstanceNamePrefix != null && !serviceInstanceNamePrefix.isEmpty()) { - this.serviceInstanceNamePrefix = serviceInstanceNamePrefix; - params.put("service_instance_name_prefix", "\"" + serviceInstanceNamePrefix + "\""); - } - } - public String getFilename() { - return filename; - } - public void setFilename(String filename) { - this.filename = filename; - } - - public String getSql(String model_yaml) { - - StringBuilder sb = new StringBuilder(); - sb.append("INSERT into SERVICE_MODEL (service_uuid, model_yaml, filename, "); - - int paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - sb.append(paramKey); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(") values (" + getServiceUUID() + ", \"" + model_yaml + "\", \"" + filename + "\", "); - - paramCount = 0; - for (String paramKey : params.keySet()) { - paramCount++; - String paramValue = params.get(paramKey); - sb.append(paramValue); - if (paramCount < params.size()) sb.append(", "); - } - - sb.append(");"); - return sb.toString(); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebCallback.java deleted file mode 100644 index 496c2cef8..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebCallback.java +++ /dev/null @@ -1,1125 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.PasswordAuthentication; -import java.net.URL; -import java.nio.file.DirectoryStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.sql.SQLException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import javax.sql.rowset.CachedRowSet; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathFactory; - -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.tuple.Pair; -import org.onap.ccsdk.sli.core.dblib.DBResourceManager; -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.consumer.IDistributionStatusMessage; -import org.openecomp.sdc.api.consumer.INotificationCallback; -import org.openecomp.sdc.api.notification.IArtifactInfo; -import org.openecomp.sdc.api.notification.INotificationData; -import org.openecomp.sdc.api.notification.IResourceInstance; -import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; -import org.openecomp.sdc.api.results.IDistributionClientResult; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; -import org.openecomp.sdc.toscaparser.api.Group; -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.utils.ArtifactTypeEnum; -import org.openecomp.sdc.utils.DistributionActionResultEnum; -import org.openecomp.sdc.utils.DistributionStatusEnum; -import org.openecomp.sdnc.uebclient.SdncArtifactMap.SdncArtifactType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -public class SdncUebCallback implements INotificationCallback { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncUebCallback.class); - - private static DBResourceManager jdbcDataSource = null; - private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - - - private class SdncAuthenticator extends Authenticator { - - private final String user; - private final String passwd; - - SdncAuthenticator(String user, String passwd) { - this.user = user; - this.passwd = passwd; - } - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(user, passwd.toCharArray()); - } - - } - - private class DeployableArtifact { - SdncArtifactType type; - IArtifactInfo artifactInfo; - String svcName; - String resourceName; - String artifactName; - String artifactVersion; - File file; - - public String getArtifactName() { - return artifactName; - } - - - - public String getArtifactVersion() { - return artifactVersion; - } - - - public SdncArtifactType getType() { - return type; - } - - - - public IArtifactInfo getArtifactInfo() { - return artifactInfo; - } - - - public File getFile() { - return file; - } - - - - - public DeployableArtifact(SdncArtifactType type, String svcName, String resourceName, IArtifactInfo artifactInfo, File file) { - this.type = type; - this.artifactInfo = artifactInfo; - this.svcName = svcName; - this.resourceName = resourceName; - this.artifactName = artifactInfo.getArtifactName(); - this.artifactVersion = artifactInfo.getArtifactVersion(); - this.file = file; - } - - - public DeployableArtifact(SdncArtifactType type, String svcName, String resourceName, String artifactName, String artifactVersion, File file) { - this.type = type; - this.artifactInfo = null; - this.svcName = svcName; - this.resourceName = resourceName; - this.artifactName = artifactName; - this.artifactVersion = artifactVersion; - this.file = file; - } - - - - public String getSvcName() { - return svcName; - } - - - - public String getResourceName() { - return resourceName; - } - - } - - private final IDistributionClient client; - private final SdncUebConfiguration config; - - private LinkedList deployList[]; - - private static void setJdbcDataSource() throws IOException { - - String propPath = null; - String propDir = System.getenv(SDNC_CONFIG_DIR); - if (propDir == null) { - - propDir = "/opt/sdnc/data/properties"; - } - propPath = propDir + "/dblib.properties"; - File propFile = new File(propPath); - - if (!propFile.exists()) { - - throw new FileNotFoundException( - "Missing configuration properties file : " - + propFile); - } - - Properties props = new Properties(); - props.load(new FileInputStream(propFile)); - - try { - jdbcDataSource = DBResourceManager.create(props); - } catch(Throwable exc) { - LOG.error("", exc); - } - - if(((DBResourceManager)jdbcDataSource).isActive()){ - LOG.warn( "DBLIB: JDBC DataSource has been initialized."); - } else { - LOG.warn( "DBLIB: JDBC DataSource did not initialize successfully."); - } - } - - private static void loadArtifactMap() { - - } - - public SdncUebCallback(IDistributionClient client, SdncUebConfiguration config) { - this.client = client; - this.config = config; - - } - - @Override - public void activateCallback(INotificationData data) { - - LOG.info("Received notification : ("+data.getDistributionID()+","+data.getServiceName()+","+data.getServiceVersion()+ - ","+data.getServiceDescription() + ")"); - - String incomingDirName = config.getIncomingDir(); - String archiveDirName = config.getArchiveDir(); - - File incomingDir = null; - File archiveDir = null; - - if (!incomingDir.exists()) { - incomingDir.mkdirs(); - } - - - if (!archiveDir.exists()) { - archiveDir.mkdirs(); - } - - // Process service level artifacts - List artifactList = data.getServiceArtifacts(); - - if (artifactList != null) { - - incomingDir = new File(incomingDirName + "/" + escapeFilename(data.getServiceName())); - if (!incomingDir.exists()) { - incomingDir.mkdirs(); - } - - archiveDir = new File(archiveDirName + "/" + escapeFilename(data.getServiceName())); - if (!archiveDir.exists()) { - archiveDir.mkdirs(); - } - for (IArtifactInfo curArtifact : artifactList) - { - - LOG.info("Received artifact " + curArtifact.getArtifactName()); - - handleArtifact(data, data.getServiceName(), null, null, curArtifact, incomingDir, archiveDir); - } - } - - - // Process resource level artifacts - for (IResourceInstance curResource : data.getResources()) { - - LOG.info("Received resource : "+curResource.getResourceName()); - artifactList = curResource.getArtifacts(); - - if (artifactList != null) { - - incomingDir = new File(incomingDirName + "/" + escapeFilename(data.getServiceName()) + "/" + escapeFilename(curResource.getResourceName())); - if (!incomingDir.exists()) { - incomingDir.mkdirs(); - } - - archiveDir = new File(archiveDirName + "/" + escapeFilename(data.getServiceName()) + "/" + escapeFilename(curResource.getResourceName())); - if (!archiveDir.exists()) { - archiveDir.mkdirs(); - } - for (IArtifactInfo curArtifact : artifactList) - { - - LOG.info("Received artifact " + curArtifact.getArtifactName()); - - handleArtifact(data, data.getServiceName(), curResource.getResourceName(), curResource.getResourceType(), curArtifact, incomingDir, archiveDir); - } - } - } - - deployDownloadedFiles(incomingDir, archiveDir, data); - - - } - - - public void deployDownloadedFiles(File incomingDir, File archiveDir, INotificationData data) { - - if (incomingDir == null) { - incomingDir = new File(config.getIncomingDir()); - - if (!incomingDir.exists()) { - incomingDir.mkdirs(); - } - - } - - if (archiveDir == null) { - archiveDir = new File(config.getArchiveDir()); - - if (!archiveDir.exists()) { - archiveDir.mkdirs(); - } - } - - String curFileName = ""; - try (DirectoryStream stream = Files.newDirectoryStream(incomingDir.toPath())) { - for (Path file: stream) { - curFileName = file.toString(); - handleSuccessfulDownload(null,null, null, null, file.toFile(), archiveDir); - } - } catch (Exception x) { - // IOException can never be thrown by the iteration. - // In this snippet, it can only be thrown by newDirectoryStream. - LOG.warn("Cannot process spool file "+ curFileName, x); - } - - // Deploy scheduled deployments - int numPasses = config.getMaxPasses(); - - deployList = new LinkedList[numPasses]; - - for (int i = 0 ; i < numPasses ; i++) { - deployList[i] = new LinkedList(); - } - for (int pass = 0 ; pass < config.getMaxPasses() ; pass++) { - - if (deployList[pass] != null) { - while (! deployList[pass].isEmpty()) { - DeployableArtifact artifact = deployList[pass].pop(); - - DistributionStatusEnum deployResult = DistributionStatusEnum.DEPLOY_ERROR; - - - try { - - deployResult = deploySpoolFile(artifact); - } catch (Exception e) { - LOG.error("Caught exception trying to deploy file", e); - } - - - IArtifactInfo artifactInfo = artifact.getArtifactInfo(); - - if ((artifactInfo != null) && (data != null)) { - IDistributionClientResult deploymentStatus; - deploymentStatus = client.sendDeploymentStatus(buildStatusMessage( - client, data, artifactInfo, - deployResult)); - } - - } - } - } - } - - private void handleArtifact(INotificationData data, String svcName, String resourceName, String resourceType, IArtifactInfo artifact, File incomingDir, File archiveDir) { - - // Download Artifact - IDistributionClientDownloadResult downloadResult = client - .download(artifact); - - if (downloadResult == null) { - - handleFailedDownload(data, artifact); - return; - } - - byte[] payloadBytes = downloadResult.getArtifactPayload(); - - if (payloadBytes == null) { - handleFailedDownload(data, artifact); - return; - } - - String payload = new String(payloadBytes); - - - File spoolFile = new File(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName()); - - boolean writeSucceeded = false; - - try { - FileWriter spoolFileWriter = new FileWriter(spoolFile); - spoolFileWriter.write(payload); - spoolFileWriter.close(); - writeSucceeded = true; - } catch (Exception e) { - LOG.error("Unable to save downloaded file to spool directory ("+ incomingDir.getAbsolutePath() +")", e); - } - - - if (writeSucceeded && (downloadResult.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS)) { - handleSuccessfulDownload(data, svcName, resourceName, artifact, spoolFile, archiveDir); - - - } else { - handleFailedDownload(data, artifact); - } - - } - - private void handleFailedDownload(INotificationData data, - IArtifactInfo relevantArtifact) { - // Send Download Status - IDistributionClientResult sendDownloadStatus = client - .sendDownloadStatus(buildStatusMessage(client, data, - relevantArtifact, DistributionStatusEnum.DOWNLOAD_ERROR)); - } - - private void handleSuccessfulDownload(INotificationData data, String svcName, String resourceName, - IArtifactInfo artifact, File spoolFile, File archiveDir) { - - if ((data != null) && (artifact != null)) { - // Send Download Status - IDistributionClientResult sendDownloadStatus = client - .sendDownloadStatus(buildStatusMessage(client, data, artifact, DistributionStatusEnum.DOWNLOAD_OK)); - } - - // If an override file exists, read that instead of the file we just downloaded - ArtifactTypeEnum artifactEnum = ArtifactTypeEnum.YANG_XML; - - boolean toscaYamlType = false; - if (artifact != null) { - String artifactTypeString = artifact.getArtifactType(); - if (artifactTypeString.contains("TOSCA_TEMPLATE")) { - toscaYamlType = true; - } - } else { - if (spoolFile.toString().contains(".yml") || spoolFile.toString().contains(".csar")) { - toscaYamlType = true; - } - } - String overrideFileName = config.getOverrideFile(); - if ((overrideFileName != null) && (overrideFileName.length() > 0)) { - File overrideFile = new File(overrideFileName); - - if (overrideFile.exists()) { - artifactEnum = ArtifactTypeEnum.YANG_XML; - spoolFile = overrideFile; - } - - } - - if (toscaYamlType == true) { - processToscaYaml (data, svcName, resourceName, artifact, spoolFile, archiveDir); - - try { - Path source = spoolFile.toPath(); - Path targetDir = archiveDir.toPath(); - - Files.move(source, targetDir.resolve(source.getFileName()), StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - LOG.warn("Could not move "+spoolFile.getAbsolutePath()+" to "+archiveDir.getAbsolutePath(), e); - } - - return; - } - - // Process spool file - Document spoolDoc = null; - File transformedFile = null; - - // Apply XSLTs and get Doc object - try { - if (!spoolFile.isDirectory()) { - transformedFile = applyXslts(spoolFile); - } - } catch (Exception e) { - LOG.error("Caught exception trying to parse XML file", e); - } - - if (transformedFile != null) { - try { - - try { - - DocumentBuilderFactory dbf = DocumentBuilderFactory - .newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - - spoolDoc = db.parse(transformedFile); - } catch (Exception e) { - LOG.error( - "Caught exception trying to parse transformed XML file " - + transformedFile.getAbsolutePath(), e); - } - - } catch (Exception e) { - LOG.error("Caught exception trying to deploy file", e); - } - } - - - if (spoolDoc != null) { - // Analyze file type - SdncArtifactType artifactType = analyzeFileType(artifactEnum, - spoolFile, spoolDoc); - - if (artifactType != null) { - - scheduleDeployment(artifactType, svcName, resourceName, artifact, spoolFile.getName(), transformedFile); - - } - - // SDNGC-2660 : Move file to archive directory even if it is an unrecognized type so that - // we do not keep trying and failing to process it. - try { - Path source = spoolFile.toPath(); - Path targetDir = archiveDir.toPath(); - - Files.move(source, targetDir.resolve(source.getFileName()), StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - LOG.warn("Could not move "+spoolFile.getAbsolutePath()+" to "+archiveDir.getAbsolutePath(), e); - } - } - - - } - - - private void processToscaYaml(INotificationData data, String svcName, String resourceName, - IArtifactInfo artifact, File spoolFile, File archiveDir) { - - // Use ASDC Dist Client 1.1.5 with TOSCA parsing APIs to extract relevant TOSCA model data - - // TOSCA data extraction flow 1707: - // Use ASDC dist-client to get yaml string - not yet available - String model_yaml = null; - LOG.info("Process TOSCA YAML file: "+spoolFile.toString()); - - SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); - ISdcCsarHelper sdcCsarHelper = null; - try { - sdcCsarHelper = factory.getSdcCsarHelper(spoolFile.getAbsolutePath()); - } catch (SdcToscaParserException e) { - LOG.error("Could not create SDC TOSCA Parser ", e); - factory.close(); - return; - } - - // Ingest Service Data - 1707 - Metadata serviceMetadata = sdcCsarHelper.getServiceMetadata(); - SdncServiceModel serviceModel = new SdncServiceModel(sdcCsarHelper, serviceMetadata); - serviceModel.setFilename(spoolFile.toString().substring(spoolFile.toString().lastIndexOf("/")+1)); // will be csar file name - serviceModel.setServiceInstanceNamePrefix(SdncBaseModel.extractSubstitutionMappingTypeName(sdcCsarHelper).substring(SdncBaseModel.extractSubstitutionMappingTypeName(sdcCsarHelper).lastIndexOf(".")+1)); - - try { - cleanUpExistingToscaServiceData(serviceModel.getServiceUUID()); - LOG.info("Call insertToscaData for SERVICE_MODEL serviceUUID = " + serviceModel.getServiceUUID()); - insertToscaData(serviceModel.getSql(model_yaml)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the SERVICE_MODEL table ", e); - factory.close(); - return; - } - - // Ingest Network (VL) Data - 1707 - //List vlNodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VL"); - List vlNodeTemplatesList = sdcCsarHelper.getServiceVlList(); - - for (NodeTemplate nodeTemplate : vlNodeTemplatesList) { - SdncNodeModel nodeModel = new SdncNodeModel (sdcCsarHelper, nodeTemplate); - nodeModel.setServiceUUID(serviceModel.getServiceUUID()); - nodeModel.setEcompGeneratedNaming(SdncBaseModel.extractBooleanInputDefaultValue(sdcCsarHelper, SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING));//service_naming#default#ecomp_generated_naming - - try { - cleanUpExistingToscaData("NETWORK_MODEL", "customization_uuid", nodeModel.getCustomizationUUID()); - cleanUpExistingToscaData("VPN_BINDINGS", "network_customization_uuid", nodeModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for NETWORK_MODEL customizationUUID = " + nodeModel.getCustomizationUUID()); - // using ASDC dist-client use method for get yaml string - insertToscaData(nodeModel.getSql(model_yaml)); - insertToscaData(nodeModel.getVpnBindingsSql()); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the NETWORK_MODEL table ", e); - } - } - - // Ingest Allotted Resource Data - 1707 - List arNodeTemplatesList = sdcCsarHelper.getAllottedResources(); - - for (NodeTemplate nodeTemplate : arNodeTemplatesList) { - SdncARModel nodeModel = new SdncARModel (sdcCsarHelper, nodeTemplate); - - try { - cleanUpExistingToscaData("ALLOTTED_RESOURCE_MODEL", "customization_uuid", nodeModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for ALLOTTED_RESOURCE_MODEL customizationUUID = " + nodeModel.getCustomizationUUID()); - // using ASDC dist-client use method for get yaml string - insertToscaData(nodeModel.getSql("ALLOTTED_RESOURCE_MODEL", model_yaml)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the NETWORK_MODEL table ", e); - } - } - - // Ingest Network (VF) Data - 1707 - //List nodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VF"); - List vfNodeTemplatesList = sdcCsarHelper.getServiceVfList(); - - for (NodeTemplate nodeTemplate : vfNodeTemplatesList) { - SdncVFModel vfNodeModel = new SdncVFModel (sdcCsarHelper, nodeTemplate); - - try { - cleanUpExistingToscaData("VF_MODEL", "customization_uuid", vfNodeModel.getCustomizationUUID()) ; - LOG.info("Call insertToscaData for VF_MODEL customizationUUID = " + vfNodeModel.getCustomizationUUID()); - insertToscaData(vfNodeModel.getSql("VF_MODEL", model_yaml)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VF_MODEL table ", e); - } - - // For each VF, insert VF_MODULE_MODEL data - List vfModules = sdcCsarHelper.getVfModulesByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); - for (Group group : vfModules){ - SdncVFModuleModel vfModuleModel = new SdncVFModuleModel(sdcCsarHelper, group); - - try { - cleanUpExistingToscaData("VF_MODULE_MODEL", "customization_uuid", vfModuleModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for VF_MODULE_MODEL customizationUUID = " + vfModuleModel.getCustomizationUUID()); - insertToscaData(vfModuleModel.getSql("VF_MODULE_MODEL", model_yaml)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VF_MODULE_MODEL table ", e); - } - - // For each VF Module, get the VFC list, insert VF_MODULE_TO_VFC_MAPPING data - // List groupMembers = sdcCsarHelper.getMembersOfGroup(group); - old version - // For each vfcNode (group member) in the groupMembers list, extract vm_type and vm_count. - // Insert vf_module.customizationUUID, vfcNode.customizationUUID and vm_type and vm_count into VF_MODULE_TO_VFC_MAPPING - List groupMembers = sdcCsarHelper.getMembersOfVfModule(nodeTemplate, group); // not yet available - for (NodeTemplate vfcNode : groupMembers){ - SdncVFCModel vfcModel = new SdncVFCModel(sdcCsarHelper, vfcNode); - - try { - cleanUpExistingToscaData("VF_MODULE_TO_VFC_MAPPING", "vf_module_customization_uuid", vfModuleModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for VF_MODULE_TO_VFC_MAPPING customizationUUID = " + vfModuleModel.getCustomizationUUID()); - insertToscaData("insert into VF_MODULE_TO_VFC_MAPPING (vf_module_customization_uuid, vfc_customization_uuid, vm_type, vm_count) values (" + - vfModuleModel.getCustomizationUUID() + ", " + vfcModel.getCustomizationUUID() + ", \"" + vfcModel.getVmType() + "\", \"" + vfcModel.getVmCount() + "\")"); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VF_MODULE_TO_VFC_MAPPING table ", e); - } - - } - - } - - // For each VF, insert VFC_MODEL data - List vfcNodes = sdcCsarHelper.getVfcListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); - for (NodeTemplate vfcNode : vfcNodes){ - SdncVFCModel vfcModel = new SdncVFCModel(sdcCsarHelper, vfcNode); - - try { - cleanUpExistingToscaData("VFC_MODEL", "customization_uuid", vfcModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for VFC_MODEL customizationUUID = " + vfcModel.getCustomizationUUID()); - insertToscaData(vfcModel.getSql("VFC_MODEL", model_yaml)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VFC_MODEL table ", e); - } - - } - - // For each VF, insert VF_TO_NETWORK_ROLE_MAPPING data - List cpNodes = sdcCsarHelper.getCpListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()); - for (NodeTemplate cpNode : cpNodes){ - - // Insert into VF_TO_NETWORK_ROLE_MAPPING vf_customization_uuid and network_role - String cpNetworkRole = sdcCsarHelper.getNodeTemplatePropertyLeafValue(cpNode, "network_role_tag"); - - try { - cleanUpExistingToscaData("VF_TO_NETWORK_ROLE_MAPPING", "vf_customization_uuid", vfNodeModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for VF_TO_NETWORK_ROLE_MAPPING vfCustomizationUUID = " + vfNodeModel.getCustomizationUUID()); - insertToscaData("insert into VF_TO_NETWORK_ROLE_MAPPING (vf_customization_uuid, network_role) values (" + - vfNodeModel.getCustomizationUUID() + ", \"" + cpNetworkRole + "\")"); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VF_TO_NETWORK_ROLE_MAPPING table ", e); - } - - // Insert VFC_TO_NETWORK_ROLE_MAPPING data - Map mappingParams = new HashMap(); - //String cpNetworkRoleTag = "\"" + sdcCsarHelper.getNodeTemplatePropertyLeafValue(cpNode, SdcPropertyNames.PROPERTY_NAME_NETWORKROLETAG) + "\""; - // extract network_role, network_role_tag and virtual_binding from this cpNode - SdncBaseModel.addParameter("network_role", SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "network_role"), mappingParams); - SdncBaseModel.addParameter("network_role_tag", SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "network_role_tag"), mappingParams); - String virtualBinding = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, cpNode, "requirements#virtualBinding") + "\""; - - // get list of cpNodes and vfcNodes with matching virtualBinding - List> matchList = sdcCsarHelper.getNodeTemplatePairsByReqName(sdcCsarHelper.getCpListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()), sdcCsarHelper.getVfcListByVf(vfNodeModel.getCustomizationUUIDNoQuotes()), virtualBinding); - for (Pair match : matchList) { // should be 1 match? - - // extract values from the left "CP" Node - SdncBaseModel.addParameter("ipv4_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams); - //SdncBaseModel.addParameter("ipv4_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams); - SdncBaseModel.addParameter("ipv4_ip_version", "dummy_ipv4_vers", mappingParams); - SdncBaseModel.addParameter("ipv6_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams); - //SdncBaseModel.addParameter("ipv6_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams); - SdncBaseModel.addParameter("ipv6_ip_version", "dummy_ipv6_vers", mappingParams); - //String extcp_subnetpool_id = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_SUBNETPOOLID) + "\""; // need path to subnetpoolid - - // extract values from the right "VFC" Node - String vfcCustomizationUuid = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getRight().getMetadata(), "customization_uuid") + "\""; - SdncBaseModel.addParameter("vm_type", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_VMTYPE), mappingParams); - SdncBaseModel.addIntParameter("ipv4_count", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT), mappingParams); - SdncBaseModel.addIntParameter("ipv6_count", SdncBaseModel.extractValue(sdcCsarHelper, match.getRight(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_MINSUBNETSCOUNT), mappingParams); - - try { - cleanUpExistingToscaData("VFC_TO_NETWORK_ROLE_MAPPING", "vfc_customization_uuid", vfcCustomizationUuid); - LOG.info("Call insertToscaData for VFC_TO_NETWORK_ROLE_MAPPING vfcCustomizationUUID = " + vfcCustomizationUuid); - insertToscaData(SdncBaseModel.getSql("VFC_TO_NETWORK_ROLE_MAPPING", "vfc_customization_uuid", vfcCustomizationUuid, "", mappingParams)); - } catch (IOException e) { - LOG.error("Could not insert Tosca YAML data into the VFC_TO_NETWORK_ROLE_MAPPING table ", e); - } - - } - - } // CP loop - - } // VF loop - - // Close ASDC TOSCA Parser factory - we are done processing this distribution - factory.close(); - - if ((artifact != null) && (data != null)) { - LOG.info("Update to SDN-C succeeded"); - IDistributionClientResult deploymentStatus; - deploymentStatus = client.sendDeploymentStatus(buildStatusMessage( - client, data, artifact, - DistributionStatusEnum.DEPLOY_OK)); - } - - } - - private void cleanUpExistingToscaData(String tableName, String keyName, String keyValue) throws IOException - { - - if (jdbcDataSource == null) { - setJdbcDataSource(); - } - try { - int rowCount = 0; - CachedRowSet data = jdbcDataSource.getData("SELECT * from " + tableName + " where " + keyName + " = " + keyValue + ";", null, ""); - while(data.next()) { - rowCount ++; - } - if (rowCount != 0) { - LOG.info("cleanUpExistingToscaData: " + keyValue); - jdbcDataSource.writeData("DELETE from " + tableName + " where " + keyName + " = " + keyValue + ";", null, null); - } - - } catch (SQLException e) { - LOG.error("Could not clean up existing " + tableName + " for " + keyValue, e); - } - - } - - - private void cleanUpExistingToscaServiceData(String serviceUUID) throws IOException - { - - if (jdbcDataSource == null) { - setJdbcDataSource(); - } - try { - int rowCount = 0; - CachedRowSet data = jdbcDataSource.getData("SELECT * from SERVICE_MODEL where service_uuid = " + serviceUUID + ";", null, ""); - while(data.next()) { - rowCount ++; - } - if (rowCount != 0) { - LOG.info("cleanUpExistingToscaData: " + serviceUUID); - jdbcDataSource.writeData("DELETE from NETWORK_MODEL where service_uuid = " + serviceUUID + ";", null, null); - jdbcDataSource.writeData("DELETE from SERVICE_MODEL where service_uuid = " + serviceUUID + ";", null, null); - } - - } catch (SQLException e) { - LOG.error("Could not clean up existing NETWORK_MODEL and SERVICE_MODEL for service_UUID " + serviceUUID, e); - } - - } - - - private void insertToscaData(String toscaDataString) throws IOException - { - LOG.debug("insertToscaData: " + toscaDataString); - - if (jdbcDataSource == null) { - setJdbcDataSource(); - } - try { - - jdbcDataSource.writeData(toscaDataString, null, null); - - } catch (SQLException e) { - LOG.error("Could not insert Tosca YAML data into the database ", e); - } - - } - - - private SdncArtifactType analyzeFileType(ArtifactTypeEnum artifactType, File spoolFile, Document spoolDoc) { - - if (artifactType != ArtifactTypeEnum.YANG_XML) { - LOG.error("Unexpected artifact type - expecting YANG_XML, got "+artifactType); - return (null); - } - - // Examine outer tag - - try { - - - Element root = spoolDoc.getDocumentElement(); - - String rootName = root.getTagName(); - - if (rootName.contains(":")) { - String[] rootNameElems = rootName.split(":"); - rootName = rootNameElems[rootNameElems.length - 1]; - } - - if (rootName != null) { - SdncArtifactType mapEntry = config.getMapping(rootName); - - - if (mapEntry == null) { - - LOG.error("Unexpected file contents - root tag is "+rootName); - } - return(mapEntry); - } else { - LOG.error("Cannot get root tag from file"); - return(null); - } - - } catch (Exception e) { - LOG.error("Could not parse YANG_XML file "+spoolFile.getName(), e); - return(null); - } - } - - private void scheduleDeployment(SdncArtifactType type, String svcName, String resourceName, IArtifactInfo artifactInfo, String spoolFileName, File spoolFile) { - - if (type.getPass() < deployList.length) { - - if (artifactInfo != null) { - LOG.debug("Scheduling "+artifactInfo.getArtifactName()+" version "+artifactInfo.getArtifactVersion()+" for deployment"); - - deployList[type.getPass()].add(new DeployableArtifact(type, svcName, resourceName, artifactInfo, spoolFile)); - } else { - SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.SSS");//dd/MM/yyyy - Date now = new Date(); - String artifactVersion = sdfDate.format(now); - LOG.debug("Scheduling "+spoolFileName+" version "+artifactVersion+" for deployment"); - String artifactName = spoolFileName; - if (artifactInfo != null) { - artifactName = artifactInfo.getArtifactName(); - } - deployList[type.getPass()].add(new DeployableArtifact(type, svcName, resourceName, artifactName, artifactVersion, spoolFile)); - } - } else { - LOG.info("Pass for type "+type.getTag()+" is "+type.getPass()+" which is not <= "+deployList.length); - } - } - - - private DistributionStatusEnum deploySpoolFile(DeployableArtifact artifact) { - - DistributionStatusEnum deployResult = DistributionStatusEnum.DEPLOY_OK; - - StringBuffer msgBuffer = new StringBuffer(); - - - String namespace = config.getAsdcApiNamespace(); - if ((namespace == null) || (namespace.length() == 0)) { - namespace="com:att:sdnctl:asdcapi"; - } - - msgBuffer.append("\n"); - - String svcName = artifact.getSvcName(); - String resourceName = artifact.getResourceName(); - String artifactName = artifact.getArtifactName(); - - if (svcName != null) { - if (resourceName != null) { - artifactName = svcName + "/" + resourceName + "/" + artifactName; - } else { - artifactName = svcName + "/" + artifactName; - } - } - - msgBuffer.append(""+artifactName+"\n"); - msgBuffer.append(""+artifact.getArtifactVersion()+"\n"); - - - try { - BufferedReader rdr = new BufferedReader(new FileReader(artifact.getFile())); - - String curLine = rdr.readLine(); - - while (curLine != null) { - - if (!curLine.startsWith("\n"); - - - byte[] msgBytes = msgBuffer.toString().getBytes(); - - Document results = postRestXml(artifact.getType().getRpcUrl(config.getAsdcApiBaseUrl()), msgBytes); - - if (results == null) { - - deployResult = DistributionStatusEnum.DEPLOY_ERROR; - } else { - - XPathFactory xpf = XPathFactory.newInstance(); - XPath xp = xpf.newXPath(); - - String asdcApiResponseCode = "500"; - - try { - - asdcApiResponseCode = xp.evaluate("//asdc-api-response-code[position()=1]/text()", results.getDocumentElement()); - } catch (Exception e) { - LOG.error("Caught exception retrying to evaluate xpath", e); - } - - if (asdcApiResponseCode.contains("200")) { - LOG.info("Update to SDN-C succeeded"); - deployResult = DistributionStatusEnum.DEPLOY_OK; - } else { - LOG.info("Update to SDN-C failed (response code "+asdcApiResponseCode+")"); - - if (asdcApiResponseCode.contains("409")) { - deployResult = DistributionStatusEnum.ALREADY_DEPLOYED; - } else { - - deployResult = DistributionStatusEnum.DEPLOY_ERROR; - } - } - } - - - - return(deployResult); - } - - - - - - public static IDistributionStatusMessage buildStatusMessage( - final IDistributionClient client, final INotificationData data, - final IArtifactInfo relevantArtifact, - final DistributionStatusEnum status) { - IDistributionStatusMessage statusMessage = new IDistributionStatusMessage() { - - @Override - public long getTimestamp() { - long currentTimeMillis = System.currentTimeMillis(); - return currentTimeMillis; - } - - @Override - public DistributionStatusEnum getStatus() { - return status; - } - - @Override - public String getDistributionID() { - return data.getDistributionID(); - } - - @Override - public String getConsumerID() { - return client.getConfiguration().getConsumerID(); - } - - @Override - public String getArtifactURL() { - return relevantArtifact.getArtifactURL(); - } - }; - return statusMessage; - - } - - private HttpURLConnection getRestXmlConnection(String urlString, String method) throws IOException - { - URL sdncUrl = new URL(urlString); - Authenticator.setDefault(new SdncAuthenticator(config.getSdncUser(), config.getSdncPasswd())); - - HttpURLConnection conn = (HttpURLConnection) sdncUrl.openConnection(); - - String authStr = config.getSdncUser()+":"+config.getSdncPasswd(); - String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); - - conn.addRequestProperty("Authentication", "Basic "+encodedAuthStr); - - conn.setRequestMethod(method); - conn.setRequestProperty("Content-Type", "application/xml"); - conn.setRequestProperty("Accept", "application/xml"); - - conn.setDoInput(true); - conn.setDoOutput(true); - conn.setUseCaches(false); - - return(conn); - - } - - private Document postRestXml(String urlString, byte[] msgBytes) { - Document response = null; - - try { - SdncOdlConnection odlConn = SdncOdlConnection.newInstance(urlString, config.getSdncUser(), config.getSdncPasswd()); - - String sdncResp = odlConn.send("POST", "application/xml", new String(msgBytes)); - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - - - response = db.parse(new ByteArrayInputStream(sdncResp.getBytes())); - } catch (Exception e) { - LOG.error("Caught exception posting to ODL tier", e); - } - - return(response); - - } - - private File applyXslts(File srcFile) { - - Document doc = null; - - - File inFile = srcFile; - File outFile = null; - - String xsltPathList = config.getXsltPathList(); - - if ((xsltPathList == null) || (xsltPathList.length() == 0)) { - outFile = inFile; - } else { - - String[] xsltPaths = xsltPathList.split(","); - - for (String xsltPath : xsltPaths) { - try{ - - outFile = File.createTempFile("tmp", "xml"); - TransformerFactory factory = TransformerFactory.newInstance(); - Source xslt = new StreamSource(new File(xsltPath)); - Transformer transformer = factory.newTransformer(xslt); - Source text = new StreamSource(inFile); - - - transformer.transform(text, new StreamResult(outFile)); - - inFile = outFile; - - } catch (Exception e) { - LOG.error("Caught exception trying to apply XSLT template "+xsltPath, e); - - } - - } - } - - // After transformations, parse transformed XML - - - return(outFile); - } - - private String escapeFilename(String str) { - StringBuffer retval = new StringBuffer(); - - for (int i = 0 ; i < str.length() ; i++) { - char curchar = str.charAt(i); - if (Character.isJavaIdentifierPart(curchar)) { - retval.append(curchar); - } - } - - return(retval.toString()); - - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java deleted file mode 100644 index df5dfc0a9..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.results.IDistributionClientResult; -import org.openecomp.sdc.impl.DistributionClientFactory; -import org.openecomp.sdc.utils.DistributionActionResultEnum; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncUebClient { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncUebConfiguration.class); - - public static void main(String[] args) { - IDistributionClient client = DistributionClientFactory - .createDistributionClient(); - - SdncUebConfiguration config = new SdncUebConfiguration(); - - SdncUebCallback cb = new SdncUebCallback(client, config); - - LOG.info("Scanning for local distribution artifacts before starting client"); - cb.deployDownloadedFiles(null, null, null); - - LOG.info("Initializing ASDC distribution client"); - - IDistributionClientResult result = client.init( - config, cb); - - LOG.info("Initialized ASDC distribution client - results = " - + result.getDistributionMessageResult()); - - if (result.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS) { - LOG.info("Starting client..."); - IDistributionClientResult start = client.start(); - LOG.info("Client startup result = " - + start.getDistributionMessageResult()); - } - - - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebConfiguration.java deleted file mode 100644 index 7855b5ba4..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebConfiguration.java +++ /dev/null @@ -1,280 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - -import org.openecomp.sdc.api.consumer.IConfiguration; -import org.openecomp.sdc.utils.ArtifactTypeEnum; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncUebConfiguration implements IConfiguration{ - - private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - private static final Logger LOG = LoggerFactory - .getLogger(SdncUebConfiguration.class); - - private String asdcAddress = null; - private String consumerGroup = null; - private String consumerID = null; - private String environmentName = null; - private String password = null; - private int pollingInterval = 30; - private int pollingTimeout = 15; - private List relevantArtifactTypes = null; - private String user = null; - - private String sdncUser = null; - private String sdncPasswd = null; - private String asdcApiBaseUrl = null; - private String asdcApiNamespace = null; - - private SdncArtifactMap artifactMap = SdncArtifactMap.getInstance(); - - public String getAsdcApiNamespace() { - return asdcApiNamespace; - } - - private String incomingDir = null; - - private String archiveDir = null; - - private String overrideFile = null; - - private boolean activateServerTLSAuth; - private String keyStorePassword; - private String keyStorePath; - - private String xsltPathList; - - public String getXsltPathList() { - return xsltPathList; - } - - public String getOverrideFile() { - return overrideFile; - } - - public SdncUebConfiguration() { - - try { - init(); - } catch (Exception e) { - LOG.error("Cannot initialize SdncUebConfiguration", e); - } - } - - public void init() throws IOException { - String propPath = null; - String propDir = System.getenv(SDNC_CONFIG_DIR); - if (propDir == null) { - - propDir = "/opt/sdnc/data/properties"; - } - propPath = propDir + "/ueb-listener.properties"; - File propFile = new File(propPath); - - - if (!propFile.exists()) { - - throw new FileNotFoundException( - "Missing configuration properties file : " - + propFile); - } - - Properties props = new Properties(); - props.load(new FileInputStream(propFile)); - - asdcAddress = props.getProperty("org.openecomp.sdnc.uebclient.asdc-address"); - consumerGroup = props.getProperty("org.openecomp.sdnc.uebclient.consumer-group"); - consumerID = props.getProperty("org.openecomp.sdnc.uebclient.consumer-id"); - environmentName = props.getProperty("org.openecomp.sdnc.uebclient.environment-name"); - password = props.getProperty("org.openecomp.sdnc.uebclient.password"); - user = props.getProperty("org.openecomp.sdnc.uebclient.user"); - - sdncUser = props.getProperty("org.openecomp.sdnc.uebclient.sdnc-user"); - sdncPasswd = props.getProperty("org.openecomp.sdnc.uebclient.sdnc-passwd"); - asdcApiBaseUrl = props.getProperty("org.openecomp.sdnc.uebclient.asdc-api-base-url"); - asdcApiNamespace = props.getProperty("org.openecomp.sdnc.uebclient.asdc-api-namespace"); - - incomingDir = props.getProperty("org.openecomp.sdnc.uebclient.spool.incoming"); - archiveDir = props.getProperty("org.openecomp.sdnc.uebclient.spool.archive"); - overrideFile = props.getProperty("org.openecomp.sdnc.uebclient.override-file"); - - String curval = props.getProperty("org.openecomp.sdnc.uebclient.polling-interval"); - if ((curval != null) && (curval.length() > 0)) { - try { - pollingInterval = Integer.parseInt(curval); - } catch (Exception e) { - LOG.warn("Illegal value for org.openecomp.sdnc.uebclient.polling-interval ("+curval+")"); - } - } - - curval = props.getProperty("org.openecomp.sdnc.uebclient.polling-timeout"); - if ((curval != null) && (curval.length() > 0)) { - try { - pollingTimeout = Integer.parseInt(curval); - } catch (Exception e) { - LOG.warn("Illegal value for org.openecomp.sdnc.uebclient.polling-timeout ("+curval+")"); - } - } - - curval = props.getProperty("org.openecomp.sdnc.uebclient.relevant-artifact-types"); - if ((curval != null) && (curval.length() > 0)) { - String[] artifactTypes = curval.split(","); - - relevantArtifactTypes = new LinkedList(); - - for (int i = 0 ; i < artifactTypes.length ; i++) { - try { - if (ArtifactTypeEnum.valueOf(artifactTypes[i]) != null) { - relevantArtifactTypes.add(artifactTypes[i]); - } else { - LOG.warn("Skipping unrecognized artifact type "+artifactTypes[i]); - } - } catch (Exception e) { - - LOG.warn("Caught exception validating artifact type "+artifactTypes[i], e); - } - - } - - } - - curval = props.getProperty("org.openecomp.sdnc.uebclient.activate-server-tls-auth", "false"); - activateServerTLSAuth = "true".equalsIgnoreCase(curval); - keyStorePath = props.getProperty("org.openecomp.sdnc.uebclient.keystore-path"); - keyStorePassword = props.getProperty("org.openecomp.sdnc.uebclient.keystore-password"); - xsltPathList = props.getProperty("org.openecomp.sdnc.uebclient.xslt-path-list"); - - - String artifactMapFile = props.getProperty("org.openecomp.sdnc.uebclient.artifact-map"); - if (artifactMapFile != null) { - artifactMap.load(artifactMapFile); - } - - } - - @Override - public String getAsdcAddress() { - return asdcAddress; - } - - @Override - public String getConsumerGroup() { - return consumerGroup; - } - - @Override - public String getConsumerID() { - return consumerID; - } - - @Override - public String getEnvironmentName() { - return environmentName; - } - - @Override - public String getPassword() { - return password; - } - - @Override - public int getPollingInterval() { - return pollingInterval; - } - - @Override - public int getPollingTimeout() { - return pollingTimeout; - } - - @Override - public List getRelevantArtifactTypes() { - return relevantArtifactTypes; - } - - @Override - public String getUser() { - return user; - } - - - public String getSdncUser() { - return sdncUser; - } - - public String getSdncPasswd() { - return sdncPasswd; - } - - public String getAsdcApiBaseUrl() { - return asdcApiBaseUrl; - } - - @Override - public boolean activateServerTLSAuth() { - return activateServerTLSAuth; - } - - @Override - public String getKeyStorePassword() { - return keyStorePassword; - } - - @Override - public String getKeyStorePath() { - return keyStorePath; - } - - public String getIncomingDir() { - return incomingDir; - } - - public String getArchiveDir() { - return archiveDir; - } - - public int getMaxPasses() { - return(artifactMap.getNumPasses()); - } - - public SdncArtifactMap.SdncArtifactType getMapping(String tag) { - return(artifactMap.getMapping(tag)); - } - - @Override - public boolean isFilterInEmptyResources() { - // TODO Auto-generated method stub - return false; - } - - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFCModel.java deleted file mode 100644 index 67b786896..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFCModel.java +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncVFCModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncVFCModel.class); - - private String vmType = null; - private String vmCount = null; - - public SdncVFCModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - - super(sdcCsarHelper, nodeTemplate); - - // extract properties - vmType = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPE); - //vmCount = extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMCOUNT); - need path to vm_count - vmCount = "1"; - addParameter("vm_type", vmType); - addParameter("vm_type_tag", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPETAG)); - addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_ECOMPGENERATEDNAMING)); - addParameter("naming_policy", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VFCNAMING_NAMINGPOLICY)); - addParameter("nfc_naming_code", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFCCODE)); - } - - public String getVmType() { - return vmType; - } - - public void setVmType(String vmType) { - this.vmType = vmType; - } - - public String getVmCount() { - return vmCount; - } - - public void setVmCount(String vmCount) { - this.vmCount = vmCount; - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java deleted file mode 100644 index 4e95e46ba..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncVFModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncVFModel.class); - - public SdncVFModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { - - super(sdcCsarHelper, nodeTemplate); - - // extract metadata - Metadata metadata = nodeTemplate.getMetadata(); - addParameter("name", extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME)); - addParameter("vendor", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDOR)); - addParameter("vendor_version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDORRELEASE)); - - // extract properties - addParameter("ecomp_generated_naming", extractBooleanValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_ECOMPGENERATEDNAMING)); - addParameter("naming_policy", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_NAMINGPOLICY)); - addParameter("nf_type", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE)); - addParameter("nf_role", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE)); - addParameter("nf_code", extractValue( nodeTemplate, "nf_naming_code")); - addParameter("nf_function", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION)); - addParameter("avail_zone_max_count", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONEMAXCOUNT)); - } - -} diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModuleModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModuleModel.java deleted file mode 100644 index 86df8b2ab..000000000 --- a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModuleModel.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdnc.uebclient; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Group; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SdncVFModuleModel extends SdncBaseModel { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncVFModuleModel.class); - - public SdncVFModuleModel(ISdcCsarHelper sdcCsarHelper, Group group) { - - super(sdcCsarHelper, group); - - // extract properties - addParameter("vf_module_type", extractValue(group, SdcPropertyNames.PROPERTY_NAME_VFMODULETYPE)); - addIntParameter("availability_zone_count", extractValue(group, SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONECOUNT)); - addParameter("ecomp_generated_vm_assignments", extractBooleanValue(group, SdcPropertyNames.PROPERTY_NAME_ECOMPGENERATEDVMASSIGNMENTS)); - } - -} -- cgit 1.2.3-korg From 1027b0c07b488bb5f4542bd38501f9a99da5c2cf Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 15 Aug 2017 15:18:54 -0400 Subject: Port sli/northbound to Carbon Updated sli/northbound repo to compile against OpenDaylight Carbon SR1 release Change-Id: I6aec68cf436e11f5fd5b7094eb5616536bead44f Issue-ID: CCSDK-25 Signed-off-by: Dan Timoney --- asdcApi/features/pom.xml | 2 +- asdcApi/features/src/main/resources/features.xml | 4 ++-- asdcApi/installer/pom.xml | 5 ++--- asdcApi/installer/src/assembly/assemble_installer_zip.xml | 4 ++-- asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml | 4 ++-- asdcApi/installer/src/main/resources/scripts/install-feature.sh | 4 ++-- asdcApi/model/pom.xml | 6 +++--- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- .../org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java | 4 ++-- .../java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java | 4 ++-- .../asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java | 4 ++-- .../provider/impl/rev140523/AsdcApiProviderModuleFactory.java | 4 ++-- asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/features/src/main/resources/features.xml | 4 ++-- dataChange/installer/pom.xml | 5 ++--- dataChange/installer/src/assembly/assemble_installer_zip.xml | 4 ++-- dataChange/installer/src/assembly/assemble_mvnrepo_zip.xml | 4 ++-- dataChange/installer/src/main/resources/scripts/install-feature.sh | 4 ++-- dataChange/model/pom.xml | 6 +++--- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 7 +++---- .../main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java | 4 ++-- .../java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java | 4 ++-- .../provider/impl/rev140523/DataChangeProviderModule.java | 4 ++-- .../provider/impl/rev140523/DataChangeProviderModuleFactory.java | 4 ++-- .../provider/src/main/resources/initial/dataChange-provider.xml | 4 ++-- dmaap-listener/pom.xml | 5 +++-- dmaap-listener/src/assembly/assemble_zip.xml | 4 ++-- .../org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java | 4 ++-- .../onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java | 4 ++-- .../ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java | 4 ++-- .../onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java | 4 ++-- .../sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 4 ++-- .../onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java | 4 ++-- dmaap-listener/src/main/resources/log4j.properties | 4 ++-- dmaap-listener/src/main/scripts/start-dmaap-listener.sh | 4 ++-- dmaap-listener/src/main/scripts/stop-dmaap-listener.sh | 4 ++-- dmaap-listener/src/site/apt/index.apt | 4 ++-- dmaap-listener/src/site/site.xml | 4 ++-- pom.xml | 7 +++---- ueb-listener/pom.xml | 5 +++-- ueb-listener/src/assembly/assemble_zip.xml | 4 ++-- .../java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncBaseModel.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java | 4 ++-- .../onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java | 4 ++-- .../java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java | 4 ++-- .../java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java | 4 ++-- ueb-listener/src/main/resources/log4j.properties | 4 ++-- ueb-listener/src/main/scripts/start-ueb-listener.sh | 4 ++-- ueb-listener/src/main/scripts/stop-ueb-listener.sh | 4 ++-- ueb-listener/src/site/apt/index.apt | 4 ++-- ueb-listener/src/site/site.xml | 4 ++-- 62 files changed, 129 insertions(+), 131 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 774d9e529..e6af34c57 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT asdcApi-features diff --git a/asdcApi/features/src/main/resources/features.xml b/asdcApi/features/src/main/resources/features.xml index f9aa81a66..9006f1b94 100644 --- a/asdcApi/features/src/main/resources/features.xml +++ b/asdcApi/features/src/main/resources/features.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index b4f32934a..32f505053 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 asdcApi org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT asdcApi-installer asdcApi - Karaf Installer diff --git a/asdcApi/installer/src/assembly/assemble_installer_zip.xml b/asdcApi/installer/src/assembly/assemble_installer_zip.xml index e278872a1..3bed4b5ef 100644 --- a/asdcApi/installer/src/assembly/assemble_installer_zip.xml +++ b/asdcApi/installer/src/assembly/assemble_installer_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml b/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml index 608200da1..5c24d73ff 100644 --- a/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/asdcApi/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/asdcApi/installer/src/main/resources/scripts/install-feature.sh b/asdcApi/installer/src/main/resources/scripts/install-feature.sh index 9a47d2225..e986764b9 100644 --- a/asdcApi/installer/src/main/resources/scripts/install-feature.sh +++ b/asdcApi/installer/src/main/resources/scripts/install-feature.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index b9f48326d..327b8627e 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -4,11 +4,11 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT bundle @@ -45,7 +45,7 @@ ${yang.file.directory} - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index b4d538abd..9f8d906c3 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound sdnc-northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT pom org.onap.ccsdk.sli.northbound asdcApi - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index e8769fd7d..7b7ed4bee 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT asdcApi-provider bundle @@ -42,7 +42,7 @@ - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java index c6e1921b7..bd5f74a4f 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java index 0fa90ea7e..5b268bc28 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java index 6498f13b5..602b389cb 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java index 0a2272d35..ddf8093fb 100644 --- a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java +++ b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java index c2d15b890..513e61cff 100644 --- a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java +++ b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml b/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml index 53f5a11d0..aefdec281 100644 --- a/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml +++ b/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 123404479..cd48d3f52 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -4,11 +4,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT jar diff --git a/dataChange/features/src/main/resources/features.xml b/dataChange/features/src/main/resources/features.xml index 9cc8cc57b..47cdcfd9f 100644 --- a/dataChange/features/src/main/resources/features.xml +++ b/dataChange/features/src/main/resources/features.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 63fda23ab..940144f53 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 dataChange org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT dataChange-installer dataChange - Karaf Installer diff --git a/dataChange/installer/src/assembly/assemble_installer_zip.xml b/dataChange/installer/src/assembly/assemble_installer_zip.xml index e278872a1..3bed4b5ef 100644 --- a/dataChange/installer/src/assembly/assemble_installer_zip.xml +++ b/dataChange/installer/src/assembly/assemble_installer_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dataChange/installer/src/assembly/assemble_mvnrepo_zip.xml b/dataChange/installer/src/assembly/assemble_mvnrepo_zip.xml index 608200da1..5c24d73ff 100644 --- a/dataChange/installer/src/assembly/assemble_mvnrepo_zip.xml +++ b/dataChange/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dataChange/installer/src/main/resources/scripts/install-feature.sh b/dataChange/installer/src/main/resources/scripts/install-feature.sh index 9a47d2225..e986764b9 100644 --- a/dataChange/installer/src/main/resources/scripts/install-feature.sh +++ b/dataChange/installer/src/main/resources/scripts/install-feature.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 0d16ebfc0..20dddeb97 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -4,11 +4,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT bundle @@ -45,7 +45,7 @@ ${yang.file.directory} - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 2e3d87494..90e22d219 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound sdnc-northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT pom org.onap.ccsdk.sli.northbound dataChange - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 5a7c7003d..c73c00980 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 dataChange org.onap.ccsdk.sli.northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT dataChange-provider bundle @@ -44,7 +43,7 @@ - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java index 81da74161..75cc0a02e 100644 --- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java +++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeClient.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java index 40d30a792..dcfbf6ee2 100644 --- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java +++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModule.java b/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModule.java index f8267cf32..0655ae20a 100644 --- a/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModule.java +++ b/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModule.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModuleFactory.java b/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModuleFactory.java index 5852788c4..468989998 100644 --- a/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModuleFactory.java +++ b/dataChange/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/datachange/provider/impl/rev140523/DataChangeProviderModuleFactory.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dataChange/provider/src/main/resources/initial/dataChange-provider.xml b/dataChange/provider/src/main/resources/initial/dataChange-provider.xml index 3038201ba..2da0546aa 100644 --- a/dataChange/provider/src/main/resources/initial/dataChange-provider.xml +++ b/dataChange/provider/src/main/resources/initial/dataChange-provider.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 9ab23cdea..ac65c16f8 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -1,16 +1,17 @@ + 4.0.0 org.onap.ccsdk.sli.northbound jar dmaap-listener - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT DMAAP Listener DMAAP Listener org.onap.ccsdk.sli.northbound sdnc-northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT 1.1.7-SNAPSHOT diff --git a/dmaap-listener/src/assembly/assemble_zip.xml b/dmaap-listener/src/assembly/assemble_zip.xml index 15f6bf4d2..f8873ab41 100644 --- a/dmaap-listener/src/assembly/assemble_zip.xml +++ b/dmaap-listener/src/assembly/assemble_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index b2976294b..91afe1d1a 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java index a3bc46153..a8336342f 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java index b54adaf06..cab8b901c 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/InvalidMessageException.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index f6d8ff862..c1320d6b4 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 0e2a32646..abd395bfb 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java index 4d16dd2a0..e31219a23 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/resources/log4j.properties b/dmaap-listener/src/main/resources/log4j.properties index ba815871b..8db00762b 100644 --- a/dmaap-listener/src/main/resources/log4j.properties +++ b/dmaap-listener/src/main/resources/log4j.properties @@ -2,8 +2,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh index 5eeb62bbf..805105863 100644 --- a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh +++ b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh index 42de474fb..61be1a141 100644 --- a/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh +++ b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/site/apt/index.apt b/dmaap-listener/src/site/apt/index.apt index dd9d3ec39..370ddd4db 100644 --- a/dmaap-listener/src/site/apt/index.apt +++ b/dmaap-listener/src/site/apt/index.apt @@ -2,8 +2,8 @@ ~~ ============LICENSE_START======================================================= ~~ openECOMP : SDN-C ~~ ================================================================================ -~~ Copyright (C) 2017 ONAP Intellectual Property. All rights -~~ reserved. +~~ Copyright (C) 2017 AT&T Intellectual Property. All rights +~~ reserved. ~~ ================================================================================ ~~ Licensed under the Apache License, Version 2.0 (the "License"); ~~ you may not use this file except in compliance with the License. diff --git a/dmaap-listener/src/site/site.xml b/dmaap-listener/src/site/site.xml index 356c9c959..6b97d925e 100644 --- a/dmaap-listener/src/site/site.xml +++ b/dmaap-listener/src/site/site.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 4d2bb2092..c0f7ac616 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,9 @@ - + org.onap.ccsdk.parent - odlparent-boron-sr3 + odlparent-carbon-sr1 0.0.1-SNAPSHOT @@ -113,7 +112,7 @@ AT&T - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index e0b96aaf4..5f8d5ca1b 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -1,16 +1,17 @@ + 4.0.0 org.onap.ccsdk.sli.northbound jar ueb-listener - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT UEB Listener UEB Listener org.onap.ccsdk.sli.northbound sdnc-northbound - 0.0.1-SNAPSHOT + 0.1.0-SNAPSHOT 1.1.7-SNAPSHOT diff --git a/ueb-listener/src/assembly/assemble_zip.xml b/ueb-listener/src/assembly/assemble_zip.xml index d1f6679e1..97a229d2c 100644 --- a/ueb-listener/src/assembly/assemble_zip.xml +++ b/ueb-listener/src/assembly/assemble_zip.xml @@ -2,8 +2,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java index 3be906181..75b19cd2e 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java index d979a3206..4c08949c0 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 707eee7e4..1b6049278 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 @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java index dcf668ed8..2fec84cb1 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java index 7bee801d2..821057ef3 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncOdlConnection.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java index 86a4d2a25..3df27be6e 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index fd304208c..1e6b19db0 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java index e8ffc3333..e19646e39 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java index bf0d5b823..3c561118e 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java index 76f015f9a..55814ac3a 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java index cd79689b4..deed20cf4 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java index 7ae6c3107..3663c97c3 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/resources/log4j.properties b/ueb-listener/src/main/resources/log4j.properties index 670e48e11..f2f4ed26b 100644 --- a/ueb-listener/src/main/resources/log4j.properties +++ b/ueb-listener/src/main/resources/log4j.properties @@ -2,8 +2,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/scripts/start-ueb-listener.sh b/ueb-listener/src/main/scripts/start-ueb-listener.sh index db00726be..80ede3c8b 100644 --- a/ueb-listener/src/main/scripts/start-ueb-listener.sh +++ b/ueb-listener/src/main/scripts/start-ueb-listener.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/main/scripts/stop-ueb-listener.sh b/ueb-listener/src/main/scripts/stop-ueb-listener.sh index 2e3b4dd2b..cf110c5cc 100644 --- a/ueb-listener/src/main/scripts/stop-ueb-listener.sh +++ b/ueb-listener/src/main/scripts/stop-ueb-listener.sh @@ -4,8 +4,8 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights -# reserved. +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/site/apt/index.apt b/ueb-listener/src/site/apt/index.apt index dd9d3ec39..370ddd4db 100644 --- a/ueb-listener/src/site/apt/index.apt +++ b/ueb-listener/src/site/apt/index.apt @@ -2,8 +2,8 @@ ~~ ============LICENSE_START======================================================= ~~ openECOMP : SDN-C ~~ ================================================================================ -~~ Copyright (C) 2017 ONAP Intellectual Property. All rights -~~ reserved. +~~ Copyright (C) 2017 AT&T Intellectual Property. All rights +~~ reserved. ~~ ================================================================================ ~~ Licensed under the Apache License, Version 2.0 (the "License"); ~~ you may not use this file except in compliance with the License. diff --git a/ueb-listener/src/site/site.xml b/ueb-listener/src/site/site.xml index 356c9c959..6b97d925e 100644 --- a/ueb-listener/src/site/site.xml +++ b/ueb-listener/src/site/site.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= openECOMP : SDN-C ================================================================================ - Copyright (C) 2017 ONAP Intellectual Property. All rights - reserved. + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -- cgit 1.2.3-korg From ce4a541b00557f52860f16643aff0593178a2a91 Mon Sep 17 00:00:00 2001 From: Brian Freeman Date: Fri, 25 Aug 2017 17:16:00 +0000 Subject: Fix to start script and annotation dependency Change-Id: I38d4ffad440ea5866a398b8a6a7244d8bf156138 Signed-off-by: Brian Freeman Issue-Id: SDNC-67 --- dmaap-listener/pom.xml | 5 +++++ dmaap-listener/src/main/scripts/start-dmaap-listener.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index ac65c16f8..dcdc5ca5a 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -57,6 +57,11 @@ jackson-databind ${fasterxml.jackson.version} + + com.fasterxml.jackson.core + jackson-annotations + ${fasterxml.jackson.version} + junit junit diff --git a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh index 805105863..164ade332 100644 --- a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh +++ b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh @@ -60,7 +60,7 @@ do LISTENERCLASSPATH=$LISTENERCLASSPATH:$file done -${JAVA} ${JAVA_OPTS} -Dlog4j.configuration=file:${UEBLISTENERROOT}/lib/log4j.properties -cp ${LISTENERCLASSPATH} com.att.sdnctl.dmaapclient.DmaapListener & +${JAVA} ${JAVA_OPTS} -Dlog4j.configuration=file:${UEBLISTENERROOT}/lib/log4j.properties -cp ${LISTENERCLASSPATH} org.onap.ccsdk.sli.northbound.dmaapclient.DmaapListener & echo $! > $PIDFILE -- cgit 1.2.3-korg From 64c695ee5c8e2c6c004656fe161f161e4bc28728 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 29 Aug 2017 08:52:32 -0400 Subject: Cleanup artifactId for ccsdk/sli/northbound ArtifactId for ccsdk/sli/northbound pom.xml should not be identical to that for sdnc/northbound, otherwise import to Eclipse of both will be confusing. Updated parent artifactId in module pom.xmls under ccsdk/sli/northbound Change-Id: Ie1e1b7a1cd6bb7442a27ca083f37539cbc0497fb Issue-ID: CCSDK-70 Signed-off-by: Dan Timoney --- asdcApi/pom.xml | 2 +- dataChange/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 9f8d906c3..d4990612e 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound - sdnc-northbound + ccsdk-sli-northbound 0.1.0-SNAPSHOT diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 90e22d219..c07442595 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound - sdnc-northbound + ccsdk-sli-northbound 0.1.0-SNAPSHOT diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index dcdc5ca5a..1cc4acc59 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -10,7 +10,7 @@ DMAAP Listener org.onap.ccsdk.sli.northbound - sdnc-northbound + ccsdk-sli-northbound 0.1.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index c0f7ac616..947567097 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 pom org.onap.ccsdk.sli.northbound - sdnc-northbound + ccsdk-sli-northbound SDN-C Northbound APIs https://wiki.openecomp.org diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 5f8d5ca1b..84e407698 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -10,7 +10,7 @@ UEB Listener org.onap.ccsdk.sli.northbound - sdnc-northbound + ccsdk-sli-northbound 0.1.0-SNAPSHOT -- cgit 1.2.3-korg From ea0aabe54bc7b5d609b587e87ce85765f73fecbc Mon Sep 17 00:00:00 2001 From: Gaurav Agrawal Date: Fri, 8 Sep 2017 19:28:18 +0530 Subject: Fix few Blocker sonar issues Fix few Blocker sonar issues in CCSDK SLI Northbound https://sonar.onap.org/component_issues/index?id=org.onap.ccsdk.sli.northbound%3Accsdk-sli-northbound#resolved=false|severities=BLOCKER Change-Id: I8a2f2e9f3bc5bc5c007076e42f77fbf5da1304ac Issue-Id: CCSDK-67 Signed-off-by: Gaurav Agrawal --- .../northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 5 ++--- .../ccsdk/sli/northbound/uebclient/SdncArtifactMap.java | 13 +------------ 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index abd395bfb..1754957da 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -164,10 +164,9 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { return(null); } - try { - BufferedReader mapReader = new BufferedReader(new FileReader(mapFile)); + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { - String curLine = null; + String curLine; while ((curLine = mapReader.readLine()) != null) { curLine = curLine.trim(); diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java index 4c08949c0..dd9437ce9 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java @@ -87,10 +87,7 @@ public class SdncArtifactMap { if (mapFile.exists() && mapFile.canRead()) { - BufferedReader rdr = null; - try { - - rdr = new BufferedReader(new FileReader(mapFile)); + try (BufferedReader rdr = new BufferedReader(new FileReader(mapFile))) { for (String ln ; (ln = rdr.readLine()) != null ; ) { String[] lnFields = ln.split(","); @@ -107,14 +104,6 @@ public class SdncArtifactMap { } catch (Exception e) { LOG.error("Caught exception reading artifact map", e); return; - } finally { - if (rdr != null) { - try { - rdr.close(); - } catch (IOException e) { - - } - } } } } -- cgit 1.2.3-korg From bb315ff0cce96b31f8e741b3af0981a011e66095 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Tue, 19 Sep 2017 15:32:16 +0530 Subject: Fix Sonar Issues few major issues in sli/northbound *Remove unused imports *Iterate over the "entrySet" instead of the "keySet" *Replace the type specification with the diamond operator ("<>") Issue-Id: CCSDK-87 Signed-off-by: surya-huawei Change-Id: Ib2a6f97d3de759b937c1e2acd2e39312e88ad10b --- .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 1754957da..a3d70c8d9 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -22,24 +22,12 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import java.io.BufferedReader; -import java.io.DataOutputStream; import java.io.File; import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.PasswordAuthentication; -import java.net.URL; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLSession; - -import org.apache.commons.codec.binary.Base64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -108,14 +96,14 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { ObjectNode inputNode = oMapper.createObjectNode(); - for (String fromField : fieldMap.keySet()) { + for (Map.Entry entry: fieldMap.entrySet()) { - if (!SDNC_ENDPOINT.equals(fromField)) { - JsonNode curNode = instarRootNode.get(fromField); + if (!SDNC_ENDPOINT.equals(entry.getKey())) { + JsonNode curNode = instarRootNode.get(entry.getKey()); if (curNode != null) { String fromValue = curNode.textValue(); - inputNode.put(fieldMap.get(fromField), fromValue); + inputNode.put(entry.getValue(), fromValue); } } } @@ -141,7 +129,7 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { } private Map loadMap(String msgType, String mapDirName) { - Map results = new HashMap(); + Map results = new HashMap<>(); if (mapDirName == null) { -- cgit 1.2.3-korg From c0696b9b0ce62d3f10cd46eae8ac5a5ca99d3b1d Mon Sep 17 00:00:00 2001 From: Gaurav Agrawal Date: Tue, 19 Sep 2017 19:06:33 +0530 Subject: Fix critical sonar issues Fix critical sonar issues in CCSDK SLI Northbound by either logging or rethrowing the exception https://sonar.onap.org/component_issues/index?id=org.onap.ccsdk.sli.northbound%3Accsdk-sli-northbound#resolved=false|severities=CRITICAL Change-Id: I718f13b5801ea9d69b5c36f75b5387a0ae59cc6a Issue-Id: CCSDK-67 Signed-off-by: Gaurav Agrawal --- .../java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java | 3 +-- .../java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java | 2 +- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 2 +- .../java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java | 2 +- .../org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java index b9c897ec0..cebcb9986 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -157,8 +157,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { LOG.info("Create Containers succeeded!: "); } catch (InterruptedException | ExecutionException e) { - LOG.error("Create Containers Failed: " + e); - e.printStackTrace(); + LOG.error("Create Containers Failed: ", e); } } else { LOG.warn("createContainers : cannot find dataBroker to create containers"); diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index 91afe1d1a..ec34fe402 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -106,7 +106,7 @@ public class DmaapListener { try { consumerClass = Class.forName(consumerClassName); } catch (Exception e) { - LOG.error("Could not find DMaap consumer class " + consumerClassName); + LOG.error("Could not find DMaap consumer class {}", consumerClassName, e); } if (consumerClass != null) { diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 1754957da..7196c90a7 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -135,7 +135,7 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { LOG.info("POST message body would be:\n"+rpcMsgbody); } } catch (Exception e) { - + LOG.error("Unable to process message", e); } } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java index dd9437ce9..9b36cb6b3 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java @@ -66,7 +66,7 @@ public class SdncArtifactMap { try { this.pass = Integer.parseInt(pass); } catch (Exception e) { - LOG.error("Invalid pass value for artifact map entry ("+tag+","+rpc+","+pass+")"); + LOG.error("Invalid pass value for artifact map entry ({} {} {})", tag, rpc, pass, e); } } } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java index 3c561118e..3ea092d47 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java @@ -132,7 +132,7 @@ public class SdncUebConfiguration implements IConfiguration{ try { pollingInterval = Integer.parseInt(curval); } catch (Exception e) { - LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-interval ("+curval+")"); + LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-interval ({}) ", curval, e); } } @@ -141,7 +141,7 @@ public class SdncUebConfiguration implements IConfiguration{ try { pollingTimeout = Integer.parseInt(curval); } catch (Exception e) { - LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-timeout ("+curval+")"); + LOG.warn("Illegal value for org.onap.ccsdk.sli.northbound.uebclient.polling-timeout ({}) ", curval, e); } } -- cgit 1.2.3-korg From a74ffcd839da0b212cc2bca502977f225682dc33 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Wed, 20 Sep 2017 16:18:41 +0530 Subject: Remove useless assigment to local variables *Removed dead stores This is done to avoid waste of resources Issue-Id: CCSDK-87 Change-Id: Ie36255c6583792e2535000ee1bd5b2a3018632ff Signed-off-by: surya-huawei --- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 4 ++-- .../org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java | 5 ++--- .../onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index aa3f7261a..60a508e51 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -59,8 +59,8 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { } ObjectMapper oMapper = new ObjectMapper(); - JsonNode instarRootNode = null; - ObjectNode sdncRootNode = null; + JsonNode instarRootNode ; + ObjectNode sdncRootNode; String instarMsgName = null; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index e7a42bcb8..6a0c8c394 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -189,7 +189,7 @@ public class SdncUebCallback implements INotificationCallback { private static void setJdbcDataSource() throws IOException { - String propPath = null; + String propPath; String propDir = System.getenv(SDNC_CONFIG_DIR); if (propDir == null) { @@ -1056,8 +1056,7 @@ public class SdncUebCallback implements INotificationCallback { private File applyXslts(File srcFile) { - Document doc = null; - + Document doc; File inFile = srcFile; File outFile = null; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java index 3ea092d47..fdae95d11 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java @@ -91,7 +91,7 @@ public class SdncUebConfiguration implements IConfiguration{ } public void init() throws IOException { - String propPath = null; + String propPath; String propDir = System.getenv(SDNC_CONFIG_DIR); if (propDir == null) { -- cgit 1.2.3-korg From b5603e3052857610ac4ee677bbe5164af3e8d520 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Thu, 21 Sep 2017 15:55:14 +0530 Subject: Use Integer.toString for type conversion *Used Integer.toString instead of implicit type conversion This is done to make use of static and reduce cycles *Removed one unused import *Removed unnecessary parantheses Sometimes useless parantheses can be misleading hence removed Issue-Id: CCSDK-87 Change-Id: I23f56cb7c5a6dafa79f64d5cd8faa0994f0ff288 Signed-off-by: surya-huawei --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java index e31219a23..6aaf41cd9 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java @@ -28,7 +28,6 @@ import java.io.InputStreamReader; import java.net.Authenticator; import java.net.HttpURLConnection; import java.net.PasswordAuthentication; -import java.net.ProtocolException; import java.net.URL; import javax.net.ssl.HostnameVerifier; @@ -88,7 +87,7 @@ public class SdncOdlConnection { public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException { - return (new SdncOdlConnection(url, user, password)); + return new SdncOdlConnection(url, user, password); } @@ -121,7 +120,7 @@ public class SdncOdlConnection { } // Write message - httpConn.setRequestProperty("Content-Length", "" + msg.length()); + httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length())); DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); outStr.write(msg.getBytes()); outStr.close(); @@ -151,7 +150,7 @@ public class SdncOdlConnection { LOG.info("Response body :\n" + respString); - return (respString); + return respString; } -- cgit 1.2.3-korg From 40289adf50be8419eda4d5e49d27b86a016312b7 Mon Sep 17 00:00:00 2001 From: Bharat saraswal Date: Thu, 21 Sep 2017 18:25:09 +0530 Subject: Resolved below sonar issues. Method complextity. Redudant code and varibales. Exception handling. Refacting of code. Issue-Id:CCSDK-87 Change-Id: I757c6a6d3c403f81f725ad97a7759225d0709468 Signed-off-by: Bharat saraswal --- .../sli/northbound/dmaapclient/DmaapListener.java | 280 +++++++++++---------- .../northbound/dmaapclient/SdncDmaapConsumer.java | 234 ++++++++--------- .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 211 ++++++++-------- .../northbound/dmaapclient/SdncOdlConnection.java | 225 ++++++++--------- 4 files changed, 475 insertions(+), 475 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index ec34fe402..de76e454e 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -26,140 +26,156 @@ import java.io.FileInputStream; import java.util.LinkedList; import java.util.List; import java.util.Properties; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class DmaapListener { - - private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; - private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - private static final Logger LOG = LoggerFactory - .getLogger(DmaapListener.class); - - public static void main(String[] args) { - - Properties properties = new Properties(); - - - String propFileName = DMAAP_LISTENER_PROPERTIES; - - if (args.length > 0) { - propFileName = args[0]; - } - - String propPath = null; - String propDir = System.getenv(SDNC_CONFIG_DIR); - - List consumers = new LinkedList(); - - if (propDir == null) { - - propDir = "/opt/sdnc/data/properties"; - } - - if (!propFileName.startsWith("/")) { - propPath = propDir + "/" + propFileName; - } - - File propFile = new File(propPath); - - if (!propFile.canRead()) { - LOG.error("Cannot read properties file "+propPath); - System.exit(1); - } - - try { - properties.load(new FileInputStream(propFile)); - } catch (Exception e) { - LOG.error("Caught exception loading properties from "+propPath, e); - System.exit(1); - } - - String subscriptionStr = properties.getProperty("subscriptions"); - - boolean threadsRunning = false; - - LOG.debug("Dmaap subscriptions : "+subscriptionStr); - - if (subscriptionStr != null) { - String[] subscriptions = subscriptionStr.split(";"); - - for (int i = 0; i < subscriptions.length; i++) { - String[] subscription = subscriptions[i].split(":"); - String consumerClassName = subscription[0]; - String propertyPath = subscription[1]; - - LOG.debug("Handling subscription [" + consumerClassName + "," + propertyPath + "]"); - - if (propertyPath == null) { - LOG.error("Invalid subscription (" + subscriptions[i] + ") property file missing"); - continue; - } - - if (!propertyPath.startsWith("/")) { - propertyPath = propDir + "/" + propertyPath; - } - - Class consumerClass = null; - - try { - consumerClass = Class.forName(consumerClassName); - } catch (Exception e) { - LOG.error("Could not find DMaap consumer class {}", consumerClassName, e); - } - - if (consumerClass != null) { - - SdncDmaapConsumer consumer = null; - - try { - consumer = (SdncDmaapConsumer) consumerClass.newInstance(); - } catch (Exception e) { - LOG.error("Could not create consumer from class " + consumerClassName, e); - } - - if (consumer != null) { - LOG.debug("Initializing consumer " + consumerClassName + "(" + propertyPath + ")"); - consumer.init(properties, propertyPath); - - if (consumer.isReady()) { - Thread consumerThread = new Thread(consumer); - consumerThread.start(); - consumers.add(consumer); - threadsRunning = true; - LOG.info("Started consumer thread (" + consumerClassName + " : " + propertyPath + ")"); - } else { - LOG.debug("Consumer " + consumerClassName + " is not ready"); - } - } - - } - - } - } - - while (threadsRunning) { - - threadsRunning = false; - for (SdncDmaapConsumer consumer : consumers) { - if (consumer.isRunning()) { - threadsRunning = true; - } - } - - if (!threadsRunning) { - break; - } - - try { - Thread.sleep(10000); - } catch (InterruptedException e) { - - } - } - - LOG.info("No listener threads running - exitting"); - - } + + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "/opt/sdnc/data/properties"; + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final Logger LOG = LoggerFactory.getLogger(DmaapListener.class); + + public static void main(String[] args) { + + Properties properties = new Properties(); + String propFileName = DMAAP_LISTENER_PROPERTIES; + String propPath = null; + String propDir = System.getenv(SDNC_CONFIG_DIR); + List consumers = new LinkedList<>(); + + if (args.length > 0) { + propFileName = args[0]; + } + + if (propDir == null) { + propDir = DMAAP_LISTENER_PROPERTIES_DIR; + } + + if (!propFileName.startsWith("/")) { + propPath = propDir + "/" + propFileName; + } + + if (propPath != null) { + properties = loadProperties(propPath, properties); + + String subscriptionStr = properties.getProperty("subscriptions"); + + boolean threadsRunning = false; + + LOG.debug("Dmaap subscriptions : " + subscriptionStr); + + if (subscriptionStr != null) { + threadsRunning = handleSubscriptions(subscriptionStr, propDir, properties, consumers); + } + + while (threadsRunning) { + threadsRunning = updateThreadState(consumers); + if (!threadsRunning) { + break; + } + + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + LOG.error(e.getLocalizedMessage(), e); + } + } + + LOG.info("No listener threads running - exiting"); + } + } + + private static boolean updateThreadState(List consumers) { + boolean threadsRunning = false; + for (SdncDmaapConsumer consumer : consumers) { + if (consumer.isRunning()) { + threadsRunning = true; + } + } + return threadsRunning; + } + + private static Properties loadProperties(String propPath, Properties properties) { + File propFile = new File(propPath); + + if (!propFile.canRead()) { + LOG.error("Cannot read properties file " + propPath); + System.exit(1); + } + + try (FileInputStream in = new FileInputStream(propFile)) { + properties.load(in); + } catch (Exception e) { + LOG.error("Caught exception loading properties from " + propPath, e); + System.exit(1); + } + return properties; + } + + private static boolean handleSubscriptions(String subscriptionStr, String propDir, Properties properties, + List consumers) { + String[] subscriptions = subscriptionStr.split(";"); + + for (String subscription1 : subscriptions) { + String[] subscription = subscription1.split(":"); + String consumerClassName = subscription[0]; + String propertyPath = subscription[1]; + + LOG.debug(String.format("Handling subscription [%s,%s]", consumerClassName, propertyPath)); + + if (propertyPath == null) { + LOG.error(String.format("Invalid subscription (%s) property file missing", subscription1)); + continue; + } + + if (!propertyPath.startsWith("/")) { + propertyPath = propDir + "/" + propertyPath; + } + + Class consumerClass = null; + + try { + consumerClass = Class.forName(consumerClassName); + } catch (Exception e) { + LOG.error("Could not find DMaap consumer class {}", consumerClassName, e); + } + + if (consumerClass != null) { + return handleConsumerClass(consumerClass, consumerClassName, propertyPath, + properties, consumers); + } + } + return false; + } + + private static boolean handleConsumerClass(Class consumerClass, String consumerClassName, String propertyPath, + Properties properties, List consumers) { + + SdncDmaapConsumer consumer = null; + + try { + consumer = (SdncDmaapConsumer) consumerClass.newInstance(); + } catch (Exception e) { + LOG.error("Could not create consumer from class " + consumerClassName, e); + } + + if (consumer != null) { + LOG.debug(String.format("Initializing consumer %s(%s)", consumerClassName, propertyPath)); + consumer.init(properties, propertyPath); + + if (consumer.isReady()) { + Thread consumerThread = new Thread(consumer); + consumerThread.start(); + consumers.add(consumer); + + LOG.info(String.format("Started consumer thread (%s : %s)", consumerClassName, + propertyPath)); + return true; + } else { + LOG.debug(String.format("Consumer %s is not ready", consumerClassName)); + } + } + return false; + } } diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index c1320d6b4..a0c555303 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -21,126 +21,132 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; +import com.att.nsa.mr.client.MRClientFactory; +import com.att.nsa.mr.client.MRConsumer; +import com.att.nsa.mr.client.response.MRConsumerResponse; import java.io.File; import java.io.FileInputStream; import java.util.Properties; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.att.nsa.mr.client.MRClientFactory; -import com.att.nsa.mr.client.MRConsumer; -import com.att.nsa.mr.client.response.MRConsumerResponse; - public abstract class SdncDmaapConsumer implements Runnable { - private static final Logger LOG = LoggerFactory - .getLogger(SdncDmaapConsumer.class); - - private String propertiesPath = ""; - private Properties properties = null; - MRConsumer consumer = null; - MRConsumerResponse consumerResponse = null; - boolean running = false; - boolean ready = false; - int fetchPause = 5000; // Default pause between fetchs - 5 seconds - - public boolean isReady() { - return ready; - } - - int timeout = 15000; // Default timeout - 15 seconds - - public boolean isRunning() { - return running; - } - - public SdncDmaapConsumer() { - - } - - public SdncDmaapConsumer(Properties properties, String propertiesPath) { - init(properties, propertiesPath); - } - - public String getProperty(String name) { - return(properties.getProperty(name, "")); - } - - public void init(Properties properties, String propertiesPath) { - - this.propertiesPath = propertiesPath; - - try { - - this.properties = (Properties) properties.clone(); - - this.properties.load(new FileInputStream(new File(propertiesPath))); - - String timeoutStr = properties.getProperty("timeout"); - - if ((timeoutStr != null) && (timeoutStr.length() > 0)) { - try { - timeout = Integer.parseInt(timeoutStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric value specified for timeout ("+timeoutStr+")"); - } - } - - String fetchPauseStr = properties.getProperty("fetchPause"); - if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { - try { - fetchPause = Integer.parseInt(fetchPauseStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric valud specified for fetchPause ("+fetchPauseStr+")"); - } - } - - this.consumer = MRClientFactory.createConsumer(propertiesPath); - ready = true; - } catch (Exception e) { - LOG.error("Error initializing DMaaP consumer from file "+propertiesPath, e); - } - } - - - @Override - public void run() { - if (ready) { - - running = true; - - while (running) { - - try { - boolean noData = true; - consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); - for (String msg : consumerResponse.getActualMessages()) { - noData = false; - LOG.info("Received message from DMaaP:\n"+msg); - processMsg(msg); - } - - if (noData) { - if (fetchPause > 0) { - - LOG.info("No data received from fetch. Pausing "+fetchPause+" ms before retry"); - Thread.sleep(fetchPause); - } else { - - LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); - } - } - } catch (Exception e) { - LOG.error("Caught exception reading from DMaaP", e); - running = false; - } - - - } - } - - } - - abstract public void processMsg(String msg) throws InvalidMessageException; + private static final Logger LOG = LoggerFactory + .getLogger(SdncDmaapConsumer.class); + + private String propertiesPath = ""; + private Properties properties = null; + private MRConsumer consumer = null; + private MRConsumerResponse consumerResponse = null; + private boolean running = false; + private boolean ready = false; + private int fetchPause = 5000; // Default pause between fetch - 5 seconds + private int timeout = 15000; // Default timeout - 15 seconds + + public boolean isReady() { + return ready; + } + + + public boolean isRunning() { + return running; + } + + public SdncDmaapConsumer() { + + } + + public SdncDmaapConsumer(Properties properties, String propertiesPath) { + init(properties, propertiesPath); + } + + public String getProperty(String name) { + return (properties.getProperty(name, "")); + } + + public void init(Properties properties, String propertiesPath) { + + this.propertiesPath = propertiesPath; + + try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { + + this.properties = (Properties) properties.clone(); + this.properties.load(in); + + String timeoutStr = properties.getProperty("timeout"); + + if ((timeoutStr != null) && (timeoutStr.length() > 0)) { + timeout = parseTimeOutValue(timeoutStr); + } + + String fetchPauseStr = properties.getProperty("fetchPause"); + if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { + fetchPause = parseFetchPause(fetchPauseStr); + } + + this.consumer = MRClientFactory.createConsumer(propertiesPath); + ready = true; + } catch (Exception e) { + LOG.error("Error initializing DMaaP consumer from file " + propertiesPath, e); + } + } + + private int parseTimeOutValue(String timeoutStr) { + try { + return Integer.parseInt(timeoutStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for timeout (" + timeoutStr + ")"); + } + return timeout; + } + + private int parseFetchPause(String fetchPauseStr) { + try { + return Integer.parseInt(fetchPauseStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for fetchPause (" + fetchPauseStr + ")"); + } + return fetchPause; + } + + + @Override + public void run() { + if (ready) { + + running = true; + + while (running) { + + try { + boolean noData = true; + consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); + for (String msg : consumerResponse.getActualMessages()) { + noData = false; + LOG.info("Received message from DMaaP:\n" + msg); + processMsg(msg); + } + + if (noData) { + pauseThread(); + } + } catch (Exception e) { + LOG.error("Caught exception reading from DMaaP", e); + running = false; + } + } + } + } + + private void pauseThread() throws InterruptedException { + if (fetchPause > 0) { + LOG.info(String.format("No data received from fetch. Pausing %d ms before retry", fetchPause)); + Thread.sleep(fetchPause); + } else { + LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); + } + } + + abstract public void processMsg(String msg) throws InvalidMessageException; } diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 60a508e51..1d499a1e7 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -21,163 +21,148 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; - public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { - private static final Logger LOG = LoggerFactory - .getLogger(SdncFlatJsonDmaapConsumer.class); - - private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; - private static final String SDNC_ENDPOINT = "SDNC.endpoint"; - - - - @Override - public void processMsg(String msg) throws InvalidMessageException { - - processMsg(msg, null); - } - - public void processMsg(String msg, String mapDirName) throws InvalidMessageException { - - if (msg == null) { - throw new InvalidMessageException("Null message"); - } - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode instarRootNode ; - ObjectNode sdncRootNode; - - String instarMsgName = null; - - try { - instarRootNode = oMapper.readTree(msg); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } + private static final Logger LOG = LoggerFactory.getLogger(SdncFlatJsonDmaapConsumer.class); - Iterator> instarFields = instarRootNode.fields(); + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; - while (instarFields.hasNext()) { - Map.Entry entry = instarFields.next(); + @Override + public void processMsg(String msg) throws InvalidMessageException { - instarMsgName = entry.getKey(); - instarRootNode = entry.getValue(); - break; - } + processMsg(msg, null); + } - Map fieldMap = loadMap(instarMsgName, mapDirName); + public void processMsg(String msg, String mapDirName) throws InvalidMessageException { - if (fieldMap == null) { - throw new InvalidMessageException("Unable to process message - cannot load field mappings"); - } + if (msg == null) { + throw new InvalidMessageException("Null message"); + } - if (!fieldMap.containsKey(SDNC_ENDPOINT)) { - throw new InvalidMessageException("No SDNC endpoint known for message "+instarMsgName); - } + ObjectMapper oMapper = new ObjectMapper(); + JsonNode instarRootNode; + ObjectNode sdncRootNode; - String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + String instarMsgName = null; - sdncRootNode = oMapper.createObjectNode(); - ObjectNode inputNode = oMapper.createObjectNode(); + try { + instarRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + Iterator> instarFields = instarRootNode.fields(); - for (Map.Entry entry: fieldMap.entrySet()) { + while (instarFields.hasNext()) { + Map.Entry entry = instarFields.next(); - if (!SDNC_ENDPOINT.equals(entry.getKey())) { - JsonNode curNode = instarRootNode.get(entry.getKey()); - if (curNode != null) { - String fromValue = curNode.textValue(); + instarMsgName = entry.getKey(); + instarRootNode = entry.getValue(); + break; + } - inputNode.put(entry.getValue(), fromValue); - } - } - } - sdncRootNode.put("input", inputNode); + Map fieldMap = loadMap(instarMsgName, mapDirName); - try { - String rpcMsgbody = oMapper.writeValueAsString(sdncRootNode); - String odlUrlBase = getProperty("sdnc.odl.url-base"); - String odlUser = getProperty("sdnc.odl.user"); - String odlPassword = getProperty("sdnc.odl.password"); + if (fieldMap == null) { + throw new InvalidMessageException("Unable to process message - cannot load field mappings"); + } - if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { - SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + throw new InvalidMessageException("No SDNC endpoint known for message " + instarMsgName); + } - conn.send("POST", "application/json", rpcMsgbody); - } else { - LOG.info("POST message body would be:\n"+rpcMsgbody); - } - } catch (Exception e) { - LOG.error("Unable to process message", e); - } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); - } + sdncRootNode = oMapper.createObjectNode(); + ObjectNode inputNode = oMapper.createObjectNode(); - private Map loadMap(String msgType, String mapDirName) { - Map results = new HashMap<>(); + for (Map.Entry entry : fieldMap.entrySet()) { + if (!SDNC_ENDPOINT.equals(entry.getKey())) { + JsonNode curNode = instarRootNode.get(entry.getKey()); + if (curNode != null) { + String fromValue = curNode.textValue(); - if (mapDirName == null) { - String rootdir = System.getenv(DMAAPLISTENERROOT); + inputNode.put(entry.getValue(), fromValue); + } + } + } + sdncRootNode.put("input", inputNode); - if ((rootdir == null) || (rootdir.length() == 0)) { - rootdir = "/opt/app/dmaap-listener"; - } + try { + String rpcMsgbody = oMapper.writeValueAsString(sdncRootNode); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); - mapDirName = rootdir + "/lib"; + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); - } + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } - String mapFilename = mapDirName + "/" + msgType + ".map"; + private Map loadMap(String msgType, String mapDirName) { + Map results = new HashMap<>(); - File mapFile = new File(mapFilename); + if (mapDirName == null) { + String rootdir = System.getenv(DMAAPLISTENERROOT); - if (!mapFile.canRead()) { - LOG.error("Cannot read map file ("+mapFilename+")"); - return(null); - } + if ((rootdir == null) || (rootdir.length() == 0)) { + rootdir = "/opt/app/dmaap-listener"; + } - try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { + mapDirName = rootdir + "/lib"; + } - String curLine; + String mapFilename = mapDirName + "/" + msgType + ".map"; - while ((curLine = mapReader.readLine()) != null) { - curLine = curLine.trim(); + File mapFile = new File(mapFilename); - if ((curLine.length() > 0) && (!curLine.startsWith("#"))) { + if (!mapFile.canRead()) { + LOG.error(String.format("Cannot read map file (%s)", mapFilename)); + return (null); + } - if (curLine.contains("=>")) { - String[] entry = curLine.split("=>"); - if (entry.length == 2) { - results.put(entry[0].trim(), entry[1].trim()); - } - } - } - } - mapReader.close(); - } catch (Exception e) { - LOG.error("Caught exception reading map "+mapFilename, e); - return(null); - } + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { - return(results); - } + String curLine; + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map " + mapFilename, e); + return (null); + } + return (results); + } } diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java index 6aaf41cd9..f88f7bf8c 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java @@ -29,130 +29,123 @@ import java.net.Authenticator; import java.net.HttpURLConnection; import java.net.PasswordAuthentication; import java.net.URL; - import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLSession; - import org.apache.commons.codec.binary.Base64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SdncOdlConnection { - - private static final Logger LOG = LoggerFactory - .getLogger(SdncOdlConnection.class); - - private HttpURLConnection httpConn = null; - - private String url = null; - private String user = null; - private String password = null; - - private class SdncAuthenticator extends Authenticator { - - private String user; - private String passwd; - - SdncAuthenticator(String user, String passwd) { - this.user = user; - this.passwd = passwd; - } - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(user, passwd.toCharArray()); - } - - } - - private SdncOdlConnection() { - - } - - private SdncOdlConnection(String url, String user, String password) { - this.url = url; - this.user = user; - this.password = password; - - try { - URL sdncUrl = new URL(url); - Authenticator.setDefault(new SdncAuthenticator(user, password)); - - this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); - } catch (Exception e) { - LOG.error("Unable to create http connection", e); - } - } - - public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException - { - return new SdncOdlConnection(url, user, password); - } - - - - public String send(String method, String contentType, String msg) throws IOException { - - LOG.info("Sending REST " + method + " to " + url); - LOG.info("Message body:\n" + msg); - String authStr = user + ":" + password; - String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); - - httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); - - httpConn.setRequestMethod(method); - httpConn.setRequestProperty("Content-Type", contentType); - httpConn.setRequestProperty("Accept", contentType); - - httpConn.setDoInput(true); - httpConn.setDoOutput(true); - httpConn.setUseCaches(false); - - if (httpConn instanceof HttpsURLConnection) { - HostnameVerifier hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); - } - - // Write message - httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length())); - DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); - outStr.write(msg.getBytes()); - outStr.close(); - - // Read response - BufferedReader respRdr; - - LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); - - if (httpConn.getResponseCode() < 300) { - - respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); - } else { - respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); - } - - StringBuffer respBuff = new StringBuffer(); - - String respLn; - - while ((respLn = respRdr.readLine()) != null) { - respBuff.append(respLn + "\n"); - } - respRdr.close(); - - String respString = respBuff.toString(); - - LOG.info("Response body :\n" + respString); - - return respString; - - } - + private static final Logger LOG = LoggerFactory + .getLogger(SdncOdlConnection.class); + + private HttpURLConnection httpConn = null; + + private String url = null; + private String user = null; + private String password = null; + + private class SdncAuthenticator extends Authenticator { + + private String user; + private String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + } + + private SdncOdlConnection() { + + } + + private SdncOdlConnection(String url, String user, String password) { + this.url = url; + this.user = user; + this.password = password; + + try { + URL sdncUrl = new URL(url); + Authenticator.setDefault(new SdncAuthenticator(user, password)); + + this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); + } catch (Exception e) { + LOG.error("Unable to create http connection", e); + } + } + + public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException { + return new SdncOdlConnection(url, user, password); + } + + + public String send(String method, String contentType, String msg) throws IOException { + + LOG.info(String.format("Sending REST %s to %s", method, url)); + LOG.info(String.format("Message body:%n%s", msg)); + String authStr = user + ":" + password; + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); + + httpConn.setRequestMethod(method); + httpConn.setRequestProperty("Content-Type", contentType); + httpConn.setRequestProperty("Accept", contentType); + + httpConn.setDoInput(true); + httpConn.setDoOutput(true); + httpConn.setUseCaches(false); + + if (httpConn instanceof HttpsURLConnection) { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); + } + + // Write message + httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length())); + DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); + outStr.write(msg.getBytes()); + outStr.close(); + + // Read response + BufferedReader respRdr; + + LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); + + if (httpConn.getResponseCode() < 300) { + + respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); + } else { + respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); + } + + StringBuilder respBuff = new StringBuilder(); + + String respLn; + + while ((respLn = respRdr.readLine()) != null) { + respBuff.append(respLn).append("\n"); + } + respRdr.close(); + + String respString = respBuff.toString(); + + LOG.info(String.format("Response body :%n%s", respString)); + + return respString; + } } -- cgit 1.2.3-korg From 12d893efa353bc5bd5054cd59998a623f5d058d0 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 3 Oct 2017 07:34:22 -0400 Subject: Add unit test for dmaap-listener Add unit test case for dmaap-listener. Change-Id: I501614016c96d8300bc15cdf1819691f95c467f4 Issue-ID: CCSDK-106 Signed-off-by: Dan Timoney --- .../sli/northbound/dmaapclient/DmaapListener.java | 8 ++-- .../northbound/dmaapclient/TestDmaapListener.java | 52 ++++++++++++++++++++++ .../src/test/resources/dmaap-consumer-1.properties | 35 +++++++++++++++ .../resources/dmaap-listener.preferredRoute.txt | 1 + .../src/test/resources/dmaap-listener.properties | 1 + 5 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDmaapListener.java create mode 100755 dmaap-listener/src/test/resources/dmaap-consumer-1.properties create mode 100755 dmaap-listener/src/test/resources/dmaap-listener.preferredRoute.txt create mode 100755 dmaap-listener/src/test/resources/dmaap-listener.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index de76e454e..ce099cd64 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -8,9 +8,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -96,7 +96,7 @@ public class DmaapListener { return threadsRunning; } - private static Properties loadProperties(String propPath, Properties properties) { + static Properties loadProperties(String propPath, Properties properties) { File propFile = new File(propPath); if (!propFile.canRead()) { @@ -113,7 +113,7 @@ public class DmaapListener { return properties; } - private static boolean handleSubscriptions(String subscriptionStr, String propDir, Properties properties, + static boolean handleSubscriptions(String subscriptionStr, String propDir, Properties properties, List consumers) { String[] subscriptions = subscriptionStr.split(";"); diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDmaapListener.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDmaapListener.java new file mode 100644 index 000000000..943ef0204 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDmaapListener.java @@ -0,0 +1,52 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.*; + +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TestDmaapListener { + + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; + + private static final Logger LOG = LoggerFactory.getLogger(TestDmaapListener.class); + + @Before + public void setUp() throws Exception { + } + + @Test + public void test() { + Properties properties = new Properties(); + String propFileName = DMAAP_LISTENER_PROPERTIES; + String propPath = null; + String propDir = DMAAP_LISTENER_PROPERTIES_DIR; + + List consumers = new LinkedList<>(); + + + propPath = propDir + "/" + propFileName; + + if (propPath != null) { + properties = DmaapListener.loadProperties(propPath, properties); + + String subscriptionStr = properties.getProperty("subscriptions"); + + boolean threadsRunning = false; + + LOG.debug("Dmaap subscriptions : " + subscriptionStr); + + if (subscriptionStr != null) { + threadsRunning = DmaapListener.handleSubscriptions(subscriptionStr, propDir, properties, consumers); + } + } + } + +} diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-1.properties b/dmaap-listener/src/test/resources/dmaap-consumer-1.properties new file mode 100755 index 000000000..ae83ef8c2 --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-1.properties @@ -0,0 +1,35 @@ +TransportType=HTTPAAF +Latitude =40.397443 +Longitude =-74.135602 +Version =1.0 +ServiceName =localhost/events +Environment =DEV +Partner = +SubContextPath =/ +Protocol =http +MethodType =GET +username =test +password =test +contenttype =application/json +authKey=ABC123 +authDate=2016-05-10T13:13:50-0700 +host=localhost:3904 +topic=ccsdk-topic +group=ccsdk-unittest +id=ccsdk_unittest +timeout=15000 +limit=1000 +filter= +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=15000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=src/test/resources/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=admin +sdnc.odl.url-base=http://localhost:8282/restconf/operations + diff --git a/dmaap-listener/src/test/resources/dmaap-listener.preferredRoute.txt b/dmaap-listener/src/test/resources/dmaap-listener.preferredRoute.txt new file mode 100755 index 000000000..88705f73b --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-listener.preferredRoute.txt @@ -0,0 +1 @@ +preferredRouteKey=ABC123 \ No newline at end of file diff --git a/dmaap-listener/src/test/resources/dmaap-listener.properties b/dmaap-listener/src/test/resources/dmaap-listener.properties new file mode 100755 index 000000000..ed180e515 --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-listener.properties @@ -0,0 +1 @@ +subscriptions=org.onap.ccsdk.sli.northbound.dmaapclient.DummyDmaapConsumer:dmaap-consumer-1.properties \ No newline at end of file -- cgit 1.2.3-korg From 905f1d2016e8bc4d02a801017a31b20c4eb2119e Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Thu, 5 Oct 2017 15:20:33 +0530 Subject: Add a test for SdncJsonDmaapConsumer *Add a unit test in sli/northbound module This Test checks whether an InvalidMessageException is thrown when null is passed to processMsg method Issue-Id: CCSDK-106 Change-Id: I52327377f4582d8c24cef87f0360b977f2f216fc Signed-off-by: surya-huawei --- .../dmaapclient/TestSdncJsonDmaapConsumer.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java new file mode 100644 index 000000000..0d65231da --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.junit.Test; + +public class TestSdncJsonDmaapConsumer { + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; + + @Test(expected = InvalidMessageException.class) + public void testProcessMsg_shouldThrowException() throws Exception { + SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); + consumer.processMsg(null); + } +} -- cgit 1.2.3-korg From 1aab3d043fca73edbdb5da1972a947d92ce85a77 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Thu, 5 Oct 2017 15:49:13 +0530 Subject: Add a test for DummyDmaapConsumer *Add a unit test in sli/northbound module This is to improve code coverage of DummyDmaapConsumer class Issue-Id: CCSDK-106 Change-Id: Iecd4970a0cd82c94a219b1a2e861fcc3da11f23c Signed-off-by: surya-huawei --- .../dmaapclient/TestDummyDmaapConsumer.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDummyDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDummyDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDummyDmaapConsumer.java new file mode 100644 index 000000000..47330c622 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestDummyDmaapConsumer.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class TestDummyDmaapConsumer { + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; + + DummyDmaapConsumer consumer = new DummyDmaapConsumer(); + + @Test + public void testProcessMsg(){ + consumer.processMsg(null); + } + +} -- cgit 1.2.3-korg From 806de96eefaaf8ad6685a2c24b7dea03eb629ba2 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Thu, 12 Oct 2017 12:17:55 +0530 Subject: Remove IOException in method declaration *This is done because IOException cannot be thrown from the method and is hence superflous Issue-Id: CCSDK-117 Change-Id: I0712cfbf610f815e76ed33b0039ecb5e3cc7bbbe Signed-off-by: surya-huawei --- .../org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java index f88f7bf8c..6eeef9b48 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncOdlConnection.java @@ -83,7 +83,7 @@ public class SdncOdlConnection { } } - public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException { + public static SdncOdlConnection newInstance(String url, String user, String password) { return new SdncOdlConnection(url, user, password); } -- cgit 1.2.3-korg From 2f9282706b2eaca0c271d6da27b3dbc0692accc2 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 9 Nov 2017 07:19:49 -0500 Subject: Roll to version 0.1.1-SNAPSHOT Roll to next release version Change-Id: I7df5f5c516db6b4459a6f6063bf754e058a4048d Issue-ID: CCSDK-141 Signed-off-by: Dan Timoney --- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 2 +- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 4 ++-- pom.xml | 2 +- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 0f3a5ddd2..16f93591d 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT asdcApi-features diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 32f505053..03153fe63 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT asdcApi-installer asdcApi - Karaf Installer diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 3665e4fab..fc874b4c8 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,11 +5,11 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT bundle diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 0adc96e64..677d94ba2 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT pom org.onap.ccsdk.sli.northbound asdcApi - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index cb6872653..12240b388 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT asdcApi-provider bundle diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 9d140cb6e..7377ffc85 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -4,11 +4,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT jar diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 940144f53..fc44b8743 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -4,7 +4,7 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT dataChange-installer dataChange - Karaf Installer diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 5f7101cdc..939b218b0 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,11 +5,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT bundle diff --git a/dataChange/pom.xml b/dataChange/pom.xml index a5818a5d4..57aed1f09 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT pom org.onap.ccsdk.sli.northbound dataChange - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index f3e1f0fd4..d534e30e6 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -4,7 +4,7 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT dataChange-provider bundle diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 1cc4acc59..6746cdd89 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.sli.northbound jar dmaap-listener - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT DMAAP Listener DMAAP Listener org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT 1.1.7-SNAPSHOT diff --git a/pom.xml b/pom.xml index 073e779e0..9479abb51 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ AT&T - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 13af485df..8a83bb5da 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.sli.northbound jar ueb-listener - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT UEB Listener UEB Listener org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT 1.1.32 diff --git a/version.properties b/version.properties index 3d3e5b582..ef1134635 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=1 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 292cce64a1a610283306a5f2280c787d8edb916d Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 9 Nov 2017 15:18:24 -0500 Subject: Add dhcp event handler Add event handler for DHCP event Change-Id: I2e23ace8ae481bf100f236a4e2723d721eec3470 Issue-ID: CCSDK-142 Signed-off-by: Dan Timoney --- dmaap-listener/pom.xml | 9 +- .../dmaapclient/SdncDhcpEventConsumer.java | 136 +++++++++++++++++++++ .../dmaapclient/TestSdncDhcpEventConsumer.java | 130 ++++++++++++++++++++ dmaap-listener/src/test/resources/dblib.properties | 38 ++++++ 4 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java create mode 100644 dmaap-listener/src/test/resources/dblib.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6746cdd89..d1e173ca0 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -34,7 +34,7 @@ org.slf4j slf4j-api - 1.7.10 + 1.7.21 org.slf4j @@ -68,6 +68,13 @@ ${junit.version} test + + ch.vorburger.mariaDB4j + mariaDB4j + 2.2.3 + test + + org.onap.ccsdk.sli.core dblib-provider diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java new file mode 100644 index 000000000..666ed68e1 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java @@ -0,0 +1,136 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.sql.SQLException; +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; + +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; + +public class SdncDhcpEventConsumer extends SdncDmaapConsumer { + private static final Logger LOG = LoggerFactory.getLogger(SdncDhcpEventConsumer.class); + + private static final String MAC_ADDR_TAG = "macaddr"; + private static final String MSG_NAME_TAG = "msg_name"; + private static final String IP_ADDR_TAG = "yiaddr"; + + private static DBResourceManager jdbcDataSource = null; + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + + private class MissingDhcpAttributeException extends InvalidMessageException { + + public MissingDhcpAttributeException(String fieldName) { + super("Invalid DHCP event - missing " + fieldName + " attribute"); + } + } + + private static void setJdbcDataSource() throws IOException { + + String propPath; + String propDir = System.getenv(SDNC_CONFIG_DIR); + if (propDir == null) { + propDir = "/opt/onap/sdnc/data/properties"; + } + propPath = propDir + "/dblib.properties"; + File propFile = new File(propPath); + + if (!propFile.exists()) { + + throw new FileNotFoundException("Missing configuration properties file : " + propFile); + } + + Properties props = new Properties(); + props.load(new FileInputStream(propFile)); + + setJdbcDataSource(new DBResourceManager(props)); + + } + + static void setJdbcDataSource(DBResourceManager dbMgr) { + + jdbcDataSource = dbMgr; + + if (jdbcDataSource.isActive()) { + LOG.warn("DBLIB: JDBC DataSource has been initialized."); + } else { + LOG.warn("DBLIB: JDBC DataSource did not initialize successfully."); + } + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + + JsonNode dhcpRootNode; + String msgName; + String macAddr; + String ipAddr; + + try { + dhcpRootNode = oMapper.readTree(msg); + + } catch (IOException e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode msgNameNode = dhcpRootNode.get(MSG_NAME_TAG); + if (msgNameNode != null) { + msgName = msgNameNode.textValue(); + + } else { + throw new MissingDhcpAttributeException(MSG_NAME_TAG); + } + + JsonNode macAddrNode = dhcpRootNode.get(MAC_ADDR_TAG); + if (macAddrNode != null) { + macAddr = macAddrNode.textValue(); + + } else { + throw new MissingDhcpAttributeException(MAC_ADDR_TAG); + } + + JsonNode ipAddrNode = dhcpRootNode.get(IP_ADDR_TAG); + if (ipAddrNode != null) { + ipAddr = ipAddrNode.textValue(); + + } else { + throw new MissingDhcpAttributeException(IP_ADDR_TAG); + } + + LOG.debug("Got DHCP event : msg name {}; mac addr {}; ip addr {}", msgName, macAddr, ipAddr); + + if (jdbcDataSource == null) { + try { + setJdbcDataSource(); + } catch (IOException e) { + LOG.error("Could not create JDBC connection", e); + return; + } + } + + try { + + jdbcDataSource.writeData("INSERT INTO DHCP_MAP(mac_addr, ip_addr) VALUES('" + macAddr + "','" + ipAddr + "')", + null, null); + + } catch (SQLException e) { + LOG.error("Could not insert DHCP event data into the database ", e); + } + + } + +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java new file mode 100644 index 000000000..8c3a839c2 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java @@ -0,0 +1,130 @@ +/** + * + */ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.*; + +import java.io.InputStream; +import java.net.URL; +import java.sql.SQLException; +import java.util.Properties; + +import javax.sql.rowset.CachedRowSet; + +import org.junit.After; +import org.junit.BeforeClass; +import org.junit.Test; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import ch.vorburger.mariadb4j.DB; +import ch.vorburger.mariadb4j.DBConfigurationBuilder; + +/** + * @author dt5972 + * + */ +public class TestSdncDhcpEventConsumer { + + private static final Logger LOG = LoggerFactory.getLogger(TestSdncDhcpEventConsumer.class); + + + private static final String DHCP_MAP_TABLE = "CREATE TABLE `DHCP_MAP` (\n" + + " mac_addr varchar(80) NOT NULL,\n" + + " ip_addr varchar(80),\n" + + " PRIMARY KEY(`mac_addr`)\n" + + ")"; + + + + private static final String VALID_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + + "\"macaddr\":\"fa:16:3e:8f:ea:68\"," + + "\"yiaddr\":\"10.3.0.2\"}"; + private static final String MISSING_MSG_NAME_DHCP_EVENT = "{\"macaddr\":\"fa:16:3e:8f:ea:68\"," + + "\"yiaddr\":\"10.3.0.2\"}"; + private static final String MISSING_MAC_ADDR_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + + "\"yiaddr\":\"10.3.0.2\"}"; + private static final String MISSING_IP_ADDR_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + + "\"macaddr\":\"fa:16:3e:8f:ea:68\"}"; + + private static final String GET_DHCP_MAPPING = "SELECT * FROM DHCP_MAP WHERE mac_addr = 'fa:16:3e:8f:ea:68'"; + + + private static DBResourceManager dblibSvc; + private static DB db; + + private static SdncDhcpEventConsumer consumer; + + /** + * @throws java.lang.Exception + */ + @BeforeClass + public static void setUpBeforeClass() throws Exception { + + LOG.debug("Setting up DHCP event testing"); + + InputStream propStr = TestSdncDhcpEventConsumer.class.getResourceAsStream("/dblib.properties"); + + Properties props = new Properties(); + + props.load(propStr); + + + // Start MariaDB4j database + + LOG.debug("Starting MariaDB instance"); + DBConfigurationBuilder config = DBConfigurationBuilder.newBuilder(); + config.setPort(0); // 0 => autom. detect free port + db = DB.newEmbeddedDB(config.build()); + db.start(); + + + // Override jdbc URL and database name + props.setProperty("org.onap.ccsdk.sli.jdbc.database", "test"); + props.setProperty("org.onap.ccsdk.sli.jdbc.url", config.getURL("test")); + + + // Create dblib connection + + LOG.debug("Getting DBResourceManager instance"); + dblibSvc = new DBResourceManager(props); + + // Create DHCP_MAP table + dblibSvc.writeData(DHCP_MAP_TABLE, null, null); + + consumer = new SdncDhcpEventConsumer(); + consumer.setJdbcDataSource(dblibSvc); + LOG.debug("Setup complete"); + + } + + + @Test + public void testValid() throws InvalidMessageException, SQLException { + consumer.processMsg(VALID_DHCP_EVENT); + + CachedRowSet results = dblibSvc.getData(GET_DHCP_MAPPING, null, null); + + if (!results.next()) { + fail("Test query ["+GET_DHCP_MAPPING+"] returned no data"); + } + + } + + @Test (expected = InvalidMessageException.class) + public void testMissingMsgName() throws InvalidMessageException { + consumer.processMsg(MISSING_MSG_NAME_DHCP_EVENT); + } + + @Test (expected = InvalidMessageException.class) + public void testMissingMacAddress() throws InvalidMessageException { + consumer.processMsg(MISSING_MAC_ADDR_DHCP_EVENT); + } + + @Test (expected = InvalidMessageException.class) + public void testMissingIpAddress() throws InvalidMessageException { + consumer.processMsg(MISSING_IP_ADDR_DHCP_EVENT); + } +} diff --git a/dmaap-listener/src/test/resources/dblib.properties b/dmaap-listener/src/test/resources/dblib.properties new file mode 100644 index 000000000..9506ac8d1 --- /dev/null +++ b/dmaap-listener/src/test/resources/dblib.properties @@ -0,0 +1,38 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +# dblib.properrties +org.onap.ccsdk.sli.dbtype=jdbc + +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 +org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl +org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver +org.onap.ccsdk.sli.jdbc.database=sdnctl +org.onap.ccsdk.sli.jdbc.user=sdnctl +org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 +org.onap.dblib.connection.recovery=false + -- cgit 1.2.3-korg From 024e6d1689ee38b37ac054636557b5dff8f26270 Mon Sep 17 00:00:00 2001 From: Brian Freeman Date: Sun, 12 Nov 2017 22:34:34 +0000 Subject: Change dmaapClient dependency Issue-ID: CCSDK-142 Change-Id: I5a3cd0626c71eadd414ab9939774d159638b99a6 Signed-off-by: Brian Freeman --- dmaap-listener/pom.xml | 20 ++++++++++++++++---- .../northbound/dmaapclient/SdncDmaapConsumer.java | 10 ++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index d1e173ca0..0ebde6ced 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -18,7 +18,8 @@ 2.9.0.pr1 true /opt/app/dmaap-listener - 0.2.12 + 1.0.0-SNAPSHOT + yyMMdd-HHmmss ${maven.build.timestamp} ${project.version}-${build.number} @@ -27,7 +28,7 @@ - com.att.nsa + org.onap.dmaap.messagerouter.dmaapclient dmaapClient ${dmaap.listener.version} @@ -97,8 +98,19 @@ 1.7 - - + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + true + org.onap.ccsdk.sli.northbound.dmaapclient.DmaapListener + + + + maven-assembly-plugin 2.6 diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index a0c555303..a51ea7c88 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -71,19 +71,25 @@ public abstract class SdncDmaapConsumer implements Runnable { try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { + LOG.debug("propertiesPath: " + propertiesPath); this.properties = (Properties) properties.clone(); this.properties.load(in); - String timeoutStr = properties.getProperty("timeout"); + + String timeoutStr = this.properties.getProperty("timeout"); + LOG.debug("timeoutStr: " + timeoutStr); if ((timeoutStr != null) && (timeoutStr.length() > 0)) { timeout = parseTimeOutValue(timeoutStr); } - String fetchPauseStr = properties.getProperty("fetchPause"); + String fetchPauseStr = this.properties.getProperty("fetchPause"); + LOG.debug("fetchPause(Str): " + fetchPauseStr); if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { fetchPause = parseFetchPause(fetchPauseStr); } + LOG.debug("fetchPause: " + fetchPause); + this.consumer = MRClientFactory.createConsumer(propertiesPath); ready = true; -- cgit 1.2.3-korg From 32a9ecade35bc3e742dfbc9e86d887f25b5f49c9 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Mon, 13 Nov 2017 10:04:11 -0500 Subject: Handle duplicate DHCP event Handle case where 2 DHCP events received for same mac addr. Should use most recent IP address. Change-Id: I90399ce3c39e07c2472366c78115812a64e9124b Issue-ID: CCSDK-142 Signed-off-by: Dan Timoney --- .../ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java | 3 +-- .../sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java index 666ed68e1..03560d309 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java @@ -124,8 +124,7 @@ public class SdncDhcpEventConsumer extends SdncDmaapConsumer { try { - jdbcDataSource.writeData("INSERT INTO DHCP_MAP(mac_addr, ip_addr) VALUES('" + macAddr + "','" + ipAddr + "')", - null, null); + jdbcDataSource.writeData("INSERT INTO DHCP_MAP(mac_addr, ip_addr) VALUES('" + macAddr + "','" + ipAddr + "') ON DUPLICATE KEY UPDATE ip_addr = '"+ipAddr+"'", null, null); } catch (SQLException e) { LOG.error("Could not insert DHCP event data into the database ", e); diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java index 8c3a839c2..04f098ade 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncDhcpEventConsumer.java @@ -42,6 +42,9 @@ public class TestSdncDhcpEventConsumer { private static final String VALID_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + "\"macaddr\":\"fa:16:3e:8f:ea:68\"," + "\"yiaddr\":\"10.3.0.2\"}"; + private static final String SECOND_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + + "\"macaddr\":\"fa:16:3e:8f:ea:68\"," + + "\"yiaddr\":\"10.3.0.3\"}"; private static final String MISSING_MSG_NAME_DHCP_EVENT = "{\"macaddr\":\"fa:16:3e:8f:ea:68\"," + "\"yiaddr\":\"10.3.0.2\"}"; private static final String MISSING_MAC_ADDR_DHCP_EVENT = "{\"msg_name\":\"DHCPACK\"," + @@ -104,11 +107,17 @@ public class TestSdncDhcpEventConsumer { @Test public void testValid() throws InvalidMessageException, SQLException { consumer.processMsg(VALID_DHCP_EVENT); + consumer.processMsg(SECOND_DHCP_EVENT); CachedRowSet results = dblibSvc.getData(GET_DHCP_MAPPING, null, null); if (!results.next()) { fail("Test query ["+GET_DHCP_MAPPING+"] returned no data"); + } else { + String ipAddr = results.getString("ip_addr"); + if (!"10.3.0.3".equals(ipAddr)) { + fail("Expecting ipAddr to be 10.3.0.3, but was "+ipAddr); + } } } -- cgit 1.2.3-korg From e4273428d8af86850e97da84a1bbaaffb06269ff Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Fri, 17 Nov 2017 16:56:52 -0800 Subject: Bump minor version Bump minor version in preparation for Amsterdam branching. (part 2) Change-Id: If8259634fe96f9a78cf59a9346dd051cc674e6c3 Issue-ID: CIMAN-120 Signed-off-by: Jessica Wagantall --- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 2 +- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 6 +++--- pom.xml | 2 +- ueb-listener/pom.xml | 4 ++-- 13 files changed, 21 insertions(+), 21 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 16f93591d..73cc0dd12 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT asdcApi-features diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 03153fe63..1b7666935 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT asdcApi-installer asdcApi - Karaf Installer diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index fc874b4c8..a3b94f54f 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,11 +5,11 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT bundle diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 677d94ba2..932569b09 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT pom org.onap.ccsdk.sli.northbound asdcApi - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 12240b388..9382b9d8a 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -4,7 +4,7 @@ asdcApi org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT asdcApi-provider bundle diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 7377ffc85..93dbd0554 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -4,11 +4,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT jar diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index fc44b8743..31623ba13 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -4,7 +4,7 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT dataChange-installer dataChange - Karaf Installer diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 939b218b0..c3d6d6b5c 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,11 +5,11 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT bundle diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 57aed1f09..f0bbf6eb3 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT pom org.onap.ccsdk.sli.northbound dataChange - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index d534e30e6..7d35817ef 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -4,7 +4,7 @@ dataChange org.onap.ccsdk.sli.northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT dataChange-provider bundle diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 0ebde6ced..d9f4084f4 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -4,17 +4,17 @@ org.onap.ccsdk.sli.northbound jar dmaap-listener - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT DMAAP Listener DMAAP Listener org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT - 1.1.7-SNAPSHOT + 1.2.0-SNAPSHOT 2.9.0.pr1 true /opt/app/dmaap-listener diff --git a/pom.xml b/pom.xml index 9479abb51..ded5f124b 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ AT&T - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 8a83bb5da..21173680a 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.sli.northbound jar ueb-listener - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT UEB Listener UEB Listener org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 0.1.1-SNAPSHOT + 0.2.0-SNAPSHOT 1.1.32 -- cgit 1.2.3-korg From 0bf3682de79e4274566b37a941eef609d26559c2 Mon Sep 17 00:00:00 2001 From: "ramu.n" Date: Wed, 13 Dec 2017 19:01:16 +0530 Subject: Fix dmaapClient version Fix org.onap.dmaap.messagerouter.dmaapClinet:dmappClient.jar version Change-Id: I5bbf068b21eb3563195c55b0156f2ff401873e45 Issue-ID: CCSDK-154 Signed-off-by: Ramu N --- dmaap-listener/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index d9f4084f4..8705ff1aa 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -18,7 +18,7 @@ 2.9.0.pr1 true /opt/app/dmaap-listener - 1.0.0-SNAPSHOT + 1.1.0-SNAPSHOT yyMMdd-HHmmss ${maven.build.timestamp} -- cgit 1.2.3-korg From 613f3941a43afa5347c5df6e6e764869d0475973 Mon Sep 17 00:00:00 2001 From: root1 Date: Tue, 19 Dec 2017 20:28:25 +0530 Subject: Removal of useless parenthesis Change-Id: I6ef27a2795e91948b996055decffc051373d6113 Issue-ID: CCSDK-151 Signed-off-by: SRINIVAS V --- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 1d499a1e7..231fa0e4f 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -140,7 +140,7 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { if (!mapFile.canRead()) { LOG.error(String.format("Cannot read map file (%s)", mapFilename)); - return (null); + return null; } try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { @@ -160,9 +160,9 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { mapReader.close(); } catch (Exception e) { LOG.error("Caught exception reading map " + mapFilename, e); - return (null); + return null; } - return (results); + return results; } } -- cgit 1.2.3-korg From 0d27d85eb387bd56b1f8dab34a9381bcc20db7d5 Mon Sep 17 00:00:00 2001 From: root1 Date: Tue, 19 Dec 2017 19:02:44 +0530 Subject: Fixed as per Java Code Conventions Change-Id: Ib17c601ad6a2999e4396f84e18831b5f907557eb Issue-ID: CCSDK-151 Signed-off-by: SRINIVAS V --- .../sli/northbound/dmaapclient/SdncDmaapConsumer.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index a51ea7c88..ed71337a3 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -44,15 +44,6 @@ public abstract class SdncDmaapConsumer implements Runnable { private int fetchPause = 5000; // Default pause between fetch - 5 seconds private int timeout = 15000; // Default timeout - 15 seconds - public boolean isReady() { - return ready; - } - - - public boolean isRunning() { - return running; - } - public SdncDmaapConsumer() { } @@ -61,8 +52,16 @@ public abstract class SdncDmaapConsumer implements Runnable { init(properties, propertiesPath); } + public boolean isReady() { + return ready; + } + + public boolean isRunning() { + return running; + } + public String getProperty(String name) { - return (properties.getProperty(name, "")); + return properties.getProperty(name, ""); } public void init(Properties properties, String propertiesPath) { -- cgit 1.2.3-korg From 263950413073f5d1d7af3d2854052af8ec41d281 Mon Sep 17 00:00:00 2001 From: "prakash.e" Date: Thu, 21 Dec 2017 16:52:36 +0530 Subject: Removal of unused private field Change-Id: Ie2d33f7f9dba20a4d0fdf6a33f8574e953633a69 Issue-ID: CCSDK-151 Signed-off-by: prakash.e --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java | 5 +---- .../ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index a51ea7c88..a9f5fedad 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -35,7 +35,6 @@ public abstract class SdncDmaapConsumer implements Runnable { private static final Logger LOG = LoggerFactory .getLogger(SdncDmaapConsumer.class); - private String propertiesPath = ""; private Properties properties = null; private MRConsumer consumer = null; private MRConsumerResponse consumerResponse = null; @@ -62,13 +61,11 @@ public abstract class SdncDmaapConsumer implements Runnable { } public String getProperty(String name) { - return (properties.getProperty(name, "")); + return properties.getProperty(name, ""); } public void init(Properties properties, String propertiesPath) { - this.propertiesPath = propertiesPath; - try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { LOG.debug("propertiesPath: " + propertiesPath); diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 1d499a1e7..ce65e783e 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -124,6 +124,8 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { private Map loadMap(String msgType, String mapDirName) { Map results = new HashMap<>(); + String dirName = mapDirName; + if (mapDirName == null) { String rootdir = System.getenv(DMAAPLISTENERROOT); @@ -131,10 +133,10 @@ public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { rootdir = "/opt/app/dmaap-listener"; } - mapDirName = rootdir + "/lib"; + dirName = rootdir + "/lib"; } - String mapFilename = mapDirName + "/" + msgType + ".map"; + String mapFilename = dirName + "/" + msgType + ".map"; File mapFile = new File(mapFilename); -- cgit 1.2.3-korg From d43a8024c63c3c2b9c9882ec9ce3d05d20e3e8d0 Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Tue, 16 Jan 2018 18:53:23 +0530 Subject: Fixed DmaapListener multiple consumer thread issue DmaapListener handleSubscriptions method returns after creating consumer thread for first subscription string, issue is fixed by removing return. https://jira.onap.org/browse/CCSDK-173 Issue-ID: CCSDK-173 Change-Id: I796b000b22762cda0a4f4fa929d5e2aabdcc7e8b Signed-off-by: shashikanth.vh --- .../java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index ce099cd64..2be08cb8b 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -142,11 +142,11 @@ public class DmaapListener { } if (consumerClass != null) { - return handleConsumerClass(consumerClass, consumerClassName, propertyPath, + handleConsumerClass(consumerClass, consumerClassName, propertyPath, properties, consumers); } } - return false; + return !consumers.isEmpty(); } private static boolean handleConsumerClass(Class consumerClass, String consumerClassName, String propertyPath, -- cgit 1.2.3-korg From 10b6a72f544dd1331e9dba53e77c61deaafbd19f Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 22 Feb 2018 17:22:31 -0600 Subject: Nitrogen port: sli/northbound Update sli/northbound to compile for ODL Nitrogen Change-Id: Ib14fea5dd3922175bd183afb9f3c85edaa7a2f0c Issue-ID: CCSDK-177 Signed-off-by: Dan Timoney --- asdcApi/features/ccsdk-asdcApi/pom.xml | 47 ++++ asdcApi/features/features-asdcApi/pom.xml | 29 +++ asdcApi/features/pom.xml | 150 ++---------- asdcApi/features/src/main/resources/features.xml | 38 --- asdcApi/installer/pom.xml | 32 ++- .../src/main/resources/scripts/install-feature.sh | 9 +- asdcApi/model/pom.xml | 84 +------ asdcApi/pom.xml | 48 +--- asdcApi/provider/pom.xml | 46 ++-- .../sli/northbound/asdcapi/TestAsdcApiApi.java | 9 +- dataChange/features/ccsdk-dataChange/pom.xml | 47 ++++ dataChange/features/features-dataChange/pom.xml | 29 +++ dataChange/features/pom.xml | 150 ++---------- .../features/src/main/resources/features.xml | 36 --- dataChange/installer/pom.xml | 264 +++++++++++---------- .../src/main/resources/scripts/install-feature.sh | 9 +- dataChange/model/pom.xml | 84 +------ dataChange/pom.xml | 46 +--- dataChange/provider/pom.xml | 177 ++++++-------- .../src/main/yang/DataChange-provider-impl.yang | 65 ----- dmaap-listener/pom.xml | 254 ++++++++++---------- pom.xml | 22 +- ueb-listener/pom.xml | 25 +- version.properties | 2 +- 24 files changed, 656 insertions(+), 1046 deletions(-) create mode 100644 asdcApi/features/ccsdk-asdcApi/pom.xml create mode 100644 asdcApi/features/features-asdcApi/pom.xml delete mode 100644 asdcApi/features/src/main/resources/features.xml create mode 100644 dataChange/features/ccsdk-dataChange/pom.xml create mode 100644 dataChange/features/features-dataChange/pom.xml delete mode 100644 dataChange/features/src/main/resources/features.xml delete mode 100755 dataChange/provider/src/main/yang/DataChange-provider-impl.yang (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml new file mode 100644 index 000000000..061e5edc8 --- /dev/null +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + ccsdk-asdcApi + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + + + + org.opendaylight.controller + odl-mdsal-broker + xml + features + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + asdcApi-model + ${project.version} + + + ${project.groupId} + asdcApi-provider + ${project.version} + + + + diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml new file mode 100644 index 000000000..2ac8f59d8 --- /dev/null +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + feature-repo-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + features-asdcApi + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + + + ${project.groupId} + ccsdk-asdcApi + ${project.version} + xml + features + + + + diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 73cc0dd12..5b940021c 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -1,131 +1,23 @@ - - 4.0.0 - - asdcApi - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT - - asdcApi-features - - jar - - - - org.onap.ccsdk.sli.northbound - asdcApi-model - ${project.version} - - - org.onap.ccsdk.sli.northbound - asdcApi-provider - ${project.version} - - - - org.opendaylight.mdsal - features-mdsal - ${odl.mdsal.features.version} - features - xml - - - runtime - - - - - - - org.opendaylight.controller - opendaylight-karaf-empty - ${odl.karaf.empty.distro.version} - zip - - - - - - org.opendaylight.odlparent - features-test - test - ${odl.commons.opendaylight.version} - - - - org.opendaylight.yangtools - features-yangtools - ${odl.yangtools.version} - features - xml - runtime - - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - - resources - - generate-resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/${features.file} - xml - features - - - - - - - - + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + + org.onap.ccsdk.sli.northbound + asdcApi-features + 0.2.1-SNAPSHOT + pom + + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + + ccsdk-asdcApi + features-asdcApi + diff --git a/asdcApi/features/src/main/resources/features.xml b/asdcApi/features/src/main/resources/features.xml deleted file mode 100644 index 0f7fe3b8d..000000000 --- a/asdcApi/features/src/main/resources/features.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - - odl-mdsal-broker - - mvn:org.onap.ccsdk.sli.northbound/asdcApi-model/${project.version} - mvn:org.onap.ccsdk.sli.northbound/asdcApi-provider/${project.version} - - sdnc-sli - - - diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 1b7666935..aac236bde 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -1,19 +1,25 @@ 4.0.0 + - asdcApi - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + + org.onap.ccsdk.sli.northbound asdcApi-installer - asdcApi - Karaf Installer + 0.2.1-SNAPSHOT pom + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + - sdnc-asdcApi - sdnc-asdcApi - mvn:org.onap.ccsdk.sli.northbound/asdcApi-features/${project.version}/xml/features + ccsdk-asdcApi + ${application.name} + mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features false @@ -21,10 +27,10 @@ org.onap.ccsdk.sli.northbound - asdcApi-features + ${application.name} ${project.version} - features xml + features * @@ -32,7 +38,11 @@ - + + org.onap.ccsdk.sli.northbound + asdcApi-model + ${project.version} + org.onap.ccsdk.sli.northbound asdcApi-provider @@ -100,7 +110,6 @@ false false org.onap.ccsdk.sli.northbound - sli-common,sli-provider,dblib-provider provided @@ -135,5 +144,4 @@ - diff --git a/asdcApi/installer/src/main/resources/scripts/install-feature.sh b/asdcApi/installer/src/main/resources/scripts/install-feature.sh index e986764b9..cee4a4952 100644 --- a/asdcApi/installer/src/main/resources/scripts/install-feature.sh +++ b/asdcApi/installer/src/main/resources/scripts/install-feature.sh @@ -10,9 +10,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,6 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} -ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"} INSTALLERDIR=$(dirname $0) REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip @@ -36,5 +35,5 @@ else exit 1 fi -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} +${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} feature:install ${features.boot} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index a3b94f54f..27e5905b9 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -1,92 +1,32 @@ - + 4.0.0 + - asdcApi - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + binding-parent + 1.0.1-SNAPSHOT + + org.onap.ccsdk.sli.northbound asdcApi-model - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT bundle - + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - - - org.apache.felix - maven-bundle-plugin - true - - - * - - - - - org.opendaylight.yangtools - yang-maven-plugin - ${odl.yangtools.yang.maven.plugin.version} - - - org.opendaylight.mdsal - maven-sal-api-gen-plugin - ${odl.sal.api.gen.plugin.version} - jar - - - org.opendaylight.netconf - sal-rest-docgen-maven - ${odl.restconf.version} - jar - - - - - - generate-sources - - - ${yang.file.directory} - - - org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl - ${salGeneratorPath} - - - org.opendaylight.netconf.sal.rest.doc.maven.StaticDocGenerator - target/swagger - - - true - - - - - - - - org.opendaylight.mdsal - yang-binding - ${odl.mdsal.yang.binding.version} - - - org.opendaylight.yangtools - yang-common - ${odl.yangtools.version} - + org.opendaylight.mdsal.model ietf-inet-types - ${odl.ietf-inet-types.version} org.opendaylight.mdsal.model ietf-yang-types - ${odl.ietf-yang-types.version} + + diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 932569b09..78c2fcb6b 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -1,51 +1,20 @@ - + 4.0.0 - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + - pom org.onap.ccsdk.sli.northbound asdcApi - 0.2.0-SNAPSHOT - - - asdcApi - - - - - - - org.onap.ccsdk.sli.northbound - asdcApi-features - features - xml - ${project.version} - - - - org.onap.ccsdk.sli.northbound - asdcApi-model - ${project.version} - - - - org.onap.ccsdk.sli.northbound - asdcApi-provider - ${project.version} - - - - - - - + 0.2.1-SNAPSHOT + pom + ccsdk-sli-northbound :: asdcApi model @@ -54,4 +23,5 @@ installer + diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 9382b9d8a..3f33af028 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -1,23 +1,22 @@ - + 4.0.0 + - asdcApi - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + binding-parent + 1.0.1-SNAPSHOT + + + org.onap.ccsdk.sli.northbound asdcApi-provider + 0.2.1-SNAPSHOT bundle - - - - org.apache.felix - maven-bundle-plugin - true - - - + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + @@ -25,60 +24,49 @@ asdcApi-model ${project.version} - - org.opendaylight.controller - config-api - ${odl.controller.config.api.version} - org.opendaylight.controller sal-binding-config - ${odl.mdsal.version} + org.opendaylight.controller sal-binding-api - ${odl.mdsal.version} + org.opendaylight.controller sal-common-util - ${odl.mdsal.version} + org.onap.ccsdk.sli.core sli-common - ${sdnctl.sli.version} org.onap.ccsdk.sli.core sli-provider - ${sdnctl.sli.version} org.opendaylight.controller sal-test-model - ${odl.mdsal.version} test org.opendaylight.netconf sal-rest-connector - ${odl.mdsal.version} test org.opendaylight.controller sal-binding-broker-impl - ${odl.mdsal.version} test org.opendaylight.controller sal-binding-broker-impl - ${odl.mdsal.version} test-jar tests test @@ -86,21 +74,19 @@ junit junit - ${junit.version} test org.testng testng - 6.11 test org.mockito mockito-core - ${mockito.version} test + diff --git a/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/TestAsdcApiApi.java b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/TestAsdcApiApi.java index f65bbc045..6ad9a829f 100644 --- a/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/TestAsdcApiApi.java +++ b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/TestAsdcApiApi.java @@ -21,10 +21,12 @@ package org.onap.ccsdk.sli.northbound.asdcapi; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.mock; import org.junit.Before; import org.junit.Test; -import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiProvider; -import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiSliClient; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.controller.md.sal.binding.test.AbstractConcurrentDataBrokerTest; @@ -35,9 +37,6 @@ import org.opendaylight.yangtools.yang.common.RpcResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.junit.Assert.*; -import static org.mockito.Mockito.mock; - public class TestAsdcApiApi extends AbstractConcurrentDataBrokerTest { private AsdcApiProvider asdcApiProvider; diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml new file mode 100644 index 000000000..5d38e33c2 --- /dev/null +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + ccsdk-dataChange + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + + + + org.opendaylight.controller + odl-mdsal-broker + xml + features + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + dataChange-model + ${project.version} + + + ${project.groupId} + dataChange-provider + ${project.version} + + + + diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml new file mode 100644 index 000000000..470f95bde --- /dev/null +++ b/dataChange/features/features-dataChange/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + feature-repo-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + features-dataChange + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + + + ${project.groupId} + ccsdk-dataChange + ${project.version} + xml + features + + + + diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 93dbd0554..c32e72ce7 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -1,130 +1,24 @@ - - 4.0.0 - - dataChange - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT - - org.onap.ccsdk.sli.northbound - dataChange-features - 0.2.0-SNAPSHOT - - jar - - - - org.onap.ccsdk.sli.northbound - dataChange-model - - - org.onap.ccsdk.sli.northbound - dataChange-provider - - - - org.opendaylight.mdsal - features-mdsal - features - ${odl.mdsal.features.version} - xml - - runtime - - - - - - - org.opendaylight.controller - opendaylight-karaf-empty - ${odl.karaf.empty.distro.version} - zip - - - - - - org.opendaylight.odlparent - features-test - test - ${odl.commons.opendaylight.version} - - - - org.opendaylight.yangtools - features-yangtools - ${odl.yangtools.version} - features - xml - runtime - - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - - resources - - generate-resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/${features.file} - xml - features - - - - - - - - + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + dataChange-features + 0.2.1-SNAPSHOT + pom + + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + + ccsdk-dataChange + features-dataChange + diff --git a/dataChange/features/src/main/resources/features.xml b/dataChange/features/src/main/resources/features.xml deleted file mode 100644 index bd090f1cc..000000000 --- a/dataChange/features/src/main/resources/features.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - - odl-mdsal-broker - sdnc-sli - mvn:org.onap.ccsdk.sli.northbound/dataChange-model/${project.version} - mvn:org.onap.ccsdk.sli.northbound/dataChange-provider/${project.version} - - - diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 31623ba13..f67669931 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -1,139 +1,149 @@ - - 4.0.0 - - dataChange - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT - - dataChange-installer - dataChange - Karaf Installer - pom + + 4.0.0 - - sdnc-dataChange - sdnc-dataChange - mvn:org.onap.ccsdk.sli.northbound/dataChange-features/${project.version}/xml/features - false - + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + - + org.onap.ccsdk.sli.northbound + dataChange-installer + 0.2.1-SNAPSHOT + pom - - org.onap.ccsdk.sli.northbound - dataChange-features - ${project.version} - features - xml - - - * - * - - - + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - - org.onap.ccsdk.sli.northbound - dataChange-provider - ${project.version} - + + ccsdk-dataChange + ${application.name} + mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features + false + + - + + org.onap.ccsdk.sli.northbound + ${application.name} + ${project.version} + xml + features + + + * + * + + + + + org.onap.ccsdk.sli.northbound + dataChange-model + ${project.version} + - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - false - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - false - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.onap.ccsdk.sli.northbound - sli-common,sli-provider,dblib-provider - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + + org.onap.ccsdk.sli.northbound + dataChange-provider + ${project.version} + - - - - + + + + + maven-assembly-plugin + 2.6 + + + maven-repo-zip + + single + + package + + false + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + false + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.northbound + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + + + + + + + diff --git a/dataChange/installer/src/main/resources/scripts/install-feature.sh b/dataChange/installer/src/main/resources/scripts/install-feature.sh index e986764b9..cee4a4952 100644 --- a/dataChange/installer/src/main/resources/scripts/install-feature.sh +++ b/dataChange/installer/src/main/resources/scripts/install-feature.sh @@ -10,9 +10,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,6 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} -ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"} INSTALLERDIR=$(dirname $0) REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip @@ -36,5 +35,5 @@ else exit 1 fi -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} +${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} feature:install ${features.boot} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index c3d6d6b5c..2b3851690 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -1,93 +1,31 @@ - + 4.0.0 + - dataChange - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + binding-parent + 1.0.1-SNAPSHOT + + org.onap.ccsdk.sli.northbound dataChange-model - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - * - - - - - org.opendaylight.yangtools - yang-maven-plugin - ${odl.yangtools.yang.maven.plugin.version} - - - org.opendaylight.mdsal - maven-sal-api-gen-plugin - ${odl.sal.api.gen.plugin.version} - jar - - - org.opendaylight.netconf - sal-rest-docgen-maven - ${odl.restconf.version} - jar - - - - - - generate-sources - - - ${yang.file.directory} - - - org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl - ${salGeneratorPath} - - - org.opendaylight.netconf.sal.rest.doc.maven.StaticDocGenerator - target/swagger - - - true - - - - - - + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - - org.opendaylight.mdsal - yang-binding - ${odl.mdsal.yang.binding.version} - - - org.opendaylight.yangtools - yang-common - ${odl.yangtools.version} - org.opendaylight.mdsal.model ietf-inet-types - ${odl.ietf-inet-types.version} org.opendaylight.mdsal.model ietf-yang-types - ${odl.ietf-yang-types.version} + + diff --git a/dataChange/pom.xml b/dataChange/pom.xml index f0bbf6eb3..cd1cd9683 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -1,52 +1,26 @@ - + 4.0.0 - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + - pom org.onap.ccsdk.sli.northbound dataChange - 0.2.0-SNAPSHOT - - - dataChange - - - - - - - org.onap.ccsdk.sli.northbound - dataChange-features - features - xml - ${project.version} - - - - org.onap.ccsdk.sli.northbound - dataChange-model - ${project.version} - - - org.onap.ccsdk.sli.northbound - dataChange-provider - ${project.version} - - - + 0.2.1-SNAPSHOT + pom - + ccsdk-sli-northbound :: dataChange - + model features provider installer + diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 7d35817ef..1722912ce 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -1,105 +1,86 @@ - - 4.0.0 - - dataChange - org.onap.ccsdk.sli.northbound - 0.2.0-SNAPSHOT - - dataChange-provider - bundle + + 4.0.0 - - - - org.apache.felix - maven-bundle-plugin - true - - - + + org.onap.ccsdk.parent + binding-parent + 1.0.1-SNAPSHOT + + - - - org.onap.ccsdk.sli.northbound - dataChange-model - - - org.opendaylight.controller - config-api + org.onap.ccsdk.sli.northbound + dataChange-provider + 0.2.1-SNAPSHOT + bundle - ${odl.controller.config.api.version} - - - org.opendaylight.controller - sal-binding-config - ${odl.mdsal.version} - - - org.opendaylight.controller - sal-binding-api - ${odl.mdsal.version} - - - org.opendaylight.controller - sal-common-util - ${odl.mdsal.version} - - - org.onap.ccsdk.sli.core - sli-common - ${sdnctl.sli.version} - - - org.onap.ccsdk.sli.core - sli-provider - ${sdnctl.sli.version} - + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + + + org.onap.ccsdk.sli.northbound + dataChange-model + ${project.version} + + + org.opendaylight.controller + sal-binding-config + + + + org.opendaylight.controller + sal-binding-api + + + org.onap.ccsdk.sli.core + sli-common + + + org.onap.ccsdk.sli.core + sli-provider + + + + org.opendaylight.controller + sal-test-model + test + + + org.opendaylight.netconf + sal-rest-connector + test + + + + org.opendaylight.controller + sal-binding-broker-impl + test + + + org.opendaylight.controller + sal-binding-broker-impl + test-jar + tests + test + + + junit + junit + test + + + org.testng + testng + 6.11 + test + + + org.mockito + mockito-core + test + + - - org.opendaylight.controller - sal-test-model - ${odl.mdsal.version} - test - - - org.opendaylight.netconf - sal-rest-connector - ${odl.mdsal.version} - test - - - org.opendaylight.controller - sal-binding-broker-impl - ${odl.mdsal.version} - test - - - org.opendaylight.controller - sal-binding-broker-impl - ${odl.mdsal.version} - test-jar - tests - test - - - junit - junit - ${junit.version} - test - - - org.testng - testng - 6.11 - test - - - org.mockito - mockito-core - ${mockito.version} - test - - diff --git a/dataChange/provider/src/main/yang/DataChange-provider-impl.yang b/dataChange/provider/src/main/yang/DataChange-provider-impl.yang deleted file mode 100755 index f7ca378b6..000000000 --- a/dataChange/provider/src/main/yang/DataChange-provider-impl.yang +++ /dev/null @@ -1,65 +0,0 @@ -module DataChange-provider-impl { - - yang-version 1; - namespace "org:onap:ccsdk:sli:northbound:datachange:provider:impl"; - prefix "DataChange-provider-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; } - import opendaylight-sal-binding-broker-impl { - prefix binding-impl; - revision-date 2013-10-28; - } - - description - "This module contains the base YANG definitions for - DataChange-provider impl implementation."; - - revision "2014-05-23" { - description - "Initial revision."; - } - - // This is the definition of the service implementation as a module identity. - identity DataChange-provider-impl { - base config:module-type; - - // Specifies the prefix for generated java classes. - config:java-name-prefix DataChangeProvider; - } - - // Augments the 'configuration' choice node under modules/module. - // We consume the three main services, RPCs, DataStore, and Notifications - augment "/config:modules/config:module/config:configuration" { - case DataChange-provider-impl { - when "/config:modules/config:module/config:type = 'DataChange-provider-impl'"; - - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-rpc-registry; - } - } - } - - container notification-publish-adapter { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-impl:binding-new-notification-publish-service; - } - } - } - - container data-broker { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity mdsal:binding-async-data-broker; - } - } - } - } - } -} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 8705ff1aa..f6d04e247 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -1,140 +1,144 @@ - - 4.0.0 - org.onap.ccsdk.sli.northbound - jar - dmaap-listener - 0.2.0-SNAPSHOT + + 4.0.0 - DMAAP Listener - DMAAP Listener - - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound - 0.2.0-SNAPSHOT - - - 1.2.0-SNAPSHOT - 2.9.0.pr1 - true - /opt/app/dmaap-listener - 1.1.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + - yyMMdd-HHmmss - ${maven.build.timestamp} - ${project.version}-${build.number} - + org.onap.ccsdk.sli.northbound + dmaap-listener + 0.2.1-SNAPSHOT + jar - + ccsdk-sli-northbound :: dmaap-listener + DMAAP Listener - - org.onap.dmaap.messagerouter.dmaapclient - dmaapClient - ${dmaap.listener.version} - - - org.slf4j - slf4j-api - 1.7.21 - - - org.slf4j - slf4j-log4j12 - 1.6.1 - compile - - - log4j - log4j - 1.2.17 - - - com.fasterxml.jackson.core - jackson-core - ${fasterxml.jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${fasterxml.jackson.version} - - - com.fasterxml.jackson.core - jackson-annotations - ${fasterxml.jackson.version} - - - junit - junit - ${junit.version} - test - - + + 1.2.0-SNAPSHOT + 2.9.0.pr1 + true + /opt/app/dmaap-listener + 1.1.0-SNAPSHOT + + yyMMdd-HHmmss + ${maven.build.timestamp} + ${project.version}-${build.number} + + + + + + org.onap.dmaap.messagerouter.dmaapclient + dmaapClient + ${dmaap.listener.version} + + + org.slf4j + slf4j-api + 1.7.21 + + + org.slf4j + slf4j-log4j12 + 1.6.1 + compile + + + log4j + log4j + 1.2.17 + + + com.fasterxml.jackson.core + jackson-core + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${fasterxml.jackson.version} + + + junit + junit + ${junit.version} + test + + ch.vorburger.mariaDB4j mariaDB4j 2.2.3 test - - org.onap.ccsdk.sli.core - dblib-provider - ${sdnctl.dblib.version} - - - - + + org.onap.ccsdk.sli.core + dblib-provider + ${sdnctl.dblib.version} + + - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.5.1 - true - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - org.onap.ccsdk.sli.northbound.dmaapclient.DmaapListener - - - - - - maven-assembly-plugin - 2.6 - - - create-zip - - single - - package - - true - ${project.artifactId}.${project.version} - true - - src/assembly/assemble_zip.xml - - false - - - - + + - - + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + true + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + true + org.onap.ccsdk.sli.northbound.dmaapclient.DmaapListener + + + + + + maven-assembly-plugin + 2.6 + + + create-zip + + single + + package + + true + ${project.artifactId}.${project.version} + true + + src/assembly/assemble_zip.xml + + false + + + + + + diff --git a/pom.xml b/pom.xml index ded5f124b..63bcb6ead 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,8 @@ org.onap.ccsdk.parent - odlparent-carbon-sr1 - 0.1.0 + odlparent-lite + 1.0.1-SNAPSHOT 4.0.0 @@ -13,32 +13,32 @@ ccsdk-sli-northbound ccsdk-sli-northbound - https://wiki.openecomp.org + https://wiki.onap.org The SDN-C Northbound APIs repo contains code for northbound API adaptors, typically MD-SAL applications JIRA - https://jira.openecomp.org/ + https://jira.onap.org/ - scm:git:ssh://git@${openecomp.git.host}/sdnc-northbound.git + scm:git:ssh://git@${onap.git.host}/sdnc-northbound.git - scm:git:ssh://${openecomp.git.host}:${openecomp.git.port}/${openecomp.git.project}/sdnc-northbound.git - ${openecomp.git.protocol}://${openecomp.git.host}/projects/${openecomp.git.project}/repos/sdnc-northbound/browse + scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/sdnc-northbound.git + ${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/sdnc-northbound/browse Jenkins - https://jenkins.openecomp.org/ + https://jenkins.onap.org/ sdnc-javadoc - dav:https://${openecomp.nexus.host}:${openecomp.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version} + dav:https://${onap.nexus.host}:${onap.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version} @@ -110,9 +110,9 @@ ueb-listener - AT&T + ONAP - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 21173680a..b8ec986c1 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -1,18 +1,21 @@ 4.0.0 - org.onap.ccsdk.sli.northbound - jar - ueb-listener - 0.2.0-SNAPSHOT - UEB Listener - UEB Listener - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + org.onap.ccsdk.sli.northbound + ueb-listener + 0.2.1-SNAPSHOT + jar + + ccsdk-sli-northbound :: ueb-listener + UEB Listener + 1.1.32 1.1.32 @@ -91,9 +94,10 @@ org.onap.ccsdk.sli.core dblib-provider - ${sdnctl.dblib.version} + ${sdnctl.dblib.version} + @@ -150,5 +154,4 @@ - diff --git a/version.properties b/version.properties index efb7e63bc..ebb19b8f6 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=2 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 4a8c2cb9920983f8b8af75be90f7511a59e923f5 Mon Sep 17 00:00:00 2001 From: Serban Popescu Date: Mon, 26 Mar 2018 13:36:17 +0000 Subject: Add Aai event listener Add support for Aai and Pserver incoming messages from Dmaap Change-Id: I57fedcaf6668d09189f0246571e8aaf515fc3fa0 Issue-ID: CCSDK-223 Signed-off-by: Serban Popescu --- dmaap-listener/pom.xml | 6 + dmaap-listener/src/assembly/assemble_zip.xml | 1 + .../dmaapclient/SdncAaiDmaapConsumer.java | 205 +++++++++++++++++++++ dmaap-listener/src/main/resources/pserver.map | 5 + .../src/main/resources/template-pserver.vt | 11 ++ .../dmaapclient/TestSdncPserverDmaapReceiver.java | 85 +++++++++ .../resources/dmaap-consumer-pserver.properties | 34 ++++ 7 files changed, 347 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java create mode 100644 dmaap-listener/src/main/resources/pserver.map create mode 100644 dmaap-listener/src/main/resources/template-pserver.vt create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java create mode 100644 dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index f6d04e247..3a75fef0b 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -20,6 +20,7 @@ 1.2.0-SNAPSHOT 2.9.0.pr1 + 1.7 true /opt/app/dmaap-listener 1.1.0-SNAPSHOT @@ -67,6 +68,11 @@ jackson-annotations ${fasterxml.jackson.version} + + org.apache.velocity + velocity + ${velocity.version} + junit junit diff --git a/dmaap-listener/src/assembly/assemble_zip.xml b/dmaap-listener/src/assembly/assemble_zip.xml index f8873ab41..632172d77 100644 --- a/dmaap-listener/src/assembly/assemble_zip.xml +++ b/dmaap-listener/src/assembly/assemble_zip.xml @@ -48,6 +48,7 @@ *.properties *.map + *.vt diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java new file mode 100644 index 000000000..4b695fcec --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -0,0 +1,205 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncAaiDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory.getLogger(SdncAaiDmaapConsumer.class); + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + private static final String TEMPLATE = "SDNC.template"; + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + + private static final String AAI_EVENT = "AAI-EVENT"; + + private static final String EVENT_TYPE = "event-type"; + private static final String ENTITY_TYPE = "entity-type"; + private static final String EVENT_HEADER = "event-header"; + + private String rootDir; + + protected VelocityEngine velocityEngine; + + public SdncAaiDmaapConsumer() { + velocityEngine = new VelocityEngine(); + Properties props = new Properties(); + rootDir = System.getenv(DMAAPLISTENERROOT); + + if ((rootDir == null) || (rootDir.length() == 0)) { + rootDir = "/opt/app/dmaap-listener/lib/"; + } + else { + rootDir = rootDir + "/lib/"; + } + + props.put("file.resource.loader.path", rootDir); + velocityEngine.init(props); + } + + /* + * for testing purposes + */ + SdncAaiDmaapConsumer(Properties props) { + velocityEngine = new VelocityEngine(); + velocityEngine.init(props); + } + + protected String publish(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + for(Object key : jsonObj.keySet()) + { + context.put((String)key, jsonObj.get((String)key)); + } + + context.put("curr_time", Instant.now()); + + ObjectMapper oMapper = new ObjectMapper(); + + String rpcMsgbody = oMapper.writeValueAsString(jsonString); + context.put("full_message", rpcMsgbody); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode aaiRootNode; + try { + aaiRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode eventHeaderNode = aaiRootNode.get(EVENT_HEADER); + if(eventHeaderNode == null) { + LOG.info("Missing Event Header node."); + return; + } + JsonNode eventTypeNode = eventHeaderNode.get(EVENT_TYPE); + String eventType = eventTypeNode.textValue(); + + if(AAI_EVENT.equals(eventType) == false) { + LOG.info("Unknown Event Type {}", eventType); + return; + } + + JsonNode entityTypeNode = eventHeaderNode.get(ENTITY_TYPE); + String entityType = entityTypeNode.textValue(); + + String mapFilename = rootDir + entityType + ".map"; + Map fieldMap = loadMap(mapFilename); + if (fieldMap == null) { + throw new InvalidMessageException("Unable to process message - cannot load mapping file"); + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + throw new InvalidMessageException("No SDNC endpoint known for message " + entityType); + } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + if (!fieldMap.containsKey(TEMPLATE)) { + throw new InvalidMessageException("No SDNC template known for message " + entityType); + } + String templateName = fieldMap.get(TEMPLATE); + + try { + String rpcMsgbody = publish(templateName, msg); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + + private Map loadMap(String mapFilename) { + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error(String.format("Cannot read map file (%s)", mapFilename)); + return null; + } + + Map results = new HashMap<>(); + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { + + String curLine; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map " + mapFilename, e); + return null; + } + + return results; + } + +} diff --git a/dmaap-listener/src/main/resources/pserver.map b/dmaap-listener/src/main/resources/pserver.map new file mode 100644 index 000000000..8b3e463e7 --- /dev/null +++ b/dmaap-listener/src/main/resources/pserver.map @@ -0,0 +1,5 @@ +# SDN-C URL +SDNC.endpoint => config-selfservice-api:notification-callback + +# Field mapping +SDNC.template => template-pserver.vt diff --git a/dmaap-listener/src/main/resources/template-pserver.vt b/dmaap-listener/src/main/resources/template-pserver.vt new file mode 100644 index 000000000..1df659e09 --- /dev/null +++ b/dmaap-listener/src/main/resources/template-pserver.vt @@ -0,0 +1,11 @@ +{ + "input": { + "common-header": { + "request-id": "$event-header.id", + "timestamp": "$curr_time", + "originator-id": "AAI", + "api-ver": "2.00" + }, + "payload": $full_message + } +} \ No newline at end of file diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java new file mode 100644 index 000000000..db7cbd72c --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertTrue; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; + +public class TestSdncPserverDmaapReceiver { + private static final String aaiInput = "{\r\n" + + " \"cambria.partition\": \"AAI\",\r\n" + + " \"event-header\": {\r\n" + + " \"severity\": \"NORMAL\",\r\n" + + " \"entity-type\": \"pserver\",\r\n" + + " \"top-entity-type\": \"pserver\",\r\n" + + " \"entity-link\": \"https://aai.com:8443/aai/v11/cloud-infrastructure/pservers/pserver/a3d3d3d3/\",\r\n" + + " \"event-type\": \"AAI-EVENT\",\r\n" + + " \"domain\": \"e2e\",\r\n" + + " \"action\": \"UPDATE\",\r\n" + + " \"sequence-number\": \"0\",\r\n" + + " \"id\": \"20170415000111-1234\",\r\n" + + " \"source-name\": \"testclient\",\r\n" + + " \"version\": \"v11\",\r\n" + + " \"timestamp\": \"20170415-00:01:11:979\"\r\n" + + " },\r\n" + + " \"entity\": {\r\n" + + " \"hostname\": \"host1\",\r\n" + + " \"ptnii-equip-name\": \"lat111\",\r\n" + + " \"equip-type\": \"server\",\r\n" + + " \"equip-vendor\": \"HP\",\r\n" + + " \"equip-model\": \"model1\",\r\n" + + " \"fqdn\": \"l.global.net\",\r\n" + + " \"ipv4-oam-address\": \"12.12.12.12\",\r\n" + + " \"in-maint\": false,\r\n" + + " \"resource-version\": \"11111111111\",\r\n" + + " \"purpose\": \"Gamma\",\r\n" + + " \"relationship-list\": {\r\n" + + " \"relationship\": [\r\n" + + " {\r\n" + + " \"related-to\": \"complex\",\r\n" + + " \"relationship-data\": [\r\n" + + " {\r\n" + + " \"relationship-value\": \"L1L2L3\",\r\n" + + " \"relationship-key\": \"complex.physical-location-id\"\r\n" + + " }\r\n" + + " ],\r\n" + + " \"related-link\": \"https://aai.com:8443/aai/v11/cloud-infrastructure/complexes/complex/cmpl1\"\r\n" + + " }\r\n" + + " ]\r\n" + + " },\r\n" + + " \"p-interfaces\": {\r\n" + + " \"p-interface\": []\r\n" + + " },\r\n" + + " \"lag-interfaces\": {\r\n" + + " \"lag-interface\": []\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + @Before + public void setUp() throws Exception { + } + + @Test + public void test() throws Exception { + Properties props = new Properties(); + + String rpcMsgbody = new SdncAaiDmaapConsumer(props).publish("src/main/resources/template-pserver.vt", aaiInput); + + assertTrue(rpcMsgbody.indexOf("input") != -1); + assertTrue(rpcMsgbody.indexOf("payload") != -1); + assertTrue(rpcMsgbody.indexOf("common-header") != -1); + } + + +} diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties b/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties new file mode 100644 index 000000000..e3c4fdac8 --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties @@ -0,0 +1,34 @@ +TransportType=DME2 +Latitude =47.778998 +Longitude =-122.182883 +Version =1.0 +ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events +Environment =TEST +Partner = +SubContextPath =/ +Protocol =https +MethodType =GET +username =test +password =test +contenttype =application/json +authKey=ABC123 +authDate=2016-05-10T13:13:50-0700 +host=localhost:3904 +topic=ccsdk-topic +group=pserver +id=1 +timeout=20000 +limit=10000 +filter={"class":"Equals","field":"event-header.entity-type","value":"pserver"} +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=55000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=src/test/resources/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=admin +sdnc.odl.url-base=http://localhost:8181/restconf/operations \ No newline at end of file -- cgit 1.2.3-korg From 22a9e045d42ad629010cc4200369a4453fbe0df7 Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Mon, 26 Mar 2018 19:24:35 +0530 Subject: coverageSdncFlatJsonDmaapConsumer Coverage improvement for SdncFlatJsonDmaapConsumer https://jira.onap.org/browse/CCSDK-213?jql=project%20%3D%20CCSDK%20AND%20text%20~%20coverage Issue-ID: CCSDK-213 Change-Id: I95e824c5c83b9c36ce0c475368235182e851c254 Signed-off-by: shashikanth.vh --- .../northbound/dmaapclient/TestSdncJsonDmaapConsumer.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java index 0d65231da..01bd3cf28 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java @@ -19,4 +19,16 @@ public class TestSdncJsonDmaapConsumer { SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); consumer.processMsg(null); } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullFieldMap_shouldThrowException() throws Exception { + SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); + + String msg = "{\n" + + " \"input\" : { \n" + + " }\n" + + "}"; + + consumer.processMsg(msg); + } } -- cgit 1.2.3-korg From 7dee0c8d2680888271da556fedc7ea0d0bc773f9 Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Tue, 27 Mar 2018 19:17:33 +0530 Subject: SdncOdlConnection coverage Coverage improvement for SdncOdlConnection https://jira.onap.org/browse/CCSDK-213?jql=project%20%3D%20CCSDK%20AND%20text%20~%20coverage Issue-ID: CCSDK-213 Change-Id: I8045722de77e8884be485bd6f1ed2243c08d2d2b Signed-off-by: shashikanth.vh --- .../dmaapclient/TestSdncOdlConnection.java | 26 +++++++++++++ .../uebclient/TestSdncOdlConnection.java | 45 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java new file mode 100644 index 000000000..db24a4545 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncOdlConnection.java @@ -0,0 +1,26 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.junit.Test; + +import java.io.IOException; +import java.net.ConnectException; + +public class TestSdncOdlConnection { + + @Test + public void test() { + + try { + SdncOdlConnection sdncOdlConnection = SdncOdlConnection.newInstance("https://127.0.0.1:8447/aai/v11/network/pnfs/pnf/a8098c1a-f86e-11da-bd1a-00112444be1e", "", ""); + sdncOdlConnection.send("PUT", "application/json", "{\n" + + " \"input\" : { \n" + + " }\n" + + "}"); + } catch (ConnectException e) { + //Connection exception + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java new file mode 100644 index 000000000..1fac0c299 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java @@ -0,0 +1,45 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + +import ch.vorburger.mariadb4j.DB; +import ch.vorburger.mariadb4j.DBConfigurationBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.ccsdk.sli.core.dblib.DBResourceManager; +import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.notification.INotificationData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.ConnectException; +import java.net.URL; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.Properties; + +import static org.mockito.Mockito.mock; + +public class TestSdncOdlConnection { + + @Test + public void test() { + + try { + SdncOdlConnection sdncOdlConnection = SdncOdlConnection.newInstance("https://127.0.0.1:8447/aai/v11/network/pnfs/pnf/a8098c1a-f86e-11da-bd1a-00112444be1e", "", ""); + sdncOdlConnection.send("PUT", "application/json", "{\n" + + " \"input\" : { \n" + + " }\n" + + "}"); + } catch (ConnectException e) { + //Connection exception + } catch (IOException e) { + e.printStackTrace(); + } + } + +} -- cgit 1.2.3-korg From 448607990ac6b73d21f8d1b781e37ec798d7e29e Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Wed, 28 Mar 2018 14:49:39 +0530 Subject: coverage SdncFlatJsonDmaapConsumer Coverage improvement for SdncFlatJsonDmaapConsumer https://jira.onap.org/browse/CCSDK-213?jql=project%20%3D%20CCSDK%20AND%20text%20~%20coverage Issue-ID: CCSDK-213 Change-Id: Idb08f426e1626f8aa2b12d2c53f1960474af59c2 Signed-off-by: shashikanth.vh --- .../dmaapclient/TestSdncJsonDmaapConsumer.java | 106 ++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java index 01bd3cf28..620098cb7 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncJsonDmaapConsumer.java @@ -10,6 +10,16 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import org.junit.Test; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.InputStream; +import java.lang.reflect.Field; + +import java.util.Map; +import java.util.Properties; + public class TestSdncJsonDmaapConsumer { private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; @@ -19,9 +29,103 @@ public class TestSdncJsonDmaapConsumer { SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); consumer.processMsg(null); } + + @Test + public void testProcessMsgFieldMap() throws Exception { + SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); + + String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + File directory = new File("lib"); + + if (! directory.exists()){ + directory.mkdir(); + } + + File file = new File("lib" + "/" + "input.map"); + try{ + FileWriter fw = new FileWriter(file.getAbsoluteFile()); + BufferedWriter bw = new BufferedWriter(fw); + bw.write("SDNC.endpoint=>http://localhost:8282/restconf/operations"); + bw.close(); + } + catch (Exception e){ + e.printStackTrace(); + } + + try { + Map env = System.getenv(); + Class cl = env.getClass(); + Field field = cl.getDeclaredField("m"); + field.setAccessible(true); + Map writableEnv = (Map) field.get(env); + writableEnv.put(DMAAPLISTENERROOT, "."); + } catch (Exception e) { + throw new IllegalStateException("Failed to set environment variable", e); + } + + String msg = "{\n" + + " \"input\" : { \n" + + " }\n" + + "}"; + + InputStream propStr = TestSdncJsonDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-pserver.properties"); + Properties props = new Properties(); + + props.load(propStr); + + consumer.init(props, "src/test/resources/dmaap-consumer-pserver.properties"); + consumer.processMsg(msg); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgFieldMapNoSdncEndPoint() throws Exception { + SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); + + String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + File directory = new File("lib"); + + if (! directory.exists()){ + directory.mkdir(); + } + + File file = new File("lib" + "/" + "input.map"); + try{ + FileWriter fw = new FileWriter(file.getAbsoluteFile()); + BufferedWriter bw = new BufferedWriter(fw); + bw.write("SDNC"); + bw.close(); + } + catch (Exception e){ + e.printStackTrace(); + } + + try { + Map env = System.getenv(); + Class cl = env.getClass(); + Field field = cl.getDeclaredField("m"); + field.setAccessible(true); + Map writableEnv = (Map) field.get(env); + writableEnv.put(DMAAPLISTENERROOT, "."); + } catch (Exception e) { + throw new IllegalStateException("Failed to set environment variable", e); + } + + String msg = "{\n" + + " \"input\" : { \n" + + " }\n" + + "}"; + + InputStream propStr = TestSdncJsonDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-pserver.properties"); + Properties props = new Properties(); + + props.load(propStr); + + consumer.init(props, "src/test/resources/dmaap-consumer-pserver.properties"); + consumer.processMsg(msg); + } @Test(expected = InvalidMessageException.class) - public void testProcessMsgNullFieldMap_shouldThrowException() throws Exception { + public void testProcessMsgFieldMapNoFieldMap() throws Exception { SdncFlatJsonDmaapConsumer consumer = new SdncFlatJsonDmaapConsumer(); String msg = "{\n" + -- cgit 1.2.3-korg From fa0fd7c1fe8dcb746cc8bdb9cc8d8e09ef10f7ad Mon Sep 17 00:00:00 2001 From: Serban Popescu Date: Wed, 28 Mar 2018 13:32:44 +0000 Subject: Add Aai event listener Add support for Aai and Pserver incoming messages from Dmaap Change-Id: I6ace2395476a1410ea3b7ffe0bebc1766d19e474 Issue-ID: CCSDK-223 Signed-off-by: Serban Popescu --- dmaap-listener/src/main/resources/generic-vnf.map | 5 ++++ .../src/main/resources/template-generic-vnf.vt | 15 ++++++++++ .../src/main/resources/template-pserver.vt | 4 +++ .../dmaapclient/TestSdncPserverDmaapReceiver.java | 20 +++++++++++-- .../dmaap-consumer-generic-vnf.properties | 34 ++++++++++++++++++++++ .../resources/dmaap-consumer-pserver.properties | 2 +- 6 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 dmaap-listener/src/main/resources/generic-vnf.map create mode 100644 dmaap-listener/src/main/resources/template-generic-vnf.vt create mode 100644 dmaap-listener/src/test/resources/dmaap-consumer-generic-vnf.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/resources/generic-vnf.map b/dmaap-listener/src/main/resources/generic-vnf.map new file mode 100644 index 000000000..bc375eb28 --- /dev/null +++ b/dmaap-listener/src/main/resources/generic-vnf.map @@ -0,0 +1,5 @@ +# SDN-C URL +SDNC.endpoint => config-selfservice-api:notification-callback + +# Field mapping +SDNC.template => template-generic-vnf.vt diff --git a/dmaap-listener/src/main/resources/template-generic-vnf.vt b/dmaap-listener/src/main/resources/template-generic-vnf.vt new file mode 100644 index 000000000..c8a6b78ea --- /dev/null +++ b/dmaap-listener/src/main/resources/template-generic-vnf.vt @@ -0,0 +1,15 @@ +{ + "input": { + "common-header": { + "request-id": "$event-header.id", + "timestamp": "$curr_time", + "originator-id": "AAI", + "api-ver": "2.00" + }, + "action-identifiers": { + "action-name": "dmaap-notification", + "mode": "async" + }, + "payload": $full_message + } +} \ No newline at end of file diff --git a/dmaap-listener/src/main/resources/template-pserver.vt b/dmaap-listener/src/main/resources/template-pserver.vt index 1df659e09..c8a6b78ea 100644 --- a/dmaap-listener/src/main/resources/template-pserver.vt +++ b/dmaap-listener/src/main/resources/template-pserver.vt @@ -6,6 +6,10 @@ "originator-id": "AAI", "api-ver": "2.00" }, + "action-identifiers": { + "action-name": "dmaap-notification", + "mode": "async" + }, "payload": $full_message } } \ No newline at end of file diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java index db7cbd72c..b9b20a6cd 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java @@ -9,12 +9,16 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertEquals; import java.util.Properties; import org.junit.Before; import org.junit.Test; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + public class TestSdncPserverDmaapReceiver { private static final String aaiInput = "{\r\n" + " \"cambria.partition\": \"AAI\",\r\n" + @@ -75,10 +79,20 @@ public class TestSdncPserverDmaapReceiver { Properties props = new Properties(); String rpcMsgbody = new SdncAaiDmaapConsumer(props).publish("src/main/resources/template-pserver.vt", aaiInput); + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode aaiRootNode; + try { + aaiRootNode = oMapper.readTree(rpcMsgbody); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } - assertTrue(rpcMsgbody.indexOf("input") != -1); - assertTrue(rpcMsgbody.indexOf("payload") != -1); - assertTrue(rpcMsgbody.indexOf("common-header") != -1); + assertTrue(aaiRootNode.get("input").get("payload") != null); + assertTrue(aaiRootNode.get("input").get("common-header") != null); + + assertEquals(aaiRootNode.get("input").get("action-identifiers").get("action-name").textValue(), "dmaap-notification"); + assertEquals(aaiRootNode.get("input").get("action-identifiers").get("mode").textValue(), "async"); } diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-generic-vnf.properties b/dmaap-listener/src/test/resources/dmaap-consumer-generic-vnf.properties new file mode 100644 index 000000000..710a7c7c9 --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-generic-vnf.properties @@ -0,0 +1,34 @@ +TransportType=DME2 +Latitude =47.778998 +Longitude =-122.182883 +Version =1.0 +ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events +Environment =TEST +Partner = +SubContextPath =/ +Protocol =https +MethodType =GET +username =test +password =test +contenttype =application/json +authKey=ABC123 +authDate=2016-05-10T13:13:50-0700 +host=localhost:3904 +topic=AAI-EVENT +group=vnf +id=1 +timeout=20000 +limit=10000 +filter={"class":"And","filters":[{"class":"Equals","field":"event-header.entity-type","value":"generic-vnf"},{"class":"Equals","field":"entity.vnf-type","value":"kvm-vpe"}]} +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=55000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=src/test/resources/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=admin +sdnc.odl.url-base=http://localhost:8181/restconf/operations \ No newline at end of file diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties b/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties index e3c4fdac8..9f5cfe71f 100644 --- a/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties +++ b/dmaap-listener/src/test/resources/dmaap-consumer-pserver.properties @@ -14,7 +14,7 @@ contenttype =application/json authKey=ABC123 authDate=2016-05-10T13:13:50-0700 host=localhost:3904 -topic=ccsdk-topic +topic=AAI-EVENT group=pserver id=1 timeout=20000 -- cgit 1.2.3-korg From 7fc8f9fe913e35121c8e9f6e222c9b741beefdda Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Wed, 28 Mar 2018 17:32:01 +0530 Subject: coverage SdncAaiDmaapConsumer Coverage improvement for SdncAaiDmaapConsumer https://jira.onap.org/browse/CCSDK-213?jql=project%20%3D%20CCSDK%20AND%20text%20~%20coverage Issue-ID: CCSDK-213 Change-Id: Icc9af3a9f27d4bae543525b5651d1f6485ef8857 Signed-off-by: shashikanth.vh --- .../dmaapclient/TestSdncPserverDmaapReceiver.java | 90 +++++++++++++++++++++ .../incoming/src_test_resources_csars_nsepc.csar | Bin 0 -> 42569 bytes 2 files changed, 90 insertions(+) create mode 100644 ueb-listener/src/test/resources/incoming/src_test_resources_csars_nsepc.csar (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java index db7cbd72c..963b20d68 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java @@ -10,8 +10,15 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import static org.junit.Assert.assertTrue; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; import java.util.Properties; +import org.apache.commons.io.FileUtils; + import org.junit.Before; import org.junit.Test; @@ -81,5 +88,88 @@ public class TestSdncPserverDmaapReceiver { assertTrue(rpcMsgbody.indexOf("common-header") != -1); } + @Test + public void testProcessMsgFieldMap() throws Exception { + + + String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + File directory = new File("lib"); + + if (! directory.exists()){ + directory.mkdir(); + } + + File source = new File("src/main/resources"); + File dest = new File("lib/"); + try { + FileUtils.copyDirectory(source, dest); + } catch (IOException e) { + e.printStackTrace(); + } + + try { + Map env = System.getenv(); + Class cl = env.getClass(); + Field field = cl.getDeclaredField("m"); + field.setAccessible(true); + Map writableEnv = (Map) field.get(env); + writableEnv.put(DMAAPLISTENERROOT, "."); + } catch (Exception e) { + throw new IllegalStateException("Failed to set environment variable", e); + } + Properties props = new Properties(); + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + + InputStream propStr = TestSdncPserverDmaapReceiver.class.getResourceAsStream("/dmaap-consumer-pserver.properties"); + + + props.load(propStr); + + consumer.init(props, "src/test/resources/dmaap-consumer-pserver.properties"); + consumer.processMsg(aaiInput); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + Properties props = new Properties(); + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgInvalidMessage() throws Exception { + Properties props = new Properties(); + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + consumer.processMsg("test"); + } + + @Test + public void testProcessMsgMissingEventHeader() throws Exception { + Properties props = new Properties(); + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + consumer.processMsg("{\n" + + " \"input\" : { \n" + + " }\n" + + "}"); + } + + @Test + public void testProcessMsgInvalidEventType() throws Exception { + Properties props = new Properties(); + + String msg = "{\"cambria.partition\": \"AAI\",\r\n" + + " \"event-header\": {\"event-type\": \"TEST-EVENT\"}}"; + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + consumer.processMsg(msg); + } + + + + } diff --git a/ueb-listener/src/test/resources/incoming/src_test_resources_csars_nsepc.csar b/ueb-listener/src/test/resources/incoming/src_test_resources_csars_nsepc.csar new file mode 100644 index 000000000..087d8c3d8 Binary files /dev/null and b/ueb-listener/src/test/resources/incoming/src_test_resources_csars_nsepc.csar differ -- cgit 1.2.3-korg From 7ee6690d42bdfbc1685b1ea1c40dc4015bd271e8 Mon Sep 17 00:00:00 2001 From: Serban Popescu Date: Wed, 28 Mar 2018 15:11:05 +0000 Subject: Add Aai event listener Add support for Aai generic-vnf incoming messages from Dmaap Change-Id: I6dcb3d935afdfee5a6e71398cfb2381265dfee92 Issue-ID: CCSDK-226 Signed-off-by: Serban Popescu --- dmaap-listener/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 3a75fef0b..9c0ced010 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -20,7 +20,7 @@ 1.2.0-SNAPSHOT 2.9.0.pr1 - 1.7 + 2.0 true /opt/app/dmaap-listener 1.1.0-SNAPSHOT @@ -70,7 +70,7 @@ org.apache.velocity - velocity + velocity-engine-core ${velocity.version} -- cgit 1.2.3-korg From d3dff0bc0832ea02f53bd952ea9c180f8df94580 Mon Sep 17 00:00:00 2001 From: Serban Popescu Date: Wed, 28 Mar 2018 16:43:24 +0000 Subject: Add Aai event listener Add support for Aai and Pserver incoming messages from Dmaap Change-Id: Ie799cb57f5c00eed70c9f6fd30825f907962a094 Issue-ID: CCSDK-226 Signed-off-by: Serban Popescu --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java | 5 ++++- dmaap-listener/src/main/resources/template-generic-vnf.vt | 6 +----- dmaap-listener/src/main/resources/template-pserver.vt | 6 +----- .../sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java | 3 --- 4 files changed, 6 insertions(+), 14 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index 4b695fcec..0e12dfa2e 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -90,6 +90,9 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumer { { context.put((String)key, jsonObj.get((String)key)); } + + String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); + context.put("req_id", id); context.put("curr_time", Instant.now()); @@ -159,7 +162,7 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumer { String odlPassword = getProperty("sdnc.odl.password"); if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { - SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword); + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); conn.send("POST", "application/json", rpcMsgbody); } else { diff --git a/dmaap-listener/src/main/resources/template-generic-vnf.vt b/dmaap-listener/src/main/resources/template-generic-vnf.vt index c8a6b78ea..d57c9a0a4 100644 --- a/dmaap-listener/src/main/resources/template-generic-vnf.vt +++ b/dmaap-listener/src/main/resources/template-generic-vnf.vt @@ -1,15 +1,11 @@ { "input": { "common-header": { - "request-id": "$event-header.id", + "request-id": "$req_id", "timestamp": "$curr_time", "originator-id": "AAI", "api-ver": "2.00" }, - "action-identifiers": { - "action-name": "dmaap-notification", - "mode": "async" - }, "payload": $full_message } } \ No newline at end of file diff --git a/dmaap-listener/src/main/resources/template-pserver.vt b/dmaap-listener/src/main/resources/template-pserver.vt index c8a6b78ea..d57c9a0a4 100644 --- a/dmaap-listener/src/main/resources/template-pserver.vt +++ b/dmaap-listener/src/main/resources/template-pserver.vt @@ -1,15 +1,11 @@ { "input": { "common-header": { - "request-id": "$event-header.id", + "request-id": "$req_id", "timestamp": "$curr_time", "originator-id": "AAI", "api-ver": "2.00" }, - "action-identifiers": { - "action-name": "dmaap-notification", - "mode": "async" - }, "payload": $full_message } } \ No newline at end of file diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java index ec01df534..11201265d 100644 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java @@ -9,7 +9,6 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; import java.io.File; import java.io.IOException; @@ -98,8 +97,6 @@ public class TestSdncPserverDmaapReceiver { assertTrue(aaiRootNode.get("input").get("payload") != null); assertTrue(aaiRootNode.get("input").get("common-header") != null); - assertEquals(aaiRootNode.get("input").get("action-identifiers").get("action-name").textValue(), "dmaap-notification"); - assertEquals(aaiRootNode.get("input").get("action-identifiers").get("mode").textValue(), "async"); } @Test -- cgit 1.2.3-korg From c50170bc44f192a7c8e7efdfc773342d8b5c0437 Mon Sep 17 00:00:00 2001 From: Jeremy Wolf Date: Wed, 28 Mar 2018 17:22:09 +0000 Subject: coverage sli-northbound adding junit test files for AsdcApiSliClient, AsdcApiUtil, DataChangeClient, SdncFlatJsonDmaapConsumer, SdncARModel, SdncNodeModel, SdncVFCModel, SdncVFModuleModel, SdncUebCallback Change-Id: Ia7fb307b84957292f9080654c7ae31992434317f Issue-ID: CCSDK-230 Signed-off-by: Jeremy Wolf --- .../northbound/asdcapi/AsdcApiSliClientTest.java | 59 ++++++++++++++++ .../sli/northbound/asdcapi/AsdcApiUtilTest.java | 15 ++++ .../dataChange/DataChangeClientTest.java | 56 +++++++++++++++ .../dmaapclient/SdncFlatJsonDmaapConsumerTest.java | 41 +++++++++++ .../sli/northbound/uebclient/SdncARModelTest.java | 21 ++++++ .../northbound/uebclient/SdncNodeModelTest.java | 49 +++++++++++++ .../sli/northbound/uebclient/SdncVFCModelTest.java | 36 ++++++++++ .../uebclient/SdncVFModuleModelTest.java | 20 ++++++ .../northbound/uebclient/TestSdncUebCallback.java | 82 +++++++++++++++++++++- 9 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClientTest.java create mode 100644 asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtilTest.java create mode 100644 dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/DataChangeClientTest.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumerTest.java create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java create mode 100644 ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java (limited to 'dmaap-listener') diff --git a/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClientTest.java b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClientTest.java new file mode 100644 index 000000000..5e6a9daf7 --- /dev/null +++ b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClientTest.java @@ -0,0 +1,59 @@ +package org.onap.ccsdk.sli.northbound.asdcapi; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; + +public class AsdcApiSliClientTest { + Properties mockProp; + Properties propReturn; + AsdcApiSliClient testAsdcApiSliClient; + + @Before + public void setup() { + SvcLogicService mockSvcLogic = mock(SvcLogicService.class); + mockProp = new Properties(); + mockProp.setProperty("test-value1", "value1"); + propReturn = new Properties(); + propReturn.setProperty("SvcLogic.status", "Success"); + propReturn.setProperty("Object1", "value1"); + try { + when(mockSvcLogic.hasGraph("TestModule", "TestRPC", "TestVersion", "TestMode")).thenReturn(true); + when(mockSvcLogic.hasGraph("NotExist", "TestRPC", "TestVersion", "TestMode")).thenReturn(false); + when(mockSvcLogic.execute("TestModule", "TestRPC", "TestVersion", "TestMode", mockProp)).thenReturn(propReturn); + } catch (Exception e) { + System.out.println(e); + } + + testAsdcApiSliClient = new AsdcApiSliClient(mockSvcLogic); + } + + @Test + public void testhasGraphGraphExsists() throws SvcLogicException { + assertTrue(testAsdcApiSliClient.hasGraph("TestModule", "TestRPC", "TestVersion", "TestMode")); + } + + @Test + public void testhasGraphnoGraph() throws SvcLogicException { + assertFalse(testAsdcApiSliClient.hasGraph("NotExist", "TestRPC", "TestVersion", "TestMode")); + } + + @Test + public void testExecutewithSvcLogicSuccess() throws SvcLogicException { + Properties result = testAsdcApiSliClient.execute("TestModule", "TestRPC", "TestVersion", "TestMode", mockProp); + assertEquals(result.getProperty("error-code"), "200"); + } + + @Test + public void testExecutewithSvcLogicFailure500() throws SvcLogicException { + propReturn.setProperty("SvcLogic.status", "failure"); + Properties result = testAsdcApiSliClient.execute("TestModule", "TestRPC", "TestVersion", "TestMode", mockProp); + assertEquals(result.getProperty("error-code"), "500"); + } +} \ No newline at end of file diff --git a/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtilTest.java b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtilTest.java new file mode 100644 index 000000000..463e5ea0b --- /dev/null +++ b/asdcApi/provider/src/test/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtilTest.java @@ -0,0 +1,15 @@ +package org.onap.ccsdk.sli.northbound.asdcapi; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class AsdcApiUtilTest { + + @Test + public void testAsdcApiUtilConstructor() { + AsdcApiUtil asdcApiUtilTest = new AsdcApiUtil(); + assertNotNull(asdcApiUtilTest); + } + +} \ No newline at end of file diff --git a/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/DataChangeClientTest.java b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/DataChangeClientTest.java new file mode 100644 index 000000000..9ba6c8742 --- /dev/null +++ b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/DataChangeClientTest.java @@ -0,0 +1,56 @@ +package org.onap.sdnc.northbound.dataChange; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.onap.ccsdk.sli.northbound.DataChangeClient; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeNotificationOutputBuilder; + +public class DataChangeClientTest { + + SvcLogicService mockSvcLogicService; + String module = "test-module"; + String rpc = "test-rpc"; + String version = "test-version"; + String mode = "test-mode"; + Properties localProp = new Properties(); + + @Before + public void setUp() throws Exception { + mockSvcLogicService = mock(SvcLogicService.class); + when(mockSvcLogicService.hasGraph(module, rpc, version, mode)).thenReturn(true); + } + + @Test + public void testDataChangeClientConstructor() { + DataChangeClient dataChangeClient = new DataChangeClient(mockSvcLogicService); + assertNotNull(dataChangeClient); + } + + @Test + public void testHasGraph() throws SvcLogicException { + DataChangeClient dataChangeClient = new DataChangeClient(mockSvcLogicService); + boolean result = dataChangeClient.hasGraph(module, rpc, version, mode); + assertTrue(result); + } + + @Test + public void testExecuteSvcLogicStatusFailure() throws SvcLogicException { + DataChangeNotificationOutputBuilder serviceData = mock(DataChangeNotificationOutputBuilder.class); + Properties parms = mock(Properties.class); + SvcLogicService svcLogicService = mock(SvcLogicService.class); + Properties properties = new Properties(); + properties.setProperty("SvcLogic.status", "failure"); + when(svcLogicService.execute(module, rpc, version, mode, properties)).thenReturn(properties); + DataChangeClient sliClient = new DataChangeClient(svcLogicService); + Properties prop = sliClient.execute(module, rpc, version, mode, serviceData, properties); + assertTrue(prop != null); + } +} \ No newline at end of file diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumerTest.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumerTest.java new file mode 100644 index 000000000..d1aee634d --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumerTest.java @@ -0,0 +1,41 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.*; + + +import java.io.File; + +import org.junit.Before; +import org.junit.Test; + +public class SdncFlatJsonDmaapConsumerTest { + + private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "src/test/resources"; + + SdncFlatJsonDmaapConsumer consumer; + + @Before + public void setUp() throws Exception { + consumer = new SdncFlatJsonDmaapConsumer(); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgString_NullInvalidMessageException() throws InvalidMessageException { + // expected = InvalidMessageException: Null message + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgString_UnformatedMessageInvalidMessageException() throws InvalidMessageException { + // expected = InvalidMessageException: Cannot parse json object + consumer.processMsg("TESTING", null); + } + + @Test(expected = InvalidMessageException.class) + public void testing()throws InvalidMessageException { + // Expected = InvalidMessageException: Unable to process message - cannot load field mappings + String msg = "{\"test\":\"string\"}"; + consumer.processMsg(msg, null); + } +} \ No newline at end of file diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java new file mode 100644 index 000000000..0d152e5e0 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java @@ -0,0 +1,21 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + + import static org.junit.Assert.*; + import static org.mockito.Mockito.*; + + import org.junit.Test; + import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; + import org.openecomp.sdc.toscaparser.api.NodeTemplate; + + public class SdncARModelTest { + + @Test + public void testSdncARModelConstructor() { + ISdcCsarHelper mockCsarHelper = mock(ISdcCsarHelper.class); + NodeTemplate nodeTemplate = mock(NodeTemplate.class); + SdncARModel testSdncARModel = new SdncARModel(mockCsarHelper,nodeTemplate); + assertNotNull(testSdncARModel); + } + + } + diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java new file mode 100644 index 000000000..4a66c0201 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java @@ -0,0 +1,49 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + +import static org.junit.Assert.*; + +import static org.mockito.Mockito.*; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; + +public class SdncNodeModelTest { + + SdncNodeModel sdncNodeModel; + + @Before + public void setUp() throws Exception { + ISdcCsarHelper isdcCsarHelper = mock(ISdcCsarHelper.class); + NodeTemplate nodeTemplate = mock(NodeTemplate.class); + sdncNodeModel = new SdncNodeModel(isdcCsarHelper, nodeTemplate); + sdncNodeModel.setServiceUUID("0e8d757f-1c80-40af-85de-31d64f1f5af8"); + sdncNodeModel.setEcompGeneratedNaming("hello-world"); + } + + @Test + public void testGetServiceUUID() { + String result = sdncNodeModel.getServiceUUID(); + assertNotNull(result != null); + } + + @Test + public void testGetEcompGeneratedNaming() { + String result = sdncNodeModel.getEcompGeneratedNaming(); + assertEquals("hello-world", result); + } + + @Test + public void testGetSqlString() { + String result = sdncNodeModel.getSql("TEST-HELLO"); + String test = "INSERT into NETWORK_MODEL (service_uuid, customization_uuid, model_yaml, ecomp_generated_naming) values (0e8d757f-1c80-40af-85de-31d64f1f5af8, \"\", \"TEST-HELLO\", \"hello-world\");"; + assertEquals(test, result); + } + + @Test + public void testGetVpnBindingsSql() { + String result = sdncNodeModel.getVpnBindingsSql(); + assertNotNull(result); + } +} \ No newline at end of file diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java new file mode 100644 index 000000000..d2bafbf42 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java @@ -0,0 +1,36 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; + +public class SdncVFCModelTest { + + SdncVFCModel testSdncVFCModel; + + @Before + public void setup() { + ISdcCsarHelper mockCsarHelper = mock(ISdcCsarHelper.class); + NodeTemplate mockNodeTemplate = mock(NodeTemplate.class); + testSdncVFCModel = new SdncVFCModel(mockCsarHelper, mockNodeTemplate); + testSdncVFCModel.setVmType("Test-type"); + testSdncVFCModel.setVmCount("5"); + + } + + @Test + public void testSdncVFCModelGetVmType() { + assertEquals(testSdncVFCModel.getVmType(), "Test-type"); + } + + @Test + public void testSdncVFCModelGetVmCount() { + assertEquals(testSdncVFCModel.getVmCount(), "5"); + } + +} \ No newline at end of file diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java new file mode 100644 index 000000000..218554357 --- /dev/null +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java @@ -0,0 +1,20 @@ +package org.onap.ccsdk.sli.northbound.uebclient; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.mock; + +import org.junit.Test; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.toscaparser.api.Group; + +public class SdncVFModuleModelTest { + + @Test + public void testSdncVFModuleModelConstructor() { + Group mockGroup = mock(Group.class); + ISdcCsarHelper mockCsarHelper = mock(ISdcCsarHelper.class); + SdncVFModuleModel testSdncVFModel = new SdncVFModuleModel(mockCsarHelper, mockGroup); + assertNotNull(testSdncVFModel); + } + +} \ No newline at end of file diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java index 79a598ce5..21854f990 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java @@ -1,6 +1,7 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import static org.mockito.Mockito.mock; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.*; import java.io.File; import java.io.InputStream; @@ -9,6 +10,8 @@ import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import org.junit.After; @@ -16,7 +19,9 @@ import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; import org.openecomp.sdc.api.IDistributionClient; +import org.openecomp.sdc.api.notification.IArtifactInfo; import org.openecomp.sdc.api.notification.INotificationData; +import org.openecomp.sdc.api.notification.IResourceInstance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -149,6 +154,15 @@ public class TestSdncUebCallback { SdncUebConfiguration config; DBResourceManager dblibSvc; DB db; + List processLevelArtifactList; + List serviceLevelArtifactList; + ArrayList resourceList; + IArtifactInfo mockProcessArtifact1; + IArtifactInfo mockProcessArtifact2; + IArtifactInfo mockProcessArtifact3; + IArtifactInfo mockServiceArtifact1; + IResourceInstance resource; + @Before public void setUp() throws Exception { @@ -186,6 +200,42 @@ public class TestSdncUebCallback { dblibSvc.writeData(CRTBL_VF_MODEL, null, null); dblibSvc.writeData(CRTBL_VF_MODULE_MODEL, null, null); dblibSvc.writeData(CRTBL_ALLOTTED_RESOURCE_MODEL, null, null); + + processLevelArtifactList = new ArrayList<>(); + serviceLevelArtifactList = new ArrayList<>(); + resourceList = new ArrayList<>(); + + + mockProcessArtifact1 = mock(IArtifactInfo.class); + when(mockProcessArtifact1.getArtifactName()).thenReturn("mockProcessArtifact1"); + when(mockProcessArtifact1.getArtifactType()).thenReturn("HEAT"); + when(mockProcessArtifact1.getArtifactURL()).thenReturn("https://asdc.sdc.com/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml"); + when(mockProcessArtifact1.getArtifactChecksum()).thenReturn("123tfg123 1234ftg"); + when(mockProcessArtifact1.getArtifactTimeout()).thenReturn(110); + + mockProcessArtifact2 = mock(IArtifactInfo.class); + when(mockProcessArtifact1.getArtifactName()).thenReturn("mockProcessArtifact2"); + when(mockProcessArtifact1.getArtifactType()).thenReturn("DG_XML"); + when(mockProcessArtifact1.getArtifactURL()).thenReturn("https://asdc.sdc.com/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml"); + when(mockProcessArtifact1.getArtifactChecksum()).thenReturn("456jhgt 1234ftg"); + when(mockProcessArtifact1.getArtifactTimeout()).thenReturn(110); + + mockProcessArtifact3 = mock(IArtifactInfo.class); + when(mockProcessArtifact1.getArtifactName()).thenReturn("mockProcessArtifact3"); + when(mockProcessArtifact1.getArtifactType()).thenReturn("HEAT"); + when(mockProcessArtifact1.getArtifactURL()).thenReturn("https://asdc.sdc.com/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml"); + when(mockProcessArtifact1.getArtifactChecksum()).thenReturn("123tfg123 543gtd"); + when(mockProcessArtifact1.getArtifactTimeout()).thenReturn(110); + + + mockServiceArtifact1 = mock(IArtifactInfo.class); + when(mockServiceArtifact1.getArtifactName()).thenReturn("mockProcessArtifact4"); + when(mockServiceArtifact1.getArtifactType()).thenReturn("HEAT"); + when(mockServiceArtifact1.getArtifactURL()).thenReturn("https://asdc.sdc.com/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml"); + when(mockServiceArtifact1.getArtifactChecksum()).thenReturn("123t3455 543gtd"); + when(mockServiceArtifact1.getArtifactTimeout()).thenReturn(110); + + resource = mock(IResourceInstance.class); } @After @@ -219,5 +269,35 @@ public class TestSdncUebCallback { INotificationData iData = mock(INotificationData.class); cb.activateCallback(iData); } + + + + @Test + public void testServiceAndProcessArtifactsactivateCallback() { + + try { + processLevelArtifactList.add(mockProcessArtifact1); + processLevelArtifactList.add(mockProcessArtifact2); + processLevelArtifactList.add(mockProcessArtifact3); + + resourceList.add(resource); + serviceLevelArtifactList.add(mockServiceArtifact1); + when(resource.getArtifacts()).thenReturn(serviceLevelArtifactList); + when(resource.getResourceName()).thenReturn("Resource_service_name"); + + + IDistributionClient iDistClient1 = mock(IDistributionClient.class); + INotificationData mockData = mock(INotificationData.class); + when(mockData.getResources()).thenReturn(resourceList); + when(mockData.getServiceName()).thenReturn("Test_service_name"); + when(mockData.getServiceArtifacts()).thenReturn(processLevelArtifactList); + + SdncUebCallback cb1 = new SdncUebCallback(iDistClient1, config); + cb1.activateCallback(mockData); + assertTrue(true); + } catch (Exception e) { + assertTrue(false); + } + } } -- cgit 1.2.3-korg From d0bfc56359e3d5a9663ba6e48b7e1d187373d737 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 28 Mar 2018 19:01:21 -0400 Subject: Update versions to resolve security issues Update versions of sdc distribution client and jackson to address security issues. Issue-ID: CCSDK-164 Change-Id: Id02d879e87bb1a957968482578818928b6e3c281 Signed-off-by: Timoney, Dan (dt5972) --- .gitignore | 1 + dmaap-listener/pom.xml | 2 +- ueb-listener/pom.xml | 10 +++--- .../sli/northbound/uebclient/SdncARModel.java | 8 ++--- .../sli/northbound/uebclient/SdncBaseModel.java | 10 +++--- .../sli/northbound/uebclient/SdncNodeModel.java | 6 ++-- .../sli/northbound/uebclient/SdncServiceModel.java | 6 ++-- .../sli/northbound/uebclient/SdncUebCallback.java | 36 +++++++++++----------- .../sli/northbound/uebclient/SdncUebClient.java | 8 ++--- .../northbound/uebclient/SdncUebConfiguration.java | 18 ++++++++++- .../sli/northbound/uebclient/SdncVFCModel.java | 6 ++-- .../sli/northbound/uebclient/SdncVFModel.java | 8 ++--- .../northbound/uebclient/SdncVFModuleModel.java | 6 ++-- .../sli/northbound/uebclient/SdncARModelTest.java | 4 +-- .../northbound/uebclient/SdncNodeModelTest.java | 6 ++-- .../sli/northbound/uebclient/SdncVFCModelTest.java | 6 ++-- .../uebclient/SdncVFModuleModelTest.java | 6 ++-- .../uebclient/TestSdncOdlConnection.java | 4 +-- .../northbound/uebclient/TestSdncUebCallback.java | 8 ++--- 19 files changed, 88 insertions(+), 71 deletions(-) (limited to 'dmaap-listener') diff --git a/.gitignore b/.gitignore index 8b49fb2aa..d11ed581b 100755 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ MANIFEST.MF ## Misc Ignores (OS specific etc) ## bin/ +lib/ dist *~ *.ipr diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 9c0ced010..75157318f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -19,7 +19,7 @@ 1.2.0-SNAPSHOT - 2.9.0.pr1 + 2.9.4 2.0 true /opt/app/dmaap-listener diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index b8ec986c1..4cb118045 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -17,9 +17,9 @@ UEB Listener - 1.1.32 - 1.1.32 - 2.9.0.pr1 + 1.3.0 + 1.3.0 + 2.9.4 true /opt/app/ueb-listener yyMMdd-HHmmss @@ -30,13 +30,13 @@ - org.openecomp.sdc.sdc-distribution-client + org.onap.sdc.sdc-distribution-client sdc-distribution-client ${sdc.client.version} compile - org.openecomp.sdc.sdc-tosca + org.onap.sdc.sdc-tosca sdc-tosca ${sdc.tosca.version} compile diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java index 65215593a..f285db162 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java @@ -21,10 +21,10 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.elements.Metadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 c77ad702a..315f3c381 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 @@ -24,11 +24,11 @@ package org.onap.ccsdk.sli.northbound.uebclient; import java.util.HashMap; import java.util.Map; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Group; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.Group; +import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.elements.Metadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java index 0a4931715..69f378796 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java @@ -21,9 +21,9 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.NodeTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java index 012c3d9e2..c1efadbdd 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncServiceModel.java @@ -21,9 +21,9 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.elements.Metadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index cf6a2ab25..8ea041e61 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -62,24 +62,24 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.tuple.Pair; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; import org.onap.ccsdk.sli.northbound.uebclient.SdncArtifactMap.SdncArtifactType; -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.consumer.IDistributionStatusMessage; -import org.openecomp.sdc.api.consumer.INotificationCallback; -import org.openecomp.sdc.api.notification.IArtifactInfo; -import org.openecomp.sdc.api.notification.INotificationData; -import org.openecomp.sdc.api.notification.IResourceInstance; -import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; -import org.openecomp.sdc.api.results.IDistributionClientResult; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; -import org.openecomp.sdc.toscaparser.api.Group; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; -import org.openecomp.sdc.utils.ArtifactTypeEnum; -import org.openecomp.sdc.utils.DistributionActionResultEnum; -import org.openecomp.sdc.utils.DistributionStatusEnum; +import org.onap.sdc.api.IDistributionClient; +import org.onap.sdc.api.consumer.IDistributionStatusMessage; +import org.onap.sdc.api.consumer.INotificationCallback; +import org.onap.sdc.api.notification.IArtifactInfo; +import org.onap.sdc.api.notification.INotificationData; +import org.onap.sdc.api.notification.IResourceInstance; +import org.onap.sdc.api.results.IDistributionClientDownloadResult; +import org.onap.sdc.api.results.IDistributionClientResult; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory; +import org.onap.sdc.toscaparser.api.Group; +import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.utils.ArtifactTypeEnum; +import org.onap.sdc.utils.DistributionActionResultEnum; +import org.onap.sdc.utils.DistributionStatusEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java index 0694a6da7..d37518f1b 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java @@ -21,10 +21,10 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.results.IDistributionClientResult; -import org.openecomp.sdc.impl.DistributionClientFactory; -import org.openecomp.sdc.utils.DistributionActionResultEnum; +import org.onap.sdc.api.IDistributionClient; +import org.onap.sdc.api.results.IDistributionClientResult; +import org.onap.sdc.impl.DistributionClientFactory; +import org.onap.sdc.utils.DistributionActionResultEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java index bf7dc88a5..0500954de 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java @@ -29,7 +29,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Properties; -import org.openecomp.sdc.api.consumer.IConfiguration; +import org.onap.sdc.api.consumer.IConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,6 +54,7 @@ public class SdncUebConfiguration implements IConfiguration{ private String sdncPasswd = null; private String asdcApiBaseUrl = null; private String asdcApiNamespace = null; + private List msgBusAddress = null; private SdncArtifactMap artifactMap = SdncArtifactMap.getInstance(); @@ -192,6 +193,16 @@ public class SdncUebConfiguration implements IConfiguration{ LOG.warn("artifact-map is unset"); } + msgBusAddress = new LinkedList<>(); + String msgBusAddressStr = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.msg-bus-address"); + if (msgBusAddressStr != null) { + String[] msgBusAddressArray = msgBusAddressStr.split(","); + for (int i = 0 ; i < msgBusAddressArray.length ; i++) { + msgBusAddress.add(msgBusAddressArray[i]); + } + } + + } @Override @@ -297,5 +308,10 @@ public class SdncUebConfiguration implements IConfiguration{ return false; } + @Override + public List getMsgBusAddress() { + return msgBusAddress; + } + } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java index 55814ac3a..d7ed19ea6 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java @@ -21,9 +21,9 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.NodeTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java index fd71527de..32f25c51d 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java @@ -21,10 +21,10 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.elements.Metadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java index 3663c97c3..60bc3c433 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModel.java @@ -21,9 +21,9 @@ package org.onap.ccsdk.sli.northbound.uebclient; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames; -import org.openecomp.sdc.toscaparser.api.Group; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; +import org.onap.sdc.toscaparser.api.Group; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java index 0d152e5e0..e8c7b1afd 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModelTest.java @@ -4,8 +4,8 @@ package org.onap.ccsdk.sli.northbound.uebclient; import static org.mockito.Mockito.*; import org.junit.Test; - import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; - import org.openecomp.sdc.toscaparser.api.NodeTemplate; + import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; + import org.onap.sdc.toscaparser.api.NodeTemplate; public class SdncARModelTest { diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java index 4a66c0201..9df89fb24 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java @@ -6,8 +6,8 @@ import static org.mockito.Mockito.*; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.toscaparser.api.NodeTemplate; public class SdncNodeModelTest { @@ -46,4 +46,4 @@ public class SdncNodeModelTest { String result = sdncNodeModel.getVpnBindingsSql(); assertNotNull(result); } -} \ No newline at end of file +} diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java index d2bafbf42..f03a09fcf 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModelTest.java @@ -6,8 +6,8 @@ import static org.mockito.Mockito.*; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.toscaparser.api.NodeTemplate; public class SdncVFCModelTest { @@ -33,4 +33,4 @@ public class SdncVFCModelTest { assertEquals(testSdncVFCModel.getVmCount(), "5"); } -} \ No newline at end of file +} diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java index 218554357..881018ef6 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModuleModelTest.java @@ -4,8 +4,8 @@ import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import org.junit.Test; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.toscaparser.api.Group; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.toscaparser.api.Group; public class SdncVFModuleModelTest { @@ -17,4 +17,4 @@ public class SdncVFModuleModelTest { assertNotNull(testSdncVFModel); } -} \ No newline at end of file +} diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java index 1fac0c299..1b4b22f42 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncOdlConnection.java @@ -6,8 +6,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.notification.INotificationData; +import org.onap.sdc.api.IDistributionClient; +import org.onap.sdc.api.notification.INotificationData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java index 21854f990..b53bdb392 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java @@ -18,10 +18,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; -import org.openecomp.sdc.api.IDistributionClient; -import org.openecomp.sdc.api.notification.IArtifactInfo; -import org.openecomp.sdc.api.notification.INotificationData; -import org.openecomp.sdc.api.notification.IResourceInstance; +import org.onap.sdc.api.IDistributionClient; +import org.onap.sdc.api.notification.IArtifactInfo; +import org.onap.sdc.api.notification.INotificationData; +import org.onap.sdc.api.notification.IResourceInstance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -- cgit 1.2.3-korg From 0dfc4dc597a6274228a21921467c32c0b49321f3 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Wed, 4 Apr 2018 18:26:08 -0700 Subject: Update docker tag convention Update docker tagging convention to use: v0.17.0-SNAPSHOT-YYYYMMDDTHHMMSSZ (for dev images) v0.17.0-STAGING-YYYYMMDDTHHMMSSZ (for staging images) Change-Id: I4065d25d11e6767903947ebee8c690a0c9ecc804 Issue-ID: CIMAN-132 Signed-off-by: Jessica Wagantall --- dmaap-listener/pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 9c0ced010..b7c1a2fb9 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -25,7 +25,7 @@ /opt/app/dmaap-listener 1.1.0-SNAPSHOT - yyMMdd-HHmmss + yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index b8ec986c1..3ec9f2a4a 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -22,7 +22,7 @@ 2.9.0.pr1 true /opt/app/ueb-listener - yyMMdd-HHmmss + yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} -- cgit 1.2.3-korg From 00dc2e8bc3ee13eb28335dd491a30897a3256c77 Mon Sep 17 00:00:00 2001 From: Serban Popescu Date: Wed, 18 Apr 2018 17:15:37 -0400 Subject: Update the version for dmaapclient Add support for Aai and Pserver incoming messages from Dmaap Change-Id: I4da41ec13c6abcb42eb4044bee82b7db33880c51 Issue-ID: CCSDK-223 Signed-off-by: Serban Popescu --- dmaap-listener/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index cd6b67966..5d4041e8a 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -23,7 +23,7 @@ 2.0 true /opt/app/dmaap-listener - 1.1.0-SNAPSHOT + 1.1.5-SNAPSHOT yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} -- cgit 1.2.3-korg From 1d53aedef097d095ba87ae656369706ff7f3c64b Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 24 Apr 2018 14:56:41 -0400 Subject: Add missing LCM blueprint Added blueprint descriptor for LCM to register RPC properly. Change-Id: I65d38cd9151f6094479413e06a44da02a7da4c74 Issue-ID: CCSDK-252 Signed-off-by: Timoney, Dan (dt5972) --- .gitignore | 1 + dmaap-listener/pom.xml | 2 +- .../resources/org/onap/appc/default.properties | 58 ----- .../src/main/resources/org/onap/appc/logback.xml | 287 --------------------- .../org/opendaylight/blueprint/lcm-blueprint.xml | 34 +++ 5 files changed, 36 insertions(+), 346 deletions(-) delete mode 100644 lcm/provider/src/main/resources/org/onap/appc/default.properties delete mode 100644 lcm/provider/src/main/resources/org/onap/appc/logback.xml create mode 100644 lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml (limited to 'dmaap-listener') diff --git a/.gitignore b/.gitignore index f9dd2d58a..d66d73564 100755 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ out/ provider/src/main/java/META-INF/ provider/src/main/java/inventory/ model/src/main/yang-gen-sal +yang-gen-sal/ ## BlackDuck generated file sdnc-northbound_bdio.jsonld diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 5d4041e8a..afae113a8 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -23,7 +23,7 @@ 2.0 true /opt/app/dmaap-listener - 1.1.5-SNAPSHOT + 1.1.5 yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} diff --git a/lcm/provider/src/main/resources/org/onap/appc/default.properties b/lcm/provider/src/main/resources/org/onap/appc/default.properties deleted file mode 100644 index 693cd37a8..000000000 --- a/lcm/provider/src/main/resources/org/onap/appc/default.properties +++ /dev/null @@ -1,58 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ONAP : APPC -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Copyright (C) 2017 Amdocs -# ============================================================================= -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# ============LICENSE_END========================================================= -### - -# -# This property file supplies the configuration defaults for the APP-C controller -# -# Default values are supplied so that all defined properties have well-known values and are -# valid even if a configuration file is not supplied. This is done to ensure that a runnable, -# stable, and defined configuration exists at all times. The reason the defaults are supplied -# via this property file and not in the code is so that the properties can be changed -# easily if needed in the future. Use of the "getProperty(name, default)" method is -# discouraged because if the default value needs to be changed, everywhere in the code it -# is used would have to be changed. By loading the defaults in this property file, all -# values can be defined in one place and support is easier. This does mean that all -# properties that are defined must have a default value supplied here. Which also means -# this file documents all defined properties (not a bad thing either). -# -#-------------------------------------------------------------------------------------------- -# The path and file used to load user-supplied configuration settings, if any -org.onap.appc.bootstrap.file=appc.properties -org.onap.appc.bootstrap.path=/opt/onap/appc/data/properties,${user.home},. - -appc.application.name=APPC - -# -# The path to search for logging configuration document, and the name of the document -# -org.onap.appc.logging.path=${user.home},etc,../etc,. -org.onap.appc.logging.file=logback.xml - -# -# The DG properties -# -appc.service.logic.module.name=APPC -appc.topology.dg.method=topology-operation-all -appc.topology.dg.version=2.0.0 - diff --git a/lcm/provider/src/main/resources/org/onap/appc/logback.xml b/lcm/provider/src/main/resources/org/onap/appc/logback.xml deleted file mode 100644 index 0dffe75e0..000000000 --- a/lcm/provider/src/main/resources/org/onap/appc/logback.xml +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger - %msg%n - - - - - - - - - - ${logDirectory}/cdp.log - - ${logDirectory}/cdp.%i.log.zip - - 1 - 9 - - - 5MB - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger [%X{User} %X{RemoteHost} %X{RequestId} %X{Method} - %X{Path}] - %msg%n - - - - 256 - - - - - - ${logDirectory}/cdp-security.log - - ${logDirectory}/cdp-security.%i.log.zip - - 1 - 9 - - - 5MB - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger [%X{User} %X{RemoteHost} %X{RequestId} %X{Method} - %X{Path}] - %msg%n - - - - 256 - 0 - - - - - - ${logDirectory}/cdp-performance.log - - ${logDirectory}/cdp-performance.%i.log.zip - - 1 - 9 - - - 5MB - - - true - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger [%X{User} %X{RemoteHost} %X{RequestId} %X{Method} - %X{Path}] - %msg%n - - - - 256 - - - - - - ${logDirectory}/cdp-server.log - - ${logDirectory}/cdp-server.%i.log.zip - - 1 - 9 - - - 5MB - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger [%X{User} %X{RemoteHost} %X{RequestId} %X{Method} - %X{Path}] - %msg%n - - - - 256 - - - - - - ${logDirectory}/cdp-coordinator.log - - ${logDirectory}/cdp-coordinator.%i.log.zip - - 1 - 9 - - - 5MB - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger - %msg%n - - - - 256 - - - - - - ${logDirectory}/cdp-policy.log - - ${logDirectory}/cdp-policy.%i.log.zip - - 1 - 9 - - - 5MB - - - - %d{MM/dd-HH:mm:ss.SSS} [%-16thread] %.-5level - %-36.36logger - %msg%n - - - - 256 - - - - ${debugLogDirectory}/appc-debug.log - - ${logDirectory}/command-executor.%i.log.zip - - 1 - 9 - - - 5MB - - - - - %d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%t|%X{ServiceName} - %X{bundle.id} - %X{bundle.name} - %X{bundle.version}|%X{InstanceUUID}|%-5.5p|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%c{3}]|%m%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml b/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml new file mode 100644 index 000000000..5597d0801 --- /dev/null +++ b/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit 1.2.3-korg From 6c328a8158c7d3d641da5e9237e917450a2bdf52 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Sun, 29 Apr 2018 19:19:06 -0400 Subject: Roll versions step 4 : sli/northbound poms Roll version for next release candidate. Change-Id: I5c564fd2119b3a97433cb03b5678465915d75128 Issue-ID: CCSDK-257 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 25 files changed, 49 insertions(+), 49 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 061e5edc8..755d29945 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 2ac8f59d8..dd81cb56f 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 5b940021c..e6cc81930 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index aac236bde..aba5abab0 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 27e5905b9..1fa0b450e 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 78c2fcb6b..5816a55c7 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 3f33af028..13e98f4df 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 5d38e33c2..f80a9301b 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 470f95bde..8dfc21a7e 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index c32e72ce7..b5a14fa49 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index f67669931..1a1bb772e 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 2b3851690..cfec92996 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index cd1cd9683..9f4abe79f 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 1722912ce..2d45b034f 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index afae113a8..40c6ee6cc 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index e7440c6d8..b2c6a5546 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 6af726dc2..36e7cdc8d 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 590d5aa29..17195079e 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 7c9c827d8..411847a80 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 6d8589e19..b3f9caa1b 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 6bf401f2e..78667eeb0 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index ce9e6eb91..b3a3c692f 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index c83f83a20..5dcaa7a8a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT 4.0.0 @@ -113,7 +113,7 @@ ONAP - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 9c49a85b2..7ac59bce2 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.2.1-SNAPSHOT + 0.2.2-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index ebb19b8f6..2242188bd 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=2 -feature_revision=1 +feature_revision=2 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From c0299b921494a59940ab8575a00f1fc11503f1e6 Mon Sep 17 00:00:00 2001 From: Ruchira Agarwal Date: Thu, 3 May 2018 15:27:29 +0000 Subject: LCM Comsumer for DmaapClient Add LCM Consumer to DmaapCient for Software-Upgrade Change-Id: I0bda76bcd324dda92a6ccb225fd5a059414661f0 Issue-ID: CCSDK-263 Signed-off-by: Ruchira Agarwal --- .../dmaapclient/SdncLcmDmaapConsumer.java | 104 +++++++++++++ .../dmaapclient/TestSdncLcmDmaapConsumer.java | 166 +++++++++++++++++++++ 2 files changed, 270 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncLcmDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java new file mode 100644 index 000000000..eb29111dc --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java @@ -0,0 +1,104 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncLcmDmaapConsumer extends SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory.getLogger(SdncLcmDmaapConsumer.class); + + private static final String PARTITION = "cambria.partition"; + private static final String PARTITION_VALUE = "SDNC"; + private static final String BODY = "body"; + private static final String RPC = "rpc-name"; + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null LCM message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode lcmRootNode; + try { + lcmRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse LCM json input", e); + } + + JsonNode partitionNode = lcmRootNode.get(PARTITION); + if (partitionNode != null) + { + String partition = partitionNode.textValue(); + if(PARTITION_VALUE.equals(partition) == false) { + LOG.warn("Unknown Partition in LCM message- " + partition); + return; + } + } + + JsonNode bodyNode = lcmRootNode.get(BODY); + if(bodyNode == null) { + LOG.warn("Missing body in LCM message"); + return; + } + String rpcMsgbody; + try { + ObjectMapper mapper = new ObjectMapper(); + rpcMsgbody = mapper.writeValueAsString(bodyNode); + + } catch (Exception e) { + LOG.error("Unable to parse body in LCM message", e); + return; + } + + JsonNode rpcNode = lcmRootNode.get(RPC); + if(rpcNode == null) { + LOG.warn("Missing node in LCM message- " + RPC); + return; + } + String rpc = rpcNode.textValue(); + String sdncEndpoint = "LCM:" + rpc; + + try { + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + LOG.info("POST LCM Request " + rpcMsgbody); + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.warn("Unable to POST LCM message. SDNC URL not available. body:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } +} + diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncLcmDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncLcmDmaapConsumer.java new file mode 100644 index 000000000..4073b5542 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncLcmDmaapConsumer.java @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestSdncLcmDmaapConsumer { + private static final String lcmInput = + "{\r\n" + + " \"version\": \"lcm-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"lcm-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"lcm-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"lcm-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"lcm-dmaap.flags.mode\",\r\n" + + " \"force\": \"lcm-dmaap.flags.force\",\r\n" + + " \"mode\": \"lcm-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"lcm-dmaap.originator-id\",\r\n" + + " \"request-id\": \"lcm-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"lcm-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"lcm-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"lcm-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + + @Test + public void test() throws Exception { + Properties props = new Properties(); + + SdncLcmDmaapConsumer consumer = new SdncLcmDmaapConsumer(); + InputStream propStr = TestSdncLcmDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-1.properties"); + props.load(propStr); + consumer.init(props, "src/test/resources/dmaap-consumer-1.properties"); + consumer.processMsg(lcmInput); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + SdncLcmDmaapConsumer consumer = new SdncLcmDmaapConsumer(); + consumer.processMsg(null); + } + + @Test + public void testProcessMsgMissingBody() throws Exception { + String msg = "{\r\n" + + " \"version\": \"lcm-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"lcm-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"lcm-dmaap.type\",\r\n" + + " \"body1\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"lcm-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"lcm-dmaap.flags.mode\",\r\n" + + " \"force\": \"lcm-dmaap.flags.force\",\r\n" + + " \"mode\": \"lcm-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"lcm-dmaap.originator-id\",\r\n" + + " \"request-id\": \"lcm-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"lcm-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"lcm-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"lcm-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + SdncLcmDmaapConsumer consumer = new SdncLcmDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidRPC() throws Exception { + String msg = "{\r\n" + + " \"version\": \"lcm-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"lcm-dmaap.correlation-id\",\r\n" + + " \"rpc-name1\": \"upgrade-software\",\r\n" + + " \"type\": \"lcm-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"lcm-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"lcm-dmaap.flags.mode\",\r\n" + + " \"force\": \"lcm-dmaap.flags.force\",\r\n" + + " \"mode\": \"lcm-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"lcm-dmaap.originator-id\",\r\n" + + " \"request-id\": \"lcm-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"lcm-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"lcm-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"lcm-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + SdncLcmDmaapConsumer consumer = new SdncLcmDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidPartition() throws Exception { + String msg = "{\r\n" + + " \"version\": \"lcm-dmaap.version\",\r\n" + + " \"cambria.partition\": \"BAD\",\r\n" + + " \"correlation-id\": \"lcm-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"lcm-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"lcm-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"lcm-dmaap.flags.mode\",\r\n" + + " \"force\": \"lcm-dmaap.flags.force\",\r\n" + + " \"mode\": \"lcm-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"lcm-dmaap.originator-id\",\r\n" + + " \"request-id\": \"lcm-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"lcm-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"lcm-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"lcm-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + + SdncLcmDmaapConsumer consumer = new SdncLcmDmaapConsumer(); + consumer.processMsg(msg); + } +} -- cgit 1.2.3-korg From 17ace0efb1445bfb1239222b3e1249e66e677cc0 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 17 May 2018 18:58:12 -0400 Subject: Update sli/northbound to use 1.0.2 parent Update pom.xmls to use released 1.0.2 version of parent pom Change-Id: Iccb3d5fbc92fd4177220f307178ac8a95ce0e7d5 Issue-ID: CCSDK-286 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 755d29945..697ac1315 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index dd81cb56f..6f363251a 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index e6cc81930..1adde8276 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index aba5abab0..16c6ace23 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 1fa0b450e..ac825aeab 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 5816a55c7..8fcef91fa 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 13e98f4df..b3a08b1b9 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index f80a9301b..b1bed1b13 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 8dfc21a7e..79927ba09 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index b5a14fa49..4d2a36c39 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 1a1bb772e..6e57a01d6 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index cfec92996..34ccc0932 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 9f4abe79f..ea747422e 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 2d45b034f..f62139d27 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 40c6ee6cc..2bb6dcf0f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 org.onap.ccsdk.sli.northbound diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index b2c6a5546..ea76bcafe 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 36e7cdc8d..a9c1a8201 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 17195079e..550a00947 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 411847a80..8df9f98f3 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index b3f9caa1b..fc0c984ef 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/lcm/pom.xml b/lcm/pom.xml index 78667eeb0..eb1fb7ef2 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index b3a3c692f..7738cd8ff 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/pom.xml b/pom.xml index 5dcaa7a8a..15f3d6bf0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 7ac59bce2..1190d5d1f 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2-SNAPSHOT + 1.0.2 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From 202e3a705381883acc89bf62159493fbaf8d1da8 Mon Sep 17 00:00:00 2001 From: "Stilwell, David (stilwelld)" Date: Wed, 23 May 2018 12:44:08 -0400 Subject: Roll to next snapshot version Roll to version 0.2.3-SNAPSHOT and update parent to 1.0.3-SNAPSHOT Change-Id: I88e11e78f61099f5b2e69b2161cf7c65b5a860e1 Issue-ID: CCSDK-290 Signed-off-by: Stilwell, David (stilwelld) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 25 files changed, 49 insertions(+), 49 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 697ac1315..3331a0590 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 6f363251a..fc3bfd823 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 1adde8276..2e83324f1 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 16c6ace23..08fce1957 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index ac825aeab..057d839fd 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 8fcef91fa..0fd87994a 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index b3a08b1b9..0bb695fad 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index b1bed1b13..e0994244d 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 79927ba09..fbd361ac4 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 4d2a36c39..002c9a614 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 6e57a01d6..19aa8289d 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 34ccc0932..2a7a2f821 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index ea747422e..8b631c66a 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index f62139d27..48aeecd21 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 2bb6dcf0f..b700b5c96 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index ea76bcafe..af6882bdc 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index a9c1a8201..c52debcc5 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 550a00947..e3352ff3d 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 8df9f98f3..63891ebec 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index fc0c984ef..19a483cda 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index eb1fb7ef2..18c808e9f 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 7738cd8ff..eb95e6b05 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 15f3d6bf0..a6af9870d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 @@ -113,7 +113,7 @@ ONAP - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 1190d5d1f..05e1d38d6 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.2 + 1.0.3-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.2.2-SNAPSHOT + 0.2.3-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 2242188bd..5d5ee0480 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=2 -feature_revision=2 +feature_revision=3 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From b05d1c70707af00ec6a5bc7e9b121503a4e1d9d0 Mon Sep 17 00:00:00 2001 From: "Stilwell, David (stilwelld)" Date: Wed, 23 May 2018 17:14:33 -0400 Subject: Update to release version parent 1.0.3 Update parent version to remove -SNAPSHOT (1.0.3) Change-Id: I22f2cdbdc194e343dd6b04a371e298294f569477 Issue-ID: CCSDK-290 Signed-off-by: Stilwell, David (stilwelld) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 3331a0590..9de855881 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index fc3bfd823..3848cc5de 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 2e83324f1..3179285e6 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 08fce1957..8a98ec708 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 057d839fd..883738512 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 0fd87994a..3da1104b2 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 0bb695fad..4ab40a1b2 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index e0994244d..2cdd7e448 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index fbd361ac4..3097e09af 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 002c9a614..ee855aac3 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 19aa8289d..a5a43230b 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 2a7a2f821..478086b62 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 8b631c66a..b3c719f62 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 48aeecd21..03fb4a442 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index b700b5c96..0771bf2c5 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 org.onap.ccsdk.sli.northbound diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index af6882bdc..8aa21f973 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index c52debcc5..1a8dbc688 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index e3352ff3d..d41436f89 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 63891ebec..051394e0c 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 19a483cda..cfcda0199 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/lcm/pom.xml b/lcm/pom.xml index 18c808e9f..571121b58 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index eb95e6b05..13ea2384d 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/pom.xml b/pom.xml index a6af9870d..75c1d4846 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 05e1d38d6..259ed06a2 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3-SNAPSHOT + 1.0.3 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From e377e0205a7448af0c8c04dd349c018069d96ddf Mon Sep 17 00:00:00 2001 From: Ruchira Agarwal Date: Wed, 30 May 2018 21:39:35 +0000 Subject: LCMConsumer fix Remove partition edit Change-Id: Id4861a7c4bb46775b770d3511b7cf50f8c49637f Issue-ID: CCSDK-292 Signed-off-by: Ruchira Agarwal --- .../ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java index eb29111dc..53fb6db0f 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java @@ -50,16 +50,6 @@ public class SdncLcmDmaapConsumer extends SdncDmaapConsumer { } catch (Exception e) { throw new InvalidMessageException("Cannot parse LCM json input", e); } - - JsonNode partitionNode = lcmRootNode.get(PARTITION); - if (partitionNode != null) - { - String partition = partitionNode.textValue(); - if(PARTITION_VALUE.equals(partition) == false) { - LOG.warn("Unknown Partition in LCM message- " + partition); - return; - } - } JsonNode bodyNode = lcmRootNode.get(BODY); if(bodyNode == null) { -- cgit 1.2.3-korg From 08ce0be92bae13a44287a9d05cc395ea75a74ccd Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 30 May 2018 18:12:11 -0400 Subject: Roll version to 0.2.4 Roll version to 0.2.4-SNAPSHOT and version 1.0.4-SNAPSHOT of parent Change-Id: I7b4ad7a2f69e821d91603d2e2a1ae28e0f8e0558 Issue-ID: CCSDK-291 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 25 files changed, 49 insertions(+), 49 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 9de855881..3739ee920 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 3848cc5de..3864e139a 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 3179285e6..d02608004 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 8a98ec708..86bf6a2c5 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 883738512..70d6d22fc 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 3da1104b2..27575f3d9 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 4ab40a1b2..405ede6a8 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 2cdd7e448..15825e6f2 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 3097e09af..26ddd013f 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index ee855aac3..82744b03a 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index a5a43230b..4edac1d48 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 478086b62..d5ecb3319 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index b3c719f62..906205257 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 03fb4a442..ab388b1bc 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 0771bf2c5..4b3b0a79b 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 8aa21f973..a9cb09e37 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 1a8dbc688..660f18fbb 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index d41436f89..7b16e1dd6 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 051394e0c..d08118614 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index cfcda0199..fa942b428 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 571121b58..43fa4c0a5 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 13ea2384d..9f2b8d50c 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 75c1d4846..8e093b2f7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT 4.0.0 @@ -113,7 +113,7 @@ ONAP - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 259ed06a2..142be5260 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.3 + 1.0.4-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 5d5ee0480..de7eeb4b6 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=2 -feature_revision=3 +feature_revision=4 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 0f3fdfae6226b86ffc49e39b365eb149fce0e35f Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 31 May 2018 14:25:35 -0400 Subject: Use released parent pom Update to use release parent pom version 1.0.4 Change-Id: I654a95992e0740cfda9339098ed7eb4f32aaab4f Issue-ID: CCSDK-291 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 3739ee920..e72b924f3 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 3864e139a..abd7d234a 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index d02608004..2b207e696 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 86bf6a2c5..58f1ee864 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 70d6d22fc..4d18f8e89 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 27575f3d9..3f37d6717 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 405ede6a8..0cae44f90 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 15825e6f2..c5ce3ee5b 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 26ddd013f..ce6db8f06 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 82744b03a..75a694246 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 4edac1d48..e7dbcbe0e 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index d5ecb3319..2407d36bc 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 906205257..324431d2f 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index ab388b1bc..4c5c8bb12 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 4b3b0a79b..6e8b2c051 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 org.onap.ccsdk.sli.northbound diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index a9cb09e37..c32e9927e 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 660f18fbb..4784a1cf3 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 7b16e1dd6..d53e28601 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index d08118614..3328b89d8 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index fa942b428..d24d45ef1 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/lcm/pom.xml b/lcm/pom.xml index 43fa4c0a5..70a45321d 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 9f2b8d50c..39ab9f07f 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/pom.xml b/pom.xml index 8e093b2f7..435c833ae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 142be5260..c1797628d 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4-SNAPSHOT + 1.0.4 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From f1b7fecfbe875059793a6ece34b3743f379bb030 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Tue, 5 Jun 2018 15:57:12 +0000 Subject: Introduce new dmaapClient for use with ccsdk Create an interface and turn existing class into impl file. Write new client which implements the new interface Change-Id: I127bef09bd7f07556a18b753e428e3cd75f5f498 Issue-ID: CCSDK-294 Signed-off-by: Smokowski, Kevin (ks6305) --- dmaap-listener/pom.xml | 15 +- .../northbound/dmaapclient/DummyDmaapConsumer.java | 2 +- .../dmaapclient/MessageRouterHttpClient.java | 194 +++++++++++++++++++++ .../dmaapclient/SdncAaiDmaapConsumer.java | 8 +- .../dmaapclient/SdncDhcpEventConsumer.java | 7 +- .../northbound/dmaapclient/SdncDmaapConsumer.java | 134 +------------- .../dmaapclient/SdncDmaapConsumerImpl.java | 159 +++++++++++++++++ .../dmaapclient/SdncFlatJsonDmaapConsumer.java | 8 +- .../dmaapclient/SdncLcmDmaapConsumer.java | 2 +- 9 files changed, 383 insertions(+), 146 deletions(-) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6e8b2c051..85f3028fa 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -30,6 +30,17 @@ ${project.version}-${build.number} + + + + + javax.ws.rs + javax.ws.rs-api + 2.1 + + + + @@ -105,8 +116,8 @@ 2.5.1 true - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java index a8336342f..57fcd8809 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DummyDmaapConsumer.java @@ -24,7 +24,7 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DummyDmaapConsumer extends SdncDmaapConsumer { +public class DummyDmaapConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory .getLogger(DummyDmaapConsumer.class); diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java new file mode 100644 index 000000000..234a2026b --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java @@ -0,0 +1,194 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.net.URI; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Properties; +import java.util.concurrent.TimeUnit; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Invocation; +import javax.ws.rs.client.Invocation.Builder; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/* + * jax-rs based client to build message router consumers + */ +public class MessageRouterHttpClient implements SdncDmaapConsumer { + private static final Logger Log = LoggerFactory.getLogger(MessageRouterHttpClient.class); + + protected Boolean isReady = false; + protected Boolean isRunning = false; + protected Client client; + protected URI uri; + protected Invocation getMessages; + protected Integer fetchPause; + protected Properties properties; + protected final String DEFAULT_CONNECT_TIMEOUT_SECONDS = "30"; + protected final String DEFAULT_READ_TIMEOUT_MINUTES = "3"; + protected final String DEFAULT_TIMEOUT_QUERY_PARAM_VALUE = "15000"; + protected final String DEFAULT_LIMIT = null; + + public MessageRouterHttpClient() { + + } + + @Override + public void run() { + if (isReady) { + isRunning = true; + while (isRunning) { + try { + Response response = getMessages.invoke(); + Log.info("GET " + uri + " returned http status " + response.getStatus()); + String entity = response.readEntity(String.class); + if (entity.contains("{")) { + // Get rid of opening [" + entity = entity.substring(2); + // Get rid of closing "] + entity = entity.substring(0, entity.length() - 2); + // This replacement effectively un-escapes the JSON + for (String message : entity.split("\",\"")) { + try { + processMsg(message.replace("\\\"", "\"")); + } catch (InvalidMessageException e) { + Log.error("Message could not be processed", e); + } + } + } else { + Log.info("Entity doesn't appear to contain JSON elements"); + } + } catch (Exception e) { + Log.error("GET " + uri + " failed.", e); + } finally { + Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + uri + " again."); + try { + Thread.sleep(fetchPause); + } catch (InterruptedException e) { + Log.error("Could not sleep thread", e); + } + } + } + } + } + + @Override + public void init(Properties baseProperties, String consumerPropertiesPath) { + try { + baseProperties.load(new FileInputStream(new File(consumerPropertiesPath))); + this.properties = baseProperties; + String username = baseProperties.getProperty("username"); + String password = baseProperties.getProperty("password"); + String topic = baseProperties.getProperty("topic"); + String group = baseProperties.getProperty("group"); + String host = baseProperties.getProperty("host"); + String id = baseProperties.getProperty("id"); + + String filter = baseProperties.getProperty("filter"); + if (filter != null) { + if (filter.length() > 0) { + filter = URLEncoder.encode(filter, StandardCharsets.UTF_8.name()); + } else { + filter = null; + } + } + + String limitString = baseProperties.getProperty("limit", DEFAULT_LIMIT); + Integer limit = null; + if (limitString != null && limitString.length() > 0) { + limit = Integer.valueOf(limitString); + } + + Integer timeoutQueryParamValue = + Integer.valueOf(baseProperties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); + Integer connectTimeoutSeconds = Integer + .valueOf(baseProperties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT_SECONDS)); + Integer readTimeoutMinutes = + Integer.valueOf(baseProperties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT_MINUTES)); + + String authorizationString = buildAuthorizationString(username, password); + this.uri = buildUri(topic, group, id, host, timeoutQueryParamValue, limit, filter); + this.client = getClient(connectTimeoutSeconds, readTimeoutMinutes); + Builder builder = + client.target(uri).request("application/json").header("Authorization", authorizationString); + this.getMessages = builder.buildGet(); + this.fetchPause = Integer.valueOf(baseProperties.getProperty("fetchPause")); + this.isReady = true; + } catch (FileNotFoundException e) { + Log.error("FileNotFoundException while reading consumer properties", e); + } catch (IOException e) { + Log.error("IOException while reading consumer properties", e); + } + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + System.out.println(msg); + } + + @Override + public boolean isReady() { + return isReady; + } + + @Override + public boolean isRunning() { + return isRunning; + } + + protected String buildAuthorizationString(String userName, String password) { + String basicAuthString = userName + ":" + password; + basicAuthString = Base64.getEncoder().encodeToString(basicAuthString.getBytes()); + return "Basic " + basicAuthString; + } + + protected Client getClient(Integer connectTimeoutSeconds, Integer readTimeoutMinutes) { + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + clientBuilder.connectTimeout(connectTimeoutSeconds, TimeUnit.SECONDS); + clientBuilder.readTimeout(readTimeoutMinutes, TimeUnit.MINUTES); + return clientBuilder.build(); + } + + protected URI buildUri(String topic, String consumerGroup, String consumerId, String host, Integer timeout, + Integer limit, String filter) { + UriBuilder builder = UriBuilder.fromPath("http://" + host + "/events/{topic}/{consumerGroup}/{consumderId}"); + builder.queryParam("timeout", timeout); + if (limit != null) { + builder.queryParam("limit", limit); + } + if (filter != null) { + builder.queryParam("filter", filter); + } + return builder.build(topic, consumerGroup, consumerId); + } + +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index 0e12dfa2e..2c4de7104 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -21,9 +21,6 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @@ -34,14 +31,15 @@ import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.Properties; - import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; -public class SdncAaiDmaapConsumer extends SdncDmaapConsumer { +public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory.getLogger(SdncAaiDmaapConsumer.class); private static final String SDNC_ENDPOINT = "SDNC.endpoint"; diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java index 03560d309..7b68ceb63 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDhcpEventConsumer.java @@ -5,19 +5,14 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.SQLException; -import java.util.Iterator; -import java.util.Map; import java.util.Properties; - import org.onap.ccsdk.sli.core.dblib.DBResourceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -public class SdncDhcpEventConsumer extends SdncDmaapConsumer { +public class SdncDhcpEventConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory.getLogger(SdncDhcpEventConsumer.class); private static final String MAC_ADDR_TAG = "macaddr"; diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java index 2b416e7db..3fc769d35 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumer.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * openECOMP : SDN-C * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,134 +21,14 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; -import com.att.nsa.mr.client.MRClientFactory; -import com.att.nsa.mr.client.MRConsumer; -import com.att.nsa.mr.client.response.MRConsumerResponse; -import java.io.File; -import java.io.FileInputStream; import java.util.Properties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -public abstract class SdncDmaapConsumer implements Runnable { +public abstract interface SdncDmaapConsumer extends Runnable { + public abstract void init(Properties baseProperties, String consumerPropertiesPath); - private static final Logger LOG = LoggerFactory - .getLogger(SdncDmaapConsumer.class); + public abstract void processMsg(String msg) throws InvalidMessageException; - private Properties properties = null; - private MRConsumer consumer = null; - private MRConsumerResponse consumerResponse = null; - private boolean running = false; - private boolean ready = false; - private int fetchPause = 5000; // Default pause between fetch - 5 seconds - private int timeout = 15000; // Default timeout - 15 seconds + public abstract boolean isReady(); - public SdncDmaapConsumer() { - - } - - public SdncDmaapConsumer(Properties properties, String propertiesPath) { - init(properties, propertiesPath); - } - - public boolean isReady() { - return ready; - } - - public boolean isRunning() { - return running; - } - - public String getProperty(String name) { - return properties.getProperty(name, ""); - } - - public void init(Properties properties, String propertiesPath) { - - try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { - - LOG.debug("propertiesPath: " + propertiesPath); - this.properties = (Properties) properties.clone(); - this.properties.load(in); - - - String timeoutStr = this.properties.getProperty("timeout"); - LOG.debug("timeoutStr: " + timeoutStr); - - if ((timeoutStr != null) && (timeoutStr.length() > 0)) { - timeout = parseTimeOutValue(timeoutStr); - } - - String fetchPauseStr = this.properties.getProperty("fetchPause"); - LOG.debug("fetchPause(Str): " + fetchPauseStr); - if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { - fetchPause = parseFetchPause(fetchPauseStr); - } - LOG.debug("fetchPause: " + fetchPause); - - - this.consumer = MRClientFactory.createConsumer(propertiesPath); - ready = true; - } catch (Exception e) { - LOG.error("Error initializing DMaaP consumer from file " + propertiesPath, e); - } - } - - private int parseTimeOutValue(String timeoutStr) { - try { - return Integer.parseInt(timeoutStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric value specified for timeout (" + timeoutStr + ")"); - } - return timeout; - } - - private int parseFetchPause(String fetchPauseStr) { - try { - return Integer.parseInt(fetchPauseStr); - } catch (NumberFormatException e) { - LOG.error("Non-numeric value specified for fetchPause (" + fetchPauseStr + ")"); - } - return fetchPause; - } - - - @Override - public void run() { - if (ready) { - - running = true; - - while (running) { - - try { - boolean noData = true; - consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); - for (String msg : consumerResponse.getActualMessages()) { - noData = false; - LOG.info("Received message from DMaaP:\n" + msg); - processMsg(msg); - } - - if (noData) { - pauseThread(); - } - } catch (Exception e) { - LOG.error("Caught exception reading from DMaaP", e); - running = false; - } - } - } - } - - private void pauseThread() throws InterruptedException { - if (fetchPause > 0) { - LOG.info(String.format("No data received from fetch. Pausing %d ms before retry", fetchPause)); - Thread.sleep(fetchPause); - } else { - LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); - } - } - - abstract public void processMsg(String msg) throws InvalidMessageException; + public abstract boolean isRunning(); } diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java new file mode 100644 index 000000000..ddd871327 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java @@ -0,0 +1,159 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.att.nsa.mr.client.MRClientFactory; +import com.att.nsa.mr.client.MRConsumer; +import com.att.nsa.mr.client.response.MRConsumerResponse; + +public abstract class SdncDmaapConsumerImpl implements SdncDmaapConsumer { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncDmaapConsumer.class); + + private final String name = this.getClass().getSimpleName(); + private Properties properties = null; + private MRConsumer consumer = null; + private MRConsumerResponse consumerResponse = null; + private boolean running = false; + private boolean ready = false; + private int fetchPause = 5000; // Default pause between fetch - 5 seconds + private int timeout = 15000; // Default timeout - 15 seconds + + public SdncDmaapConsumerImpl() { + + } + + public SdncDmaapConsumerImpl(Properties properties, String propertiesPath) { + init(properties, propertiesPath); + } + + public boolean isReady() { + return ready; + } + + public boolean isRunning() { + return running; + } + + public String getProperty(String name) { + return properties.getProperty(name, ""); + } + + public void init(Properties properties, String propertiesPath) { + + try (FileInputStream in = new FileInputStream(new File(propertiesPath))) { + + LOG.debug("propertiesPath: " + propertiesPath); + this.properties = (Properties) properties.clone(); + this.properties.load(in); + + + String timeoutStr = this.properties.getProperty("timeout"); + LOG.debug("timeoutStr: " + timeoutStr); + + if ((timeoutStr != null) && (timeoutStr.length() > 0)) { + timeout = parseTimeOutValue(timeoutStr); + } + + String fetchPauseStr = this.properties.getProperty("fetchPause"); + LOG.debug("fetchPause(Str): " + fetchPauseStr); + if ((fetchPauseStr != null) && (fetchPauseStr.length() > 0)) { + fetchPause = parseFetchPause(fetchPauseStr); + } + LOG.debug("fetchPause: " + fetchPause); + + + this.consumer = MRClientFactory.createConsumer(propertiesPath); + ready = true; + } catch (Exception e) { + LOG.error("Error initializing DMaaP consumer from file " + propertiesPath, e); + } + } + + private int parseTimeOutValue(String timeoutStr) { + try { + return Integer.parseInt(timeoutStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for timeout (" + timeoutStr + ")"); + } + return timeout; + } + + private int parseFetchPause(String fetchPauseStr) { + try { + return Integer.parseInt(fetchPauseStr); + } catch (NumberFormatException e) { + LOG.error("Non-numeric value specified for fetchPause (" + fetchPauseStr + ")"); + } + return fetchPause; + } + + + @Override + public void run() { + if (ready) { + + running = true; + + while (running) { + + try { + boolean noData = true; + consumerResponse = consumer.fetchWithReturnConsumerResponse(timeout, -1); + for (String msg : consumerResponse.getActualMessages()) { + noData = false; + LOG.info(name + " received ActualMessage from DMaaP:\n"+msg); + processMsg(msg); + } + + if (noData) { + LOG.info(name + " received ResponseCode: " + consumerResponse.getResponseCode()); + LOG.info(name + " received ResponseMessage: " + consumerResponse.getResponseMessage()); + pauseThread(); + } + } catch (Exception e) { + LOG.error("Caught exception reading from DMaaP", e); + running = false; + } + + + } + } + } + + private void pauseThread() throws InterruptedException { + if (fetchPause > 0) { + LOG.info(String.format("No data received from fetch. Pausing %d ms before retry", fetchPause)); + Thread.sleep(fetchPause); + } else { + LOG.info("No data received from fetch. No fetch pause specified - retrying immediately"); + } + } + + abstract public void processMsg(String msg) throws InvalidMessageException; +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java index 06e8ebe95..6c90c7199 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncFlatJsonDmaapConsumer.java @@ -21,9 +21,6 @@ package org.onap.ccsdk.sli.northbound.dmaapclient; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @@ -32,9 +29,12 @@ import java.util.Iterator; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; -public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumer { +public class SdncFlatJsonDmaapConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory.getLogger(SdncFlatJsonDmaapConsumer.class); diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java index 53fb6db0f..04f520bd9 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java @@ -27,7 +27,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class SdncLcmDmaapConsumer extends SdncDmaapConsumer { +public class SdncLcmDmaapConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory.getLogger(SdncLcmDmaapConsumer.class); -- cgit 1.2.3-korg From 751d50b2b5b668355ddf22d007610cac700b41b1 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 6 Jun 2018 14:03:24 -0400 Subject: Roll versions for Casablanca - sli/northbound Roll version to 0.3.0-SNAPSHOT for Casablanca development Change-Id: If71c3945b2da6f64f9eb1b1fdc92ba62c11f1886 Issue-ID: CCSDK-295 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 6 +++--- 25 files changed, 51 insertions(+), 51 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index e72b924f3..c4c7b7fad 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index abd7d234a..6b6ac64dc 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 2b207e696..a8a493591 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 58f1ee864..f3e3b44d8 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 4d18f8e89..1cb8af920 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 3f37d6717..292a4f363 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 0cae44f90..d52c702ba 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index c5ce3ee5b..bbe3e417d 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index ce6db8f06..bc673fddb 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 75a694246..a9543ab2a 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index e7dbcbe0e..007a34e96 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 2407d36bc..26134c3e8 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 324431d2f..6c23fc48f 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 4c5c8bb12..59d58ac43 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6e8b2c051..4dc121565 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index c32e9927e..9a0e0806a 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 4784a1cf3..71e729284 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index d53e28601..705360200 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 3328b89d8..92e04bc69 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index d24d45ef1..afa844ae6 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 70a45321d..2bc81749b 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 39ab9f07f..23efb6e4e 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 435c833ae..979b78173 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT 4.0.0 @@ -113,7 +113,7 @@ ONAP - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index c1797628d..205c5c907 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.0.4 + 1.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.2.4-SNAPSHOT + 0.3.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index de7eeb4b6..f9fd33500 100644 --- a/version.properties +++ b/version.properties @@ -4,11 +4,11 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=0 -sprint_number=2 -feature_revision=4 +sprint_number=3 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version} +release_version=${base_version}-STAGING snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From a07b57086dd5c9c04f2b20a092da9935c7c5f817 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Fri, 22 Jun 2018 18:32:27 +0000 Subject: check for null usernamd and password only populate auth header if credentials are provided, this support was requested by a client Change-Id: I2fb60995260506a29482d340a031dfad72348b8c Issue-ID: CCSDK-310 Signed-off-by: Smokowski, Kevin (ks6305) --- .../sli/northbound/dmaapclient/MessageRouterHttpClient.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java index 234a2026b..d261d1c49 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java @@ -135,11 +135,14 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer { Integer readTimeoutMinutes = Integer.valueOf(baseProperties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT_MINUTES)); - String authorizationString = buildAuthorizationString(username, password); + Builder builder = client.target(uri).request("application/json"); + if (username != null && password != null && username.length() > 0 && password.length() > 0) { + String authorizationString = buildAuthorizationString(username, password); + builder.header("Authorization", authorizationString); + } this.uri = buildUri(topic, group, id, host, timeoutQueryParamValue, limit, filter); this.client = getClient(connectTimeoutSeconds, readTimeoutMinutes); - Builder builder = - client.target(uri).request("application/json").header("Authorization", authorizationString); + this.getMessages = builder.buildGet(); this.fetchPause = Integer.valueOf(baseProperties.getProperty("fetchPause")); this.isReady = true; -- cgit 1.2.3-korg From bef4edce8d51394a33fb0de4e57de6f1a39c3b39 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Thu, 28 Jun 2018 20:56:05 +0000 Subject: additional mr client additional mr client, fewer dependencies Change-Id: I36168fd6e82846a889cd9a01aadf2462bb767723 Issue-ID: CCSDK-327 Signed-off-by: Smokowski, Kevin (ks6305) --- .../dmaapclient/MessageRouterHttpClientJdk.java | 211 +++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java new file mode 100644 index 000000000..d720e5fcd --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java @@ -0,0 +1,211 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.net.HttpURLConnection; + +/* + * java.net based client to build message router consumers + */ +public class MessageRouterHttpClientJdk implements SdncDmaapConsumer { + private static final Logger Log = LoggerFactory.getLogger(MessageRouterHttpClientJdk.class); + + protected Boolean isReady = false; + protected Boolean isRunning = false; + protected URL url; + protected Integer fetchPause; + protected Properties properties; + protected final String DEFAULT_CONNECT_TIMEOUT = "30000"; + protected final String DEFAULT_READ_TIMEOUT = "180000"; + protected final String DEFAULT_TIMEOUT_QUERY_PARAM_VALUE = "15000"; + protected final String DEFAULT_LIMIT = null; + private String authorizationString; + protected Integer connectTimeout; + protected Integer readTimeout; + protected String topic; + + public MessageRouterHttpClientJdk() {} + + @Override + public void run() { + if (isReady) { + isRunning = true; + while (isRunning) { + HttpURLConnection httpUrlConnection = null; + try { + httpUrlConnection = (HttpURLConnection) url.openConnection(); + if (authorizationString != null) { + httpUrlConnection.addRequestProperty("Authorization", authorizationString); + } + httpUrlConnection.setRequestMethod("GET"); + httpUrlConnection.setRequestProperty("Accept", "application/json"); + httpUrlConnection.setUseCaches(false); + httpUrlConnection.setConnectTimeout(connectTimeout); + httpUrlConnection.setReadTimeout(readTimeout); + httpUrlConnection.connect(); + int status = httpUrlConnection.getResponseCode(); + Log.info("GET " + url + " returned http status " + status); + if (status < 300) { + BufferedReader br = + new BufferedReader(new InputStreamReader(httpUrlConnection.getInputStream())); + StringBuilder sb = new StringBuilder(); + String line; + while ((line = br.readLine()) != null) { + sb.append(line + "\n"); + } + br.close(); + String responseBody = sb.toString(); + if (responseBody.contains("{")) { + // Get rid of opening [" entity = + responseBody = responseBody.substring(2); + // Get rid of closing "] + responseBody = responseBody.substring(0, responseBody.length() - 2); + // Split the json array into individual elements to process + for (String message : responseBody.split("\",\"")) { + // unescape the json + message = message.replace("\\\"", "\""); + // Topic names cannot contain periods + processMsg(message); + } + } else { + Log.info("Entity doesn't appear to contain JSON elements, logging body"); + Log.info(responseBody); + } + } + } catch (Exception e) { + Log.error("GET " + url + " failed.", e); + } finally { + if (httpUrlConnection != null) { + httpUrlConnection.disconnect(); + } + Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + url + " again."); + try { + Thread.sleep(fetchPause); + } catch (InterruptedException e) { + Log.error("Could not sleep thread", e); + } + } + } + } + } + + @Override + public void init(Properties baseProperties, String consumerPropertiesPath) { + try { + baseProperties.load(new FileInputStream(new File(consumerPropertiesPath))); + + this.properties = baseProperties; + String username = properties.getProperty("username"); + String password = properties.getProperty("password"); + topic = properties.getProperty("topic"); + String group = properties.getProperty("group"); + String host = properties.getProperty("host"); + String id = properties.getProperty("id"); + + String filter = properties.getProperty("filter"); + if (filter != null) { + if (filter.length() > 0) { + try { + filter = URLEncoder.encode(filter, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + Log.error("Couldn't encode filter string", e); + } + } else { + filter = null; + } + } + + String limitString = properties.getProperty("limit", DEFAULT_LIMIT); + Integer limit = null; + if (limitString != null && limitString.length() > 0) { + limit = Integer.valueOf(limitString); + } + + Integer timeoutQueryParamValue = + Integer.valueOf(properties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); + connectTimeout = Integer.valueOf(properties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT)); + readTimeout = Integer.valueOf(properties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT)); + if (username != null && password != null && username.length() > 0 && password.length() > 0) { + authorizationString = buildAuthorizationString(username, password); + } + String urlString = buildlUrlString(topic, group, id, host, timeoutQueryParamValue, limit, filter); + this.url = new URL(urlString); + this.fetchPause = Integer.valueOf(properties.getProperty("fetchPause")); + this.isReady = true; + } catch (FileNotFoundException e) { + Log.error("FileNotFoundException while reading consumer properties", e); + } catch (IOException e) { + Log.error("IOException while reading consumer properties", e); + } + } + + public void processMsg(String msg) { + Log.info(msg); + } + + protected String buildAuthorizationString(String userName, String password) { + String basicAuthString = userName + ":" + password; + basicAuthString = Base64.getEncoder().encodeToString(basicAuthString.getBytes()); + return "Basic " + basicAuthString; + } + + protected String buildlUrlString(String topic, String consumerGroup, String consumerId, String host, + Integer timeout, Integer limit, String filter) { + StringBuilder sb = new StringBuilder(); + sb.append("http://" + host + "/events/" + topic + "/" + consumerGroup + "/" + consumerId); + sb.append("?timeout=" + timeout); + + if (limit != null) { + sb.append("&limit=" + limit); + } + if (filter != null) { + sb.append("&filter=" + filter); + } + return sb.toString(); + } + + @Override + public boolean isReady() { + return isReady; + } + + @Override + public boolean isRunning() { + return isRunning; + } + +} -- cgit 1.2.3-korg From b13fc8a9b134c43a437d7a48ceb509295df4713a Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Mon, 2 Jul 2018 20:01:02 +0000 Subject: Increase code coverage for MR clients Increase code coverage for MR clients Change-Id: I4493b13070f967bc6b20e6770fa16c4df97c2b8c Issue-ID: CCSDK-328 Signed-off-by: Smokowski, Kevin (ks6305) --- .../dmaapclient/MessageRouterHttpClient.java | 88 +++-- .../dmaapclient/MessageRouterHttpClientJdk.java | 432 +++++++++++---------- .../MessageRouterHttpClientJdkTest.java | 100 +++++ .../dmaapclient/MessageRouterHttpClientTest.java | 97 +++++ 4 files changed, 467 insertions(+), 250 deletions(-) create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdkTest.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientTest.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java index d261d1c49..13146e4ec 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java @@ -25,6 +25,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; @@ -57,6 +58,7 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer { protected final String DEFAULT_READ_TIMEOUT_MINUTES = "3"; protected final String DEFAULT_TIMEOUT_QUERY_PARAM_VALUE = "15000"; protected final String DEFAULT_LIMIT = null; + protected final String DEFAULT_FETCH_PAUSE = "5000"; public MessageRouterHttpClient() { @@ -105,52 +107,60 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer { public void init(Properties baseProperties, String consumerPropertiesPath) { try { baseProperties.load(new FileInputStream(new File(consumerPropertiesPath))); - this.properties = baseProperties; - String username = baseProperties.getProperty("username"); - String password = baseProperties.getProperty("password"); - String topic = baseProperties.getProperty("topic"); - String group = baseProperties.getProperty("group"); - String host = baseProperties.getProperty("host"); - String id = baseProperties.getProperty("id"); - - String filter = baseProperties.getProperty("filter"); - if (filter != null) { - if (filter.length() > 0) { + processProperties(baseProperties); + } catch (FileNotFoundException e) { + Log.error("FileNotFoundException while reading consumer properties", e); + } catch (IOException e) { + Log.error("IOException while reading consumer properties", e); + } + } + + protected void processProperties(Properties properties) { + this.properties = properties; + String username = properties.getProperty("username"); + String password = properties.getProperty("password"); + String topic = properties.getProperty("topic"); + String group = properties.getProperty("group"); + String host = properties.getProperty("host"); + String id = properties.getProperty("id"); + + String filter = properties.getProperty("filter"); + if (filter != null) { + if (filter.length() > 0) { + try { filter = URLEncoder.encode(filter, StandardCharsets.UTF_8.name()); - } else { + } catch (UnsupportedEncodingException e) { + Log.error("Filter could not be encoded, setting to null", e); filter = null; } + } else { + filter = null; } + } - String limitString = baseProperties.getProperty("limit", DEFAULT_LIMIT); - Integer limit = null; - if (limitString != null && limitString.length() > 0) { - limit = Integer.valueOf(limitString); - } - - Integer timeoutQueryParamValue = - Integer.valueOf(baseProperties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); - Integer connectTimeoutSeconds = Integer - .valueOf(baseProperties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT_SECONDS)); - Integer readTimeoutMinutes = - Integer.valueOf(baseProperties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT_MINUTES)); - - Builder builder = client.target(uri).request("application/json"); - if (username != null && password != null && username.length() > 0 && password.length() > 0) { - String authorizationString = buildAuthorizationString(username, password); - builder.header("Authorization", authorizationString); - } - this.uri = buildUri(topic, group, id, host, timeoutQueryParamValue, limit, filter); - this.client = getClient(connectTimeoutSeconds, readTimeoutMinutes); + String limitString = properties.getProperty("limit", DEFAULT_LIMIT); + Integer limit = null; + if (limitString != null && limitString.length() > 0) { + limit = Integer.valueOf(limitString); + } - this.getMessages = builder.buildGet(); - this.fetchPause = Integer.valueOf(baseProperties.getProperty("fetchPause")); - this.isReady = true; - } catch (FileNotFoundException e) { - Log.error("FileNotFoundException while reading consumer properties", e); - } catch (IOException e) { - Log.error("IOException while reading consumer properties", e); + Integer timeoutQueryParamValue = + Integer.valueOf(properties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); + Integer connectTimeoutSeconds = Integer + .valueOf(properties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT_SECONDS)); + Integer readTimeoutMinutes = + Integer.valueOf(properties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT_MINUTES)); + this.client = getClient(connectTimeoutSeconds, readTimeoutMinutes); + this.uri = buildUri(topic, group, id, host, timeoutQueryParamValue, limit, filter); + Builder builder = client.target(uri).request("application/json"); + if (username != null && password != null && username.length() > 0 && password.length() > 0) { + String authorizationString = buildAuthorizationString(username, password); + builder.header("Authorization", authorizationString); } + + this.getMessages = builder.buildGet(); + this.fetchPause = Integer.valueOf(properties.getProperty("fetchPause",DEFAULT_FETCH_PAUSE)); + this.isReady = true; } @Override diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java index d720e5fcd..3336b81f6 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java @@ -1,211 +1,221 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.northbound.dmaapclient; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Base64; -import java.util.Properties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.net.HttpURLConnection; - -/* - * java.net based client to build message router consumers - */ -public class MessageRouterHttpClientJdk implements SdncDmaapConsumer { - private static final Logger Log = LoggerFactory.getLogger(MessageRouterHttpClientJdk.class); - - protected Boolean isReady = false; - protected Boolean isRunning = false; - protected URL url; - protected Integer fetchPause; - protected Properties properties; - protected final String DEFAULT_CONNECT_TIMEOUT = "30000"; - protected final String DEFAULT_READ_TIMEOUT = "180000"; - protected final String DEFAULT_TIMEOUT_QUERY_PARAM_VALUE = "15000"; - protected final String DEFAULT_LIMIT = null; - private String authorizationString; - protected Integer connectTimeout; - protected Integer readTimeout; - protected String topic; - - public MessageRouterHttpClientJdk() {} - - @Override - public void run() { - if (isReady) { - isRunning = true; - while (isRunning) { - HttpURLConnection httpUrlConnection = null; - try { - httpUrlConnection = (HttpURLConnection) url.openConnection(); - if (authorizationString != null) { - httpUrlConnection.addRequestProperty("Authorization", authorizationString); - } - httpUrlConnection.setRequestMethod("GET"); - httpUrlConnection.setRequestProperty("Accept", "application/json"); - httpUrlConnection.setUseCaches(false); - httpUrlConnection.setConnectTimeout(connectTimeout); - httpUrlConnection.setReadTimeout(readTimeout); - httpUrlConnection.connect(); - int status = httpUrlConnection.getResponseCode(); - Log.info("GET " + url + " returned http status " + status); - if (status < 300) { - BufferedReader br = - new BufferedReader(new InputStreamReader(httpUrlConnection.getInputStream())); - StringBuilder sb = new StringBuilder(); - String line; - while ((line = br.readLine()) != null) { - sb.append(line + "\n"); - } - br.close(); - String responseBody = sb.toString(); - if (responseBody.contains("{")) { - // Get rid of opening [" entity = - responseBody = responseBody.substring(2); - // Get rid of closing "] - responseBody = responseBody.substring(0, responseBody.length() - 2); - // Split the json array into individual elements to process - for (String message : responseBody.split("\",\"")) { - // unescape the json - message = message.replace("\\\"", "\""); - // Topic names cannot contain periods - processMsg(message); - } - } else { - Log.info("Entity doesn't appear to contain JSON elements, logging body"); - Log.info(responseBody); - } - } - } catch (Exception e) { - Log.error("GET " + url + " failed.", e); - } finally { - if (httpUrlConnection != null) { - httpUrlConnection.disconnect(); - } - Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + url + " again."); - try { - Thread.sleep(fetchPause); - } catch (InterruptedException e) { - Log.error("Could not sleep thread", e); - } - } - } - } - } - - @Override - public void init(Properties baseProperties, String consumerPropertiesPath) { - try { - baseProperties.load(new FileInputStream(new File(consumerPropertiesPath))); - - this.properties = baseProperties; - String username = properties.getProperty("username"); - String password = properties.getProperty("password"); - topic = properties.getProperty("topic"); - String group = properties.getProperty("group"); - String host = properties.getProperty("host"); - String id = properties.getProperty("id"); - - String filter = properties.getProperty("filter"); - if (filter != null) { - if (filter.length() > 0) { - try { - filter = URLEncoder.encode(filter, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - Log.error("Couldn't encode filter string", e); - } - } else { - filter = null; - } - } - - String limitString = properties.getProperty("limit", DEFAULT_LIMIT); - Integer limit = null; - if (limitString != null && limitString.length() > 0) { - limit = Integer.valueOf(limitString); - } - - Integer timeoutQueryParamValue = - Integer.valueOf(properties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); - connectTimeout = Integer.valueOf(properties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT)); - readTimeout = Integer.valueOf(properties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT)); - if (username != null && password != null && username.length() > 0 && password.length() > 0) { - authorizationString = buildAuthorizationString(username, password); - } - String urlString = buildlUrlString(topic, group, id, host, timeoutQueryParamValue, limit, filter); - this.url = new URL(urlString); - this.fetchPause = Integer.valueOf(properties.getProperty("fetchPause")); - this.isReady = true; - } catch (FileNotFoundException e) { - Log.error("FileNotFoundException while reading consumer properties", e); - } catch (IOException e) { - Log.error("IOException while reading consumer properties", e); - } - } - - public void processMsg(String msg) { - Log.info(msg); - } - - protected String buildAuthorizationString(String userName, String password) { - String basicAuthString = userName + ":" + password; - basicAuthString = Base64.getEncoder().encodeToString(basicAuthString.getBytes()); - return "Basic " + basicAuthString; - } - - protected String buildlUrlString(String topic, String consumerGroup, String consumerId, String host, - Integer timeout, Integer limit, String filter) { - StringBuilder sb = new StringBuilder(); - sb.append("http://" + host + "/events/" + topic + "/" + consumerGroup + "/" + consumerId); - sb.append("?timeout=" + timeout); - - if (limit != null) { - sb.append("&limit=" + limit); - } - if (filter != null) { - sb.append("&filter=" + filter); - } - return sb.toString(); - } - - @Override - public boolean isReady() { - return isReady; - } - - @Override - public boolean isRunning() { - return isRunning; - } - -} +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/* + * java.net based client to build message router consumers + */ +public class MessageRouterHttpClientJdk implements SdncDmaapConsumer { + private static final Logger Log = LoggerFactory.getLogger(MessageRouterHttpClientJdk.class); + + protected Boolean isReady = false; + protected Boolean isRunning = false; + protected URL url; + protected Integer fetchPause; + protected Properties properties; + protected final String DEFAULT_CONNECT_TIMEOUT = "30000"; + protected final String DEFAULT_READ_TIMEOUT = "180000"; + protected final String DEFAULT_TIMEOUT_QUERY_PARAM_VALUE = "15000"; + protected final String DEFAULT_LIMIT = null; + protected final String DEFAULT_FETCH_PAUSE = "5000"; + + private String authorizationString; + protected Integer connectTimeout; + protected Integer readTimeout; + protected String topic; + + public MessageRouterHttpClientJdk() {} + + @Override + public void run() { + if (isReady) { + isRunning = true; + while (isRunning) { + HttpURLConnection httpUrlConnection = null; + try { + httpUrlConnection = buildHttpURLConnection(); + httpUrlConnection.connect(); + int status = httpUrlConnection.getResponseCode(); + Log.info("GET " + url + " returned http status " + status); + if (status < 300) { + BufferedReader br = + new BufferedReader(new InputStreamReader(httpUrlConnection.getInputStream())); + StringBuilder sb = new StringBuilder(); + String line; + while ((line = br.readLine()) != null) { + sb.append(line + "\n"); + } + br.close(); + String responseBody = sb.toString(); + if (responseBody.contains("{")) { + // Get rid of opening [" entity = + responseBody = responseBody.substring(2); + // Get rid of closing "] + responseBody = responseBody.substring(0, responseBody.length() - 2); + // Split the json array into individual elements to process + for (String message : responseBody.split("\",\"")) { + // unescape the json + message = message.replace("\\\"", "\""); + // Topic names cannot contain periods + processMsg(message); + } + } else { + Log.info("Entity doesn't appear to contain JSON elements, logging body"); + Log.info(responseBody); + } + } + } catch (Exception e) { + Log.error("GET " + url + " failed.", e); + } finally { + if (httpUrlConnection != null) { + httpUrlConnection.disconnect(); + } + Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + url + " again."); + try { + Thread.sleep(fetchPause); + } catch (InterruptedException e) { + Log.error("Could not sleep thread", e); + } + } + } + } + } + + @Override + public void init(Properties baseProperties, String consumerPropertiesPath) { + try { + baseProperties.load(new FileInputStream(new File(consumerPropertiesPath))); + processProperties(baseProperties); + } catch (FileNotFoundException e) { + Log.error("FileNotFoundException while reading consumer properties", e); + } catch (IOException e) { + Log.error("IOException while reading consumer properties", e); + } + } + + protected void processProperties(Properties properties) throws MalformedURLException { + this.properties = properties; + String username = properties.getProperty("username"); + String password = properties.getProperty("password"); + topic = properties.getProperty("topic"); + String group = properties.getProperty("group"); + String host = properties.getProperty("host"); + String id = properties.getProperty("id"); + + String filter = properties.getProperty("filter"); + if (filter != null) { + if (filter.length() > 0) { + try { + filter = URLEncoder.encode(filter, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + Log.error("Couldn't encode filter string", e); + } + } else { + filter = null; + } + } + + String limitString = properties.getProperty("limit", DEFAULT_LIMIT); + Integer limit = null; + if (limitString != null && limitString.length() > 0) { + limit = Integer.valueOf(limitString); + } + + Integer timeoutQueryParamValue = + Integer.valueOf(properties.getProperty("timeout", DEFAULT_TIMEOUT_QUERY_PARAM_VALUE)); + connectTimeout = Integer.valueOf(properties.getProperty("connectTimeoutSeconds", DEFAULT_CONNECT_TIMEOUT)); + readTimeout = Integer.valueOf(properties.getProperty("readTimeoutMinutes", DEFAULT_READ_TIMEOUT)); + if (username != null && password != null && username.length() > 0 && password.length() > 0) { + authorizationString = buildAuthorizationString(username, password); + } + String urlString = buildlUrlString(topic, group, id, host, timeoutQueryParamValue, limit, filter); + this.url = new URL(urlString); + this.fetchPause = Integer.valueOf(properties.getProperty("fetchPause", DEFAULT_FETCH_PAUSE)); + this.isReady = true; + } + + public void processMsg(String msg) { + Log.info(msg); + } + + protected String buildAuthorizationString(String userName, String password) { + String basicAuthString = userName + ":" + password; + basicAuthString = Base64.getEncoder().encodeToString(basicAuthString.getBytes()); + return "Basic " + basicAuthString; + } + + protected String buildlUrlString(String topic, String consumerGroup, String consumerId, String host, + Integer timeout, Integer limit, String filter) { + StringBuilder sb = new StringBuilder(); + sb.append("http://" + host + "/events/" + topic + "/" + consumerGroup + "/" + consumerId); + sb.append("?timeout=" + timeout); + + if (limit != null) { + sb.append("&limit=" + limit); + } + if (filter != null) { + sb.append("&filter=" + filter); + } + return sb.toString(); + } + + @Override + public boolean isReady() { + return isReady; + } + + @Override + public boolean isRunning() { + return isRunning; + } + + protected HttpURLConnection buildHttpURLConnection() throws IOException { + HttpURLConnection httpUrlConnection = (HttpURLConnection) url.openConnection(); + if (authorizationString != null) { + httpUrlConnection.setRequestProperty("Authorization", authorizationString); + } + httpUrlConnection.setRequestMethod("GET"); + httpUrlConnection.setRequestProperty("Accept", "application/json"); + httpUrlConnection.setUseCaches(false); + httpUrlConnection.setConnectTimeout(connectTimeout); + httpUrlConnection.setReadTimeout(readTimeout); + return httpUrlConnection; + } + +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdkTest.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdkTest.java new file mode 100644 index 000000000..03f832801 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdkTest.java @@ -0,0 +1,100 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Properties; +import org.junit.Test; + +public class MessageRouterHttpClientJdkTest { + public MessageRouterHttpClientJdk getClient() throws MalformedURLException { + Properties properties = new Properties(); + properties.put("username", "my_user"); + properties.put("password", "my_password"); + properties.put("topic", "network_automation"); + properties.put("group", "message_processors"); + properties.put("host", "dmaap-server.com"); + properties.put("id", "machine_one"); + properties.put("fetchPause", "3000"); + MessageRouterHttpClientJdk client = new MessageRouterHttpClientJdk(); + client.processProperties(properties); + return client; + } + + @Test + public void processMsg() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = getClient(); + client.processMsg(null); + } + + @Test + public void isReady() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = getClient(); + assertEquals(true, client.isReady()); + } + + @Test + public void isRunning() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = getClient(); + assertEquals(false, client.isRunning()); + } + + @Test + public void buidUrl() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = getClient(); + assertEquals(new URL( + "http://dmaap-server.com/events/network_automation/message_processors/machine_one?timeout=15000"), + client.url); + } + + @Test + public void buidUrlWithFilter() throws InvalidMessageException, MalformedURLException { + Properties properties = new Properties(); + properties.put("username", "my_user"); + properties.put("password", "my_password"); + properties.put("topic", "network_automation"); + properties.put("group", "message_processors"); + properties.put("host", "dmaap-server.com"); + properties.put("id", "machine_one"); + properties.put("filter", "{\"class\":\"Contains\",\"string\":\"hello\",\"value\":\"world\"}"); + properties.put("fetchPause", "3000"); + MessageRouterHttpClientJdk client = new MessageRouterHttpClientJdk(); + client.processProperties(properties); + assertEquals(new URL( + "http://dmaap-server.com/events/network_automation/message_processors/machine_one?timeout=15000&filter=%7B%22class%22%3A%22Contains%22%2C%22string%22%3A%22hello%22%2C%22value%22%3A%22world%22%7D"), + client.url); + } + + @Test + public void buildAuthorizationString() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = getClient(); + String authString = client.buildAuthorizationString("Hello", "World"); + assertEquals("Basic SGVsbG86V29ybGQ=", authString); + } + + @Test + public void clientFromProperties() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClientJdk client = new MessageRouterHttpClientJdk(); + Properties props = new Properties(); + client.init(props, "src/test/resources/dmaap-consumer-1.properties"); + assertEquals(new URL( + "http://localhost:3904/events/ccsdk-topic/ccsdk-unittest/ccsdk_unittest?timeout=15000&limit=1000"), + client.url); + } + + @Test + public void buildHttpURLConnection() throws InvalidMessageException, IOException { + MessageRouterHttpClientJdk client = getClient(); + HttpURLConnection connection = client.buildHttpURLConnection(); + assertEquals("GET", connection.getRequestMethod()); + assertTrue(connection.getRequestProperties().get("Accept").contains("application/json")); + assertEquals(false, connection.getUseCaches()); + Integer defaultConnectTimeout = Integer.valueOf(client.DEFAULT_CONNECT_TIMEOUT); + Integer defaultReadTimeout = Integer.valueOf(client.DEFAULT_READ_TIMEOUT); + assertEquals(defaultConnectTimeout.intValue(), connection.getConnectTimeout()); + assertEquals(defaultReadTimeout.intValue(), connection.getReadTimeout()); + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientTest.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientTest.java new file mode 100644 index 000000000..7567e2a9e --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientTest.java @@ -0,0 +1,97 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertEquals; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Properties; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import org.junit.Test; + +public class MessageRouterHttpClientTest { + + class MockMessageRouterHttpClient extends MessageRouterHttpClient { + protected Client getClient(Integer connectTimeoutSeconds, Integer readTimeoutMinutes) { + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + return clientBuilder.build(); + } + } + + public MessageRouterHttpClient getClient() { + Properties properties = new Properties(); + properties.put("username", "my_user"); + properties.put("password", "my_password"); + properties.put("topic", "network_automation"); + properties.put("group", "message_processors"); + properties.put("host", "dmaap-server.com"); + properties.put("id", "machine_one"); + properties.put("fetch", "machine_one"); + + MockMessageRouterHttpClient client = new MockMessageRouterHttpClient(); + client.processProperties(properties); + return client; + } + + @Test + public void processMsg() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClient client = getClient(); + client.processMsg(null); + } + + @Test + public void isReady() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClient client = getClient(); + assertEquals(true, client.isReady()); + } + + @Test + public void isRunning() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClient client = getClient(); + assertEquals(false, client.isRunning()); + } + + @Test + public void buidUrl() throws InvalidMessageException, MalformedURLException, URISyntaxException { + MessageRouterHttpClient client = getClient(); + assertEquals(new URI( + "http://dmaap-server.com/events/network_automation/message_processors/machine_one?timeout=15000"), + client.uri); + } + + @Test + public void buidUrlWithFilter() throws InvalidMessageException, MalformedURLException, URISyntaxException { + Properties properties = new Properties(); + properties.put("username", "my_user"); + properties.put("password", "my_password"); + properties.put("topic", "network_automation"); + properties.put("group", "message_processors"); + properties.put("host", "dmaap-server.com"); + properties.put("id", "machine_one"); + properties.put("filter", "{\"class\":\"Contains\",\"string\":\"hello\",\"value\":\"world\"}"); + properties.put("fetchPause", "3000"); + MessageRouterHttpClient client = new MockMessageRouterHttpClient(); + client.processProperties(properties); + assertEquals(new URI( + "http://dmaap-server.com/events/network_automation/message_processors/machine_one?timeout=15000&filter=%7B%22class%22%3A%22Contains%22%2C%22string%22%3A%22hello%22%2C%22value%22%3A%22world%22%7D"), + client.uri); + } + + @Test + public void buildAuthorizationString() throws InvalidMessageException, MalformedURLException { + MessageRouterHttpClient client = getClient(); + String authString = client.buildAuthorizationString("Hello", "World"); + assertEquals("Basic SGVsbG86V29ybGQ=", authString); + } + + @Test + public void clientFromProperties() throws InvalidMessageException, MalformedURLException, URISyntaxException { + MessageRouterHttpClient client = new MockMessageRouterHttpClient(); + Properties props = new Properties(); + client.init(props, "src/test/resources/dmaap-consumer-1.properties"); + assertEquals(new URI( + "http://localhost:3904/events/ccsdk-topic/ccsdk-unittest/ccsdk_unittest?timeout=15000&limit=1000"), + client.uri); + } + +} -- cgit 1.2.3-korg From 16ecee44bc14dcb0a128cfdabf0ae8b17f1db057 Mon Sep 17 00:00:00 2001 From: Arindam Mondal Date: Tue, 10 Jul 2018 15:11:38 +0900 Subject: Sonar issue fix blocker, critical Issue-ID: CCSDK-332 Change-Id: I8741cb5bf68d71f0376105d2b1683ac05534a001 Signed-off-by: Arindam Mondal --- .../ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java | 1 + .../sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java | 1 + .../org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java | 6 ++---- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java index 13146e4ec..c02ec5df3 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java @@ -97,6 +97,7 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer { Thread.sleep(fetchPause); } catch (InterruptedException e) { Log.error("Could not sleep thread", e); + Thread.currentThread().interrupt(); } } } diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java index 3336b81f6..a6744045d 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClientJdk.java @@ -111,6 +111,7 @@ public class MessageRouterHttpClientJdk implements SdncDmaapConsumer { Thread.sleep(fetchPause); } catch (InterruptedException e) { Log.error("Could not sleep thread", e); + Thread.currentThread().interrupt(); } } } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index 8ea041e61..4ae5acd99 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -399,8 +399,7 @@ public class SdncUebCallback implements INotificationCallback { // Save zip if TOSCA_CSAR if (artifact.getArtifactType().contains("TOSCA_CSAR") || artifact.getArtifactName().contains(".csar")) { - try { - FileOutputStream outFile = new FileOutputStream(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName()); + try(FileOutputStream outFile = new FileOutputStream(incomingDir.getAbsolutePath() + "/" + artifact.getArtifactName())) { outFile.write(payloadBytes, 0, payloadBytes.length); outFile.close(); writeSucceeded = true; @@ -411,8 +410,7 @@ public class SdncUebCallback implements INotificationCallback { } else { String payload = new String(payloadBytes); - try { - FileWriter spoolFileWriter = new FileWriter(spoolFile); + try(FileWriter spoolFileWriter = new FileWriter(spoolFile)) { spoolFileWriter.write(payload); spoolFileWriter.close(); writeSucceeded = true; -- cgit 1.2.3-korg From be74be10e66d9a5d127c6280f802ef173dbf17de Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Thu, 19 Jul 2018 15:11:17 +0530 Subject: Added dmaap consumer for esr-thirdparty AAI events Modified SdncAaiDmaapConsumer.java to handle AAI EVENT for esr-thirdparty-sdnc and template Change-Id: I8aaa2e649a722d8d51f0b3329c94541396fde96b Issue-ID: CCSDK-389 Signed-off-by: shashikanth.vh --- .../dmaapclient/SdncAaiDmaapConsumer.java | 154 +++++++++++++++------ .../src/main/resources/esr-thirdparty-sdnc.map | 5 + .../main/resources/template-esr-thirdparty-sdnc.vt | 100 +++++++++++++ .../dmaapclient/TestSdncEsrDmaapReceiver.java | 140 +++++++++++++++++++ .../dmaap-consumer-esrsysteminfo.properties | 34 +++++ .../src/test/resources/dmaap-listener.properties | 2 +- 6 files changed, 391 insertions(+), 44 deletions(-) create mode 100644 dmaap-listener/src/main/resources/esr-thirdparty-sdnc.map create mode 100644 dmaap-listener/src/main/resources/template-esr-thirdparty-sdnc.vt create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncEsrDmaapReceiver.java create mode 100644 dmaap-listener/src/test/resources/dmaap-consumer-esrsysteminfo.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index 2c4de7104..be2e36c1a 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -3,14 +3,14 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,6 +33,7 @@ import java.util.Map; import java.util.Properties; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; +import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,66 +47,133 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { private static final String TEMPLATE = "SDNC.template"; private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + private static final String ESR_SYSTEM_INFO = "esr-system-info"; + private static final String RELATIONSHIP_LIST = "relationship-list"; + private static final String ESR_SYSTEM_INFO_LIST = "esr-system-info-list"; private static final String AAI_EVENT = "AAI-EVENT"; - + private static final String EVENT_TYPE = "event-type"; + private static final String ENTITY = "entity"; private static final String ENTITY_TYPE = "entity-type"; private static final String EVENT_HEADER = "event-header"; - + private String rootDir; protected VelocityEngine velocityEngine; - + public SdncAaiDmaapConsumer() { velocityEngine = new VelocityEngine(); - Properties props = new Properties(); + Properties props = new Properties(); rootDir = System.getenv(DMAAPLISTENERROOT); if ((rootDir == null) || (rootDir.length() == 0)) { - rootDir = "/opt/app/dmaap-listener/lib/"; + rootDir = "/opt/app/dmaap-listener/lib/"; } else { - rootDir = rootDir + "/lib/"; + rootDir = rootDir + "/lib/"; } - - props.put("file.resource.loader.path", rootDir); + + props.put("file.resource.loader.path", rootDir); velocityEngine.init(props); } - + /* * for testing purposes */ SdncAaiDmaapConsumer(Properties props) { - velocityEngine = new VelocityEngine(); + velocityEngine = new VelocityEngine(); velocityEngine.init(props); } - + protected String publish(String templatePath, String jsonString) throws IOException - { - JSONObject jsonObj = new JSONObject(jsonString); - VelocityContext context = new VelocityContext(); - for(Object key : jsonObj.keySet()) - { - context.put((String)key, jsonObj.get((String)key)); - } - - String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); - context.put("req_id", id); - - context.put("curr_time", Instant.now()); - - ObjectMapper oMapper = new ObjectMapper(); - - String rpcMsgbody = oMapper.writeValueAsString(jsonString); - context.put("full_message", rpcMsgbody); - - Writer writer = new StringWriter(); - velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); - writer.flush(); - - return writer.toString(); + { + if (templatePath.contains("esr-thirdparty-sdnc")){ + return publishEsrThirdPartySdnc(templatePath, jsonString); + } else { + return publishFullMessage(templatePath, jsonString); + } + } + + private String publishFullMessage(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + for(Object key : jsonObj.keySet()) + { + context.put((String)key, jsonObj.get((String)key)); + } + + String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); + context.put("req_id", id); + + context.put("curr_time", Instant.now()); + + ObjectMapper oMapper = new ObjectMapper(); + + String rpcMsgbody = oMapper.writeValueAsString(jsonString); + context.put("full_message", rpcMsgbody); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + } + + private String publishEsrThirdPartySdnc(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + + JSONObject eventHeader = jsonObj.getJSONObject(EVENT_HEADER); + for(Object key : eventHeader.keySet()) + { + if (!key.equals("action")) { + context.put(((String)key).replaceAll("-", ""), eventHeader.get((String)key)); + } else { + String action = (String) eventHeader.get((String) key); + context.put((String)key, action.substring(0,1).toUpperCase() + + action.substring(1).toLowerCase()); + } + } + + JSONObject entityObj = jsonObj.getJSONObject(ENTITY); + for(Object key : entityObj.keySet()) + { + switch((String)key) + { + case ESR_SYSTEM_INFO_LIST : + JSONArray esrSystemInfo = entityObj.getJSONObject((String)key) + .getJSONArray(ESR_SYSTEM_INFO); + + for (int i = 0; i < esrSystemInfo.length(); i++) { + JSONObject objects = esrSystemInfo.getJSONObject(i); + + for (Object name : objects.keySet()) { + context.put(((String)name).replaceAll("-", ""), + objects.get((String)name).toString()); + } + } + break; + + case RELATIONSHIP_LIST : + //convertion not required for relationship + break; + + default : + context.put(((String)key).replaceAll("-", ""), + entityObj.get((String)key).toString()); + break; + } + } + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); } - + @Override public void processMsg(String msg) throws InvalidMessageException { @@ -171,14 +239,14 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { } } - private Map loadMap(String mapFilename) { - File mapFile = new File(mapFilename); + private Map loadMap(String mapFilename) { + File mapFile = new File(mapFilename); if (!mapFile.canRead()) { LOG.error(String.format("Cannot read map file (%s)", mapFilename)); return null; } - + Map results = new HashMap<>(); try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { @@ -199,8 +267,8 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { LOG.error("Caught exception reading map " + mapFilename, e); return null; } - + return results; - } + } } diff --git a/dmaap-listener/src/main/resources/esr-thirdparty-sdnc.map b/dmaap-listener/src/main/resources/esr-thirdparty-sdnc.map new file mode 100644 index 000000000..603645ebe --- /dev/null +++ b/dmaap-listener/src/main/resources/esr-thirdparty-sdnc.map @@ -0,0 +1,5 @@ +# SDN-C URL +SDNC.endpoint => DataChange:data-change-notification + +# Field mapping +SDNC.template => template-esr-thirdparty-sdnc.vt diff --git a/dmaap-listener/src/main/resources/template-esr-thirdparty-sdnc.vt b/dmaap-listener/src/main/resources/template-esr-thirdparty-sdnc.vt new file mode 100644 index 000000000..225fce026 --- /dev/null +++ b/dmaap-listener/src/main/resources/template-esr-thirdparty-sdnc.vt @@ -0,0 +1,100 @@ +{ + "DataChange:input": { + "DataChange:aai-node-type": "$entitytype", + "DataChange:selflink": "$entitylink", + "DataChange:aai-event-id": "$id", + "DataChange:aai-event-trigger": "$action", + "DataChange:key-data": [{ + "DataChange:key-name": "thirdparty-sdnc-id", + "DataChange:key-value": "$thirdpartysdncid" + }, + { + "DataChange:key-name": "resource-version", + "DataChange:key-value": "$resourceversion" + }, + { + "DataChange:key-name": "location", + "DataChange:key-value": "$location" + }, + { + "DataChange:key-name": "product-name", + "DataChange:key-value": "$productname" + }, + { + "DataChange:key-name": "esr-system-info-id", + "DataChange:key-value": "$esrsysteminfoid" + }, + { + "DataChange:key-name": "system-type", + "DataChange:key-value": "$systemtype" + }, + { + "DataChange:key-name": "service-url", + "DataChange:key-value": "$serviceurl" + }, + { + "DataChange:key-name": "ssl-cacert", + "DataChange:key-value": "$sslcacert" + }, + { + "DataChange:key-name": "type", + "DataChange:key-value": "$type" + }, + { + "DataChange:key-name": "ssl-insecure", + "DataChange:key-value": "$sslinsecure" + }, + { + "DataChange:key-name": "system-status", + "DataChange:key-value": "$systemstatus" + }, + { + "DataChange:key-name": "version", + "DataChange:key-value": "$version" + }, + { + "DataChange:key-name": "passive", + "DataChange:key-value": "$passive" + }, + { + "DataChange:key-name": "password", + "DataChange:key-value": "$password" + }, + { + "DataChange:key-name": "protocol", + "DataChange:key-value": "$protocol" + }, + { + "DataChange:key-name": "ip-address", + "DataChange:key-value": "$ipaddress" + }, + { + "DataChange:key-name": "cloud-domain", + "DataChange:key-value": "$clouddomain" + }, + { + "DataChange:key-name": "user-name", + "DataChange:key-value": "$username" + }, + { + "DataChange:key-name": "system-name", + "DataChange:key-value": "$systemname" + }, + { + "DataChange:key-name": "port", + "DataChange:key-value": "$port" + }, + { + "DataChange:key-name": "vendor", + "DataChange:key-value": "$vendor" + }, + { + "DataChange:key-name": "remote-path", + "DataChange:key-value": "$remotepath" + }, + { + "DataChange:key-name": "default-tenant", + "DataChange:key-value": "$defaulttenant" + }] + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncEsrDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncEsrDmaapReceiver.java new file mode 100644 index 000000000..623c96426 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncEsrDmaapReceiver.java @@ -0,0 +1,140 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import org.apache.commons.io.FileUtils; +import org.junit.Test; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Properties; + +public class TestSdncEsrDmaapReceiver { + static String aaiInput = "{\"cambria.partition\":\"AAI\",\n" + + " \"event-header\":\n" + + " {\n" + + " \"severity\":\"NORMAL\",\n" + + " \"entity-type\":\"esr-thirdparty-sdnc\",\n" + + " \"top-entity-type\":\"esr-thirdparty-sdnc\",\n" + + " \"entity-link\":\"aai/v11/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/IP-WAN-Controller-1\",\n" + + " \"event-type\":\"AAI-EVENT\",\n" + + " \"domain\":\"dev\",\n" + + " \"action\":\"UPDATE\",\n" + + " \"sequence-number\":\"0\",\n" + + " \"id\":\"bf4df797-759a-4684-a63c-393b7d40ed55\",\n" + + " \"source-name\":\"postman\",\n" + + " \"version\":\"v11\",\n" + + " \"timestamp\":\"20180104-09:57:58:721\"\n" + + " },\n" + + " \"entity\":\n" + + " {\n" + + " \"thirdparty-sdnc-id\":\"IP-WAN-Controller-1\",\n" + + " \"relationship-list\":\n" + + " {\n" + + " \"relationship\":\n" + + " [\n" + + " {\n" + + " \"related-to\":\"pnf\",\n" + + " \"relationship-data\":\n" + + " [\n" + + " {\n" + + " \"relationship-value\":\"a8098c1a-f86e-11da-bd1a-00112444be1e\",\n" + + " \"relationship-key\":\"pnf.pnf-name\"\n" + + " }\n" + + " ],\n" + + " \"related-link\":\"aai/v11/network/pnfs/pnf/a8098c1a-f86e-11da-bd1a-00112444be1e\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"resource-version\":\"1515059878654\",\n" + + " \"location\":\"Core\",\n" + + " \"product-name\":\"AC-WAN\",\n" + + " \"esr-system-info-list\":\n" + + " {\"esr-system-info\":\n" + + " [\n" + + " {\n" + + " \"esr-system-info-id\":\"IP-WAN-Controller-ESR-1\",\n" + + " \"system-type\":\"example-system-type-val-12078\",\n" + + " \"service-url\":\"https://182.2.61.24:18002\",\n" + + " \"ssl-cacert\":\"example-ssl-cacert-val-20589\",\n" + + " \"type\":\"WAN\",\n" + + " \"ssl-insecure\":true,\n" + + " \"system-status\":\"example-system-status-val-23435\",\n" + + " \"version\":\"V3R1\",\n" + + " \"passive\":true,\n" + + " \"password\":\"Admin@12345\",\n" + + " \"protocol\":\"RESTCONF\",\n" + + " \"ip-address\":\"182.2.61.24\",\n" + + " \"cloud-domain\":\"example-cloud-domain-val-76077\",\n" + + " \"user-name\":\"admin\",\n" + + " \"system-name\":\"IP-WAN-Controller\",\n" + + " \"port\":\"18002\",\n" + + " \"vendor\":\"IP-WAN\",\n" + + " \"resource-version\":\"1515059878666\",\n" + + " \"remote-path\":\"example-remotepath-val-5833\",\n" + + " \"default-tenant\":\"example-default-tenant-val-71148\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " }\n" + + " }"; + + @Test + public void testProcessMsgInvalidEventType() throws Exception { + String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + File directory = new File("lib"); + + if (! directory.exists()){ + directory.mkdir(); + } + + File source = new File("src/main/resources"); + File dest = new File("lib/"); + try { + FileUtils.copyDirectory(source, dest); + } catch (IOException e) { + e.printStackTrace(); + } + + try { + Map env = System.getenv(); + Class cl = env.getClass(); + Field field = cl.getDeclaredField("m"); + field.setAccessible(true); + Map writableEnv = (Map) field.get(env); + writableEnv.put(DMAAPLISTENERROOT, "."); + } catch (Exception e) { + throw new IllegalStateException("Failed to set environment variable", e); + } + Properties props = new Properties(); + InputStream propStr = TestSdncEsrDmaapReceiver.class.getResourceAsStream("/dmaap-consumer-esrsysteminfo.properties"); + + props.load(propStr); + + SdncAaiDmaapConsumer consumer = new SdncAaiDmaapConsumer(); + + consumer.init(props, "src/test/resources/dmaap-consumer-esrsysteminfo.properties"); + consumer.processMsg(aaiInput); + } +} diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-esrsysteminfo.properties b/dmaap-listener/src/test/resources/dmaap-consumer-esrsysteminfo.properties new file mode 100644 index 000000000..9f5cfe71f --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-esrsysteminfo.properties @@ -0,0 +1,34 @@ +TransportType=DME2 +Latitude =47.778998 +Longitude =-122.182883 +Version =1.0 +ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events +Environment =TEST +Partner = +SubContextPath =/ +Protocol =https +MethodType =GET +username =test +password =test +contenttype =application/json +authKey=ABC123 +authDate=2016-05-10T13:13:50-0700 +host=localhost:3904 +topic=AAI-EVENT +group=pserver +id=1 +timeout=20000 +limit=10000 +filter={"class":"Equals","field":"event-header.entity-type","value":"pserver"} +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=55000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=src/test/resources/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=admin +sdnc.odl.url-base=http://localhost:8181/restconf/operations \ No newline at end of file diff --git a/dmaap-listener/src/test/resources/dmaap-listener.properties b/dmaap-listener/src/test/resources/dmaap-listener.properties index ed180e515..defef0b43 100755 --- a/dmaap-listener/src/test/resources/dmaap-listener.properties +++ b/dmaap-listener/src/test/resources/dmaap-listener.properties @@ -1 +1 @@ -subscriptions=org.onap.ccsdk.sli.northbound.dmaapclient.DummyDmaapConsumer:dmaap-consumer-1.properties \ No newline at end of file +subscriptions=org.onap.ccsdk.sli.northbound.dmaapclient.DummyDmaapConsumer:dmaap-consumer-1.properties;org.onap.ccsdk.sli.northbound.dmaapclient.SdncAaiDmaapConsumer:dmaap-consumer-esrsysteminfo.properties \ No newline at end of file -- cgit 1.2.3-korg From 3c5a179495b00b2e832d304083885aa93e8cdab7 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Tue, 7 Aug 2018 21:26:44 +0000 Subject: update configuration for onap look for properties in common folder, use java 8 Change-Id: I8a04126d8ac1db0781af9b6a015477e0fc3608dd Issue-ID: CCSDK-448 Signed-off-by: Smokowski, Kevin (ks6305) --- .../org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java | 2 +- dmaap-listener/src/main/scripts/start-dmaap-listener.sh | 6 +++--- dmaap-listener/src/main/scripts/stop-dmaap-listener.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java index 2be08cb8b..7e257a125 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory; public class DmaapListener { private static final String DMAAP_LISTENER_PROPERTIES = "dmaap-listener.properties"; - private static final String DMAAP_LISTENER_PROPERTIES_DIR = "/opt/sdnc/data/properties"; + private static final String DMAAP_LISTENER_PROPERTIES_DIR = "/opt/onap/ccsdk/data/properties"; private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; private static final Logger LOG = LoggerFactory.getLogger(DmaapListener.class); diff --git a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh index 164ade332..f767d3cd1 100644 --- a/dmaap-listener/src/main/scripts/start-dmaap-listener.sh +++ b/dmaap-listener/src/main/scripts/start-dmaap-listener.sh @@ -21,15 +21,15 @@ # ============LICENSE_END========================================================= ### -PROPERTY_DIR=${PROPERTY_DIR:-/opt/sdnc/data/properties} +PROPERTY_DIR=${PROPERTY_DIR:-/opt/onap/ccsdk/data/properties} LISTENER=dmaap-listener PIDFILE=/tmp/.${LISTENER}-pid -UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/app/dmaap-listener} -JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle} +UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/onap/dmaap-listener} +JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-8-oracle} JAVA_OPTS=${JAVA_OPTS:--Dhttps.protocols=TLSv1.1,TLSv1.2} JAVA=${JAVA:-${JAVA_HOME}/bin/java} diff --git a/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh index 61be1a141..ab242044f 100644 --- a/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh +++ b/dmaap-listener/src/main/scripts/stop-dmaap-listener.sh @@ -21,13 +21,13 @@ # ============LICENSE_END========================================================= ### -PROPERTY_DIR=${PROPERTY_DIR:-/opt/sdnc/data/properties} +PROPERTY_DIR=${PROPERTY_DIR:-/opt/onap/ccsdk/data/properties} LISTENER=dmaap-listener PIDFILE=/tmp/.${LISTENER}-pid -UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/app/dmaap-listener} +UEBLISTENERROOT=${UEBLISTENERROOT:-/opt/onap/dmaap-listener} if [ -f $PIDFILE ] then -- cgit 1.2.3-korg From 40ff9f9d68660a157f9ff477003fc7b359747148 Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Fri, 7 Sep 2018 17:30:02 +0530 Subject: Update network topology to aai issue fix Change-Id: I72d25c8df8726430a087613544a274ca724713cb Issue-ID: SDNC-387 Signed-off-by: shashikanth.vh --- .../dmaapclient/SdncAaiDmaapConsumer.java | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index be2e36c1a..fa9544f3f 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -132,8 +132,11 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { context.put(((String)key).replaceAll("-", ""), eventHeader.get((String)key)); } else { String action = (String) eventHeader.get((String) key); - context.put((String)key, action.substring(0,1).toUpperCase() - + action.substring(1).toLowerCase()); + if (action.equalsIgnoreCase("delete")) { + context.put((String) key, "Delete"); + } else { + context.put((String) key, "Update"); + } } } @@ -187,8 +190,8 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { aaiRootNode = oMapper.readTree(msg); } catch (Exception e) { throw new InvalidMessageException("Cannot parse json object", e); - } - + } + JsonNode eventHeaderNode = aaiRootNode.get(EVENT_HEADER); if(eventHeaderNode == null) { LOG.info("Missing Event Header node."); @@ -196,31 +199,31 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { } JsonNode eventTypeNode = eventHeaderNode.get(EVENT_TYPE); String eventType = eventTypeNode.textValue(); - + if(AAI_EVENT.equals(eventType) == false) { LOG.info("Unknown Event Type {}", eventType); return; } - + JsonNode entityTypeNode = eventHeaderNode.get(ENTITY_TYPE); String entityType = entityTypeNode.textValue(); - + String mapFilename = rootDir + entityType + ".map"; Map fieldMap = loadMap(mapFilename); if (fieldMap == null) { - throw new InvalidMessageException("Unable to process message - cannot load mapping file"); + return; } if (!fieldMap.containsKey(SDNC_ENDPOINT)) { - throw new InvalidMessageException("No SDNC endpoint known for message " + entityType); + return; } - String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); - + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + if (!fieldMap.containsKey(TEMPLATE)) { throw new InvalidMessageException("No SDNC template known for message " + entityType); } - String templateName = fieldMap.get(TEMPLATE); - + String templateName = fieldMap.get(TEMPLATE); + try { String rpcMsgbody = publish(templateName, msg); String odlUrlBase = getProperty("sdnc.odl.url-base"); -- cgit 1.2.3-korg From 481cf0c75af442dc223b803e4de8e797b931581d Mon Sep 17 00:00:00 2001 From: "shashikanth.vh" Date: Thu, 20 Sep 2018 17:59:25 +0530 Subject: integration test issues fix for sdwan and sotn On topology discovery, ESR will be updated with pnf relationship resulting in update ESR event causing topology discovery to run in loop. Change-Id: I80d98d5b11f05d395e342479352656364fe071d4 Issue-ID: SDNC-357 Signed-off-by: shashikanth.vh --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index fa9544f3f..3733fa604 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -132,10 +132,12 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { context.put(((String)key).replaceAll("-", ""), eventHeader.get((String)key)); } else { String action = (String) eventHeader.get((String) key); - if (action.equalsIgnoreCase("delete")) { + if (action.equalsIgnoreCase("create")) { + context.put((String)key,"Update"); + } else if (action.equalsIgnoreCase("delete")) { context.put((String) key, "Delete"); } else { - context.put((String) key, "Update"); + throw new IOException("Action type not supported " + action); } } } -- cgit 1.2.3-korg From 95071c80308bec97a143831a1f849ebcadd2a604 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 26 Sep 2018 10:37:48 -0400 Subject: Prepare for release build Update for release build : (a) Remove -STAGING tag from release version in version.properties (b) Update to use released version of parent poms (c) Disable single-feature-test (which does not work with released dependencies from ONAP) Change-Id: I77658eeee2f5fcfd0c9eed4047472dff5973a6a2 Issue-ID: CCSDK-597 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 7 ++++++- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 7 ++++++- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 7 ++++++- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 7 ++++++- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- version.properties | 2 +- 29 files changed, 49 insertions(+), 29 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index d26c9485a..734d2cb75 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + + true + + diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 6b6ac64dc..d03a5cc24 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index a8a493591..659230db4 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 37ec67679..31b0b5cf8 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 1cb8af920..3d157265d 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 292a4f363..34fe40b9e 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 1098160b6..10a040854 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 9ed0ac73c..b7d125101 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + true + + + diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index bc673fddb..7bb1d928a 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index a9543ab2a..3c95e4067 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 7f100ec05..a5c1596af 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 26134c3e8..bb815423a 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 6c23fc48f..49d145da5 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 29a832449..82f5fbc33 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 0d7816985..2105991e5 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index ad1a578e4..b8acce508 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ feature ccsdk-sli-northbound :: features :: ${project.artifactId} + + + true + + diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 6372c7ea0..007bac172 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 4e3cdae03..2f52192d3 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/features/pom.xml b/features/pom.xml index 7a5e2e6a8..b02fe9c1e 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 5ea28878b..9399580fb 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + + + true + + diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 71e729284..82b9fef3f 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 705360200..ad80220d9 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 22d7fafdd..b394c8f45 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index afa844ae6..058d6126c 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/lcm/pom.xml b/lcm/pom.xml index 2bc81749b..b168f778f 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 23efb6e4e..406683885 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/pom.xml b/pom.xml index 8c8f1c924..2b1d55151 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 66437e47c..702a0cb22 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.northbound diff --git a/version.properties b/version.properties index f9fd33500..881489379 100644 --- a/version.properties +++ b/version.properties @@ -9,6 +9,6 @@ feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 3af0d1e7ed4cb3d232fdc26aef88191ba8cd5615 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 26 Sep 2018 15:13:24 -0400 Subject: Roll to next snapshot Roll to next snapshot release Change-Id: Ied28c6296aa3447926bcc228e867654a460d8455 Issue-ID: CCSDK-597 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 7 ++----- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 7 ++----- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 7 ++----- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 7 ++----- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 4 ++-- 29 files changed, 58 insertions(+), 70 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 734d2cb75..4bf963664 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,21 +6,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - - true - diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index d03a5cc24..e00fe9a4d 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 659230db4..92d56e0e5 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 31b0b5cf8..188cb84d8 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 3d157265d..65fec69a8 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 34fe40b9e..44fabdaa7 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 10a040854..d38e69d2d 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index b7d125101..a36b53f14 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,20 +6,17 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - - true - diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 7bb1d928a..d02374ff5 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 3c95e4067..7019ff6f8 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index a5c1596af..3fc432d14 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index bb815423a..7636b0160 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 49d145da5..5a828f026 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 82f5fbc33..061ed9942 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 2105991e5..9c69e12d8 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index b8acce508..7a7f1faa3 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -7,20 +7,17 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} - - true - diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 007bac172..9cc865ffb 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 2f52192d3..814c8afc4 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index b02fe9c1e..d913625f6 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 9399580fb..57d773581 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,21 +6,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} - - true - diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 82b9fef3f..25a22892a 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index ad80220d9..99e77356a 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index b394c8f45..04071f991 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 058d6126c..3a196d1e3 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index b168f778f..d87f6b10f 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 406683885..6097cee74 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 2b1d55151..ace219ab2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT 4.0.0 @@ -114,7 +114,7 @@ ONAP - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 702a0cb22..4c166937b 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 881489379..36aa8e3f6 100644 --- a/version.properties +++ b/version.properties @@ -5,10 +5,10 @@ release_name=0 sprint_number=3 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version} +release_version=${base_version}-STAGING snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 24794310b1cc8015eb171b8a89a8072c3bcf2434 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Wed, 10 Oct 2018 20:19:50 +0000 Subject: update handling of dmaap errors Update handling of dmaap errors in MessageRouterHttpClient. Instead of calling processMessage just log the error body message because the downstream client can't handle these type of exceptions. Change-Id: I3cee7f81ecbc316226a38908fb4f07ab04c1b64e Issue-ID: CCSDK-618 Signed-off-by: Smokowski, Kevin (ks6305) --- .../sli/northbound/dmaapclient/DmaapListener.java | 6 +- .../dmaapclient/MessageRouterHttpClient.java | 89 ++++++++++++---------- 2 files changed, 55 insertions(+), 40 deletions(-) mode change 100644 => 100755 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java mode change 100644 => 100755 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java old mode 100644 new mode 100755 index 7e257a125..18c00d563 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java @@ -41,7 +41,11 @@ public class DmaapListener { Properties properties = new Properties(); String propFileName = DMAAP_LISTENER_PROPERTIES; String propPath = null; - String propDir = System.getenv(SDNC_CONFIG_DIR); + String propDir = System.getProperty(SDNC_CONFIG_DIR); + if(propDir == null) { + propDir = System.getenv(SDNC_CONFIG_DIR); + LOG.debug(SDNC_CONFIG_DIR + " read from environment variable with value " + propDir); + } List consumers = new LinkedList<>(); if (args.length > 0) { diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java old mode 100644 new mode 100755 index c02ec5df3..2a9e0b145 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/MessageRouterHttpClient.java @@ -64,45 +64,56 @@ public class MessageRouterHttpClient implements SdncDmaapConsumer { } - @Override - public void run() { - if (isReady) { - isRunning = true; - while (isRunning) { - try { - Response response = getMessages.invoke(); - Log.info("GET " + uri + " returned http status " + response.getStatus()); - String entity = response.readEntity(String.class); - if (entity.contains("{")) { - // Get rid of opening [" - entity = entity.substring(2); - // Get rid of closing "] - entity = entity.substring(0, entity.length() - 2); - // This replacement effectively un-escapes the JSON - for (String message : entity.split("\",\"")) { - try { - processMsg(message.replace("\\\"", "\"")); - } catch (InvalidMessageException e) { - Log.error("Message could not be processed", e); - } - } - } else { - Log.info("Entity doesn't appear to contain JSON elements"); - } - } catch (Exception e) { - Log.error("GET " + uri + " failed.", e); - } finally { - Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + uri + " again."); - try { - Thread.sleep(fetchPause); - } catch (InterruptedException e) { - Log.error("Could not sleep thread", e); - Thread.currentThread().interrupt(); - } - } - } - } - } + @Override + public void run() { + if (isReady) { + isRunning = true; + while (isRunning) { + try { + Response response = getMessages.invoke(); + Log.info("GET " + uri + " returned http status " + response.getStatus()); + String entity = response.readEntity(String.class); + if (response.getStatus() < 300) { + if (entity.contains("{")) { + // Get rid of opening [" + entity = entity.substring(2); + // Get rid of closing "] + entity = entity.substring(0, entity.length() - 2); + // This replacement effectively un-escapes the JSON + for (String message : entity.split("\",\"")) { + try { + processMsg(message.replace("\\\"", "\"")); + } catch (InvalidMessageException e) { + Log.error("Message could not be processed", e); + } + } + } else { + if (entity.length() < 1) { + Log.info("GET was successful, but the server returned an empty message body."); + } else { + Log.info( + "GET was successful, but entity is not valid JSON. Message body will be logged, but not processed"); + Log.info(entity); + } + } + } else { + Log.info("GET failed, message body will be logged, but not processed."); + Log.info(entity); + } + } catch (Exception e) { + Log.error("GET " + uri + " failed.", e); + } finally { + Log.info("Pausing " + fetchPause + " milliseconds before fetching from " + uri + " again."); + try { + Thread.sleep(fetchPause); + } catch (InterruptedException e) { + Log.error("Could not sleep thread", e); + Thread.currentThread().interrupt(); + } + } + } + } + } @Override public void init(Properties baseProperties, String consumerPropertiesPath) { -- cgit 1.2.3-korg From ee7f568ad7f2c136ffbdf1bd16afd92875f6a182 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 11 Oct 2018 16:20:15 -0400 Subject: Prepare for RC0 release Update to prepare for RC0 release build: remove -STAGING tag from release version and use released parent poms. Change-Id: I45e31eca955943ca66ec90db826a50d42f1f1d69 Issue-ID: CCSDK-617 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- version.properties | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 4bf963664..46540dbe7 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index e00fe9a4d..13ff659fd 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 92d56e0e5..aabebb4c6 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 188cb84d8..bb177871b 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 65fec69a8..f05f7d00b 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 44fabdaa7..3dd282706 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index d38e69d2d..8b6fa3f1a 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index a36b53f14..8e10406c3 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index d02374ff5..a5f343ebb 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 7019ff6f8..d711837bb 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 3fc432d14..07d183aa6 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 7636b0160..7a9d6a786 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 5a828f026..214a0848d 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 061ed9942..01700d9d1 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 9c69e12d8..92ab049ca 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 7a7f1faa3..6c4a01cbf 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 9cc865ffb..0d5d33417 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 814c8afc4..dde903d6d 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/pom.xml b/features/pom.xml index d913625f6..9c5909465 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 57d773581..9228ef9ca 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 25a22892a..b8241d69a 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 99e77356a..46c16b055 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 04071f991..8afffb4bb 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 3a196d1e3..bb465814c 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/pom.xml b/lcm/pom.xml index d87f6b10f..8108cd34d 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 6097cee74..7b581df77 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/pom.xml b/pom.xml index ace219ab2..e474168de 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 885dea0c8..5f51bb371 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.northbound diff --git a/version.properties b/version.properties index 36aa8e3f6..9f280ea3e 100644 --- a/version.properties +++ b/version.properties @@ -9,6 +9,6 @@ feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 9004b3654edc1d03a13564e09e741528f4da0a3f Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 23 Oct 2018 08:36:33 -0400 Subject: Roll to initial Dublin snapshot Roll version to initial Dublin snapshot Change-Id: Ic33e690da810cca17d7ff8cd028bb5028558fd17 Issue-ID: CCSDK-617 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 6 +++--- 29 files changed, 59 insertions(+), 59 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 46540dbe7..a83535f58 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 13ff659fd..6ce4e1317 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index aabebb4c6..4f15557ad 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index bb177871b..5e288db62 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index f05f7d00b..85ba01058 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 3dd282706..fe33ea701 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 8b6fa3f1a..2a918df20 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 8e10406c3..260253bc4 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index a5f343ebb..9085dcbba 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index d711837bb..26477be13 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 07d183aa6..f937fab37 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 7a9d6a786..78b605d99 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 214a0848d..3d68052bc 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 01700d9d1..ba88bae41 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 92ab049ca..c63dddea1 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 6c4a01cbf..f9475d6c9 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -7,13 +7,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 0d5d33417..09043ce7c 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index dde903d6d..2c4e7a877 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 9c5909465..bd31c8046 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 9228ef9ca..18b22225c 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index b8241d69a..d50d3e847 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 46c16b055..c995e2fb6 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 8afffb4bb..2dcc19748 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index bb465814c..27dcbdc78 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 8108cd34d..89468a881 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 7b581df77..3d03c36ce 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index e474168de..2a1c958ec 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT 4.0.0 @@ -114,7 +114,7 @@ ONAP - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 5f51bb371..1a97b1811 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -7,12 +7,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 9f280ea3e..7439a509f 100644 --- a/version.properties +++ b/version.properties @@ -4,11 +4,11 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=0 -sprint_number=3 -feature_revision=1 +sprint_number=4 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version} +release_version=${base_version}-STAGING snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 0290fe64a150cab9b7ddfad5ae524716411d40a5 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 18 Dec 2018 00:35:54 +0530 Subject: Sonar Fix: SdncAaiDmaapConsumer.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-850 Change-Id: I4f1bb7109bddfed04ffa85df174fecdaaf9a6798 Signed-off-by: Arundathi Patil --- .../ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index 3733fa604..5cf369403 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -128,13 +129,13 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { JSONObject eventHeader = jsonObj.getJSONObject(EVENT_HEADER); for(Object key : eventHeader.keySet()) { - if (!key.equals("action")) { + if (!("action").equals(key)) { context.put(((String)key).replaceAll("-", ""), eventHeader.get((String)key)); } else { String action = (String) eventHeader.get((String) key); - if (action.equalsIgnoreCase("create")) { + if (("create").equalsIgnoreCase(action)) { context.put((String)key,"Update"); - } else if (action.equalsIgnoreCase("delete")) { + } else if (("delete").equalsIgnoreCase(action)) { context.put((String) key, "Delete"); } else { throw new IOException("Action type not supported " + action); @@ -202,7 +203,7 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { JsonNode eventTypeNode = eventHeaderNode.get(EVENT_TYPE); String eventType = eventTypeNode.textValue(); - if(AAI_EVENT.equals(eventType) == false) { + if(!AAI_EVENT.equals(eventType)) { LOG.info("Unknown Event Type {}", eventType); return; } -- cgit 1.2.3-korg From 5396e1b390bf7ebeccb5eba01ff563bf39e4fa62 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 18 Dec 2018 00:41:18 +0530 Subject: Sonar fix: SdncDmaapConsumerImpl.java Fixed sonar issues/code-smells acoss this file Issue-ID: CCSDK-851 Change-Id: Iff1156e2cafc198d00daf546699f0ff4ab34ff43 Signed-off-by: Arundathi Patil --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java index ddd871327..ee8bb4d6e 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncDmaapConsumerImpl.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -155,5 +156,5 @@ public abstract class SdncDmaapConsumerImpl implements SdncDmaapConsumer { } } - abstract public void processMsg(String msg) throws InvalidMessageException; + public abstract void processMsg(String msg) throws InvalidMessageException; } -- cgit 1.2.3-korg From 2420ec6863a87e264d02dc5dd4293b5801b7e31d Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 18 Dec 2018 15:24:11 +0530 Subject: Sonar fix: SdncLcmDmaapConsumer.java Fixed sonar issues/code-smells across this file. Issue-ID: CCSDK-854 Change-Id: I9b25a464b41ce142b6217ff0f7e40beda86eae3a Signed-off-by: Arundathi Patil --- .../onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java index 04f520bd9..f2153789f 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncLcmDmaapConsumer.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +32,6 @@ public class SdncLcmDmaapConsumer extends SdncDmaapConsumerImpl { private static final Logger LOG = LoggerFactory.getLogger(SdncLcmDmaapConsumer.class); - private static final String PARTITION = "cambria.partition"; - private static final String PARTITION_VALUE = "SDNC"; private static final String BODY = "body"; private static final String RPC = "rpc-name"; -- cgit 1.2.3-korg From feb63251ef347534f45c3cea0d04923e6cbd94ad Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 8 Jan 2019 12:29:46 -0500 Subject: Prepare for release build Prepare for release of early ODL-Oxygen based CCSDK Dublin Change-Id: I7a11b559e32f953bfd5f514a6cd402090005d9eb Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 180 ++++++++------- asdcApi/features/ccsdk-asdcApi/pom.xml | 23 +- asdcApi/features/features-asdcApi/pom.xml | 46 ++-- asdcApi/features/pom.xml | 5 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 6 +- asdcApi/pom.xml | 36 +-- asdcApi/provider/pom.xml | 10 +- dataChange/features/ccsdk-dataChange/pom.xml | 23 +- dataChange/features/features-dataChange/pom.xml | 46 ++-- dataChange/features/pom.xml | 5 +- dataChange/installer/pom.xml | 5 +- dataChange/model/pom.xml | 6 +- dataChange/pom.xml | 32 +-- dataChange/provider/pom.xml | 11 +- dmaap-listener/pom.xml | 6 +- features/ccsdk-sli-northbound-all/pom.xml | 116 +++++----- features/features-sli-northbound/pom.xml | 6 +- features/installer/pom.xml | 245 ++++++++++---------- features/pom.xml | 26 +-- lcm/features/ccsdk-lcm/pom.xml | 23 +- lcm/features/features-lcm/pom.xml | 46 ++-- lcm/features/pom.xml | 5 +- lcm/installer/pom.xml | 248 ++++++++++---------- lcm/model/pom.xml | 6 +- lcm/pom.xml | 32 +-- lcm/provider/pom.xml | 11 +- pom.xml | 230 +++++++++---------- ueb-listener/pom.xml | 291 ++++++++++++------------ version.properties | 2 +- 30 files changed, 889 insertions(+), 840 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 2a8060e9c..a89e19310 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -1,94 +1,98 @@ - 4.0.0 + 4.0.0 - org.onap.ccsdk.sli.northbound - sli-northbound-artifacts - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + sli-northbound-artifacts + 0.4.0-SNAPSHOT + pom - ccsdk-sli-northbound :: sli-northbound-artifacts - CCSDK northbound components Bill of Materials (BOM) - https://wiki.onap.org - - ONAP - - - - org.onap.ccsdk.parent - parent - 1.2.0-SNAPSHOT - - - - - - org.onap.ccsdk.sli.northbound - ccsdk-asdcApi - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.northbound - ccsdk-dataChange - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.northbound - ccsdk-lcm - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.northbound - asdcApi-model - ${project.version} - - - org.onap.ccsdk.sli.northbound - asdcApi-provider - ${project.version} - - - org.onap.ccsdk.sli.northbound - asdcApi-installer - ${project.version} - - - org.onap.ccsdk.sli.northbound - dataChange-model - ${project.version} - - - org.onap.ccsdk.sli.northbound - dataChange-provider - ${project.version} - - - org.onap.ccsdk.sli.northbound - dataChange-installer - ${project.version} - - - org.onap.ccsdk.sli.northbound - lcm-model - ${project.version} - - - org.onap.ccsdk.sli.northbound - lcm-provider - ${project.version} - - - org.onap.ccsdk.sli.northbound - lcm-installer - ${project.version} - - - + ccsdk-sli-northbound :: sli-northbound-artifacts + CCSDK northbound components Bill of Materials (BOM) + https://wiki.onap.org + + ONAP + + + + org.onap.ccsdk.parent + parent + 1.2.0 + + + + ${project.version} + + + + + + org.onap.ccsdk.sli.northbound + ccsdk-asdcApi + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.northbound + ccsdk-dataChange + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.northbound + ccsdk-lcm + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.northbound + asdcApi-model + ${project.version} + + + org.onap.ccsdk.sli.northbound + asdcApi-provider + ${project.version} + + + org.onap.ccsdk.sli.northbound + asdcApi-installer + ${project.version} + + + org.onap.ccsdk.sli.northbound + dataChange-model + ${project.version} + + + org.onap.ccsdk.sli.northbound + dataChange-provider + ${project.version} + + + org.onap.ccsdk.sli.northbound + dataChange-installer + ${project.version} + + + org.onap.ccsdk.sli.northbound + lcm-model + ${project.version} + + + org.onap.ccsdk.sli.northbound + lcm-provider + ${project.version} + + + org.onap.ccsdk.sli.northbound + lcm-installer + ${project.version} + + + diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index a83535f58..e538aab22 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -18,10 +17,14 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + ${project.version} + - - - + + + + org.opendaylight.mdsal.model mdsal-model-artifacts ${odl.mdsal.model.version} @@ -35,9 +38,9 @@ pom import - - - + + + diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 6ce4e1317..48bff872d 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.northbound - features-asdcApi - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.northbound + features-asdcApi + 0.4.0-SNAPSHOT + feature - ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - - - ${project.groupId} - ccsdk-asdcApi - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-asdcApi + ${project.version} + xml + features + + + diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 4f15557ad..a63f2ee5d 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 5e288db62..f4d1552d4 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 85ba01058..944ca8c9b 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -16,6 +16,10 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + ${project.version} + + diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index fe33ea701..f37b06974 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -1,27 +1,31 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 - + - org.onap.ccsdk.sli.northbound - asdcApi - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + asdcApi + 0.4.0-SNAPSHOT + pom ccsdk-sli-northbound :: asdcApi - - model - features - provider - installer - + + ${project.version} + + + + model + features + provider + installer + diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 2a918df20..84ac3313e 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -17,6 +16,9 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + + ${project.version} + diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 260253bc4..a18d2acf3 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -18,10 +17,14 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + ${project.version} + - - - + + + + org.opendaylight.mdsal.model mdsal-model-artifacts ${odl.mdsal.model.version} @@ -35,9 +38,9 @@ pom import - - - + + + diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 9085dcbba..792475095 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.northbound - features-dataChange - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.northbound + features-dataChange + 0.4.0-SNAPSHOT + feature - ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - - - ${project.groupId} - ccsdk-dataChange - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-dataChange + ${project.version} + xml + features + + + diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 26477be13..99b8b861f 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index f937fab37..83aaec0b1 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 78b605d99..5d2ce7d1e 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -16,6 +16,10 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + ${project.version} + + org.opendaylight.mdsal.model diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 3d68052bc..824cd58a2 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -1,26 +1,26 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 - + - org.onap.ccsdk.sli.northbound - dataChange - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + dataChange + 0.4.0-SNAPSHOT + pom ccsdk-sli-northbound :: dataChange - - model - features - provider - installer - + + model + features + provider + installer + diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index ba88bae41..09b7741d9 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -17,6 +16,10 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + + ${project.version} + + org.onap.ccsdk.sli.northbound diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index c63dddea1..86c7d54de 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.northbound @@ -28,6 +27,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} + ${project.version} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index f9475d6c9..181621b92 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -1,66 +1,68 @@ - - 4.0.0 + + 4.0.0 - - org.onap.ccsdk.parent - single-feature-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + single-feature-parent + 1.2.0 + + - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound-all - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.northbound + ccsdk-sli-northbound-all + 0.4.0-SNAPSHOT + feature - ccsdk-sli-northbound :: features :: ${project.artifactId} + ccsdk-sli-northbound :: features :: ${project.artifactId} - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - + + ${project.version} + - - - ${project.groupId} - ccsdk-asdcApi - ${project.version} - xml - features - - - ${project.groupId} - ccsdk-dataChange - ${project.version} - xml - features - - - ${project.groupId} - ccsdk-lcm - ${project.version} - xml - features - + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + ${odl.mdsal.model.version} + pom + import + + + org.opendaylight.controller + mdsal-artifacts + ${odl.mdsal.version} + pom + import + + + - - + + + ${project.groupId} + ccsdk-asdcApi + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-dataChange + ${project.version} + xml + features + + + ${project.groupId} + ccsdk-lcm + ${project.version} + xml + features + + + + diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 09043ce7c..60f8d735f 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -16,6 +16,10 @@ ccsdk-sli-northbound :: features :: ${project.artifactId} + + ${project.version} + + ${project.groupId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 2c4e7a877..37e9a269e 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -1,137 +1,136 @@ - - 4.0.0 + + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + - org.onap.ccsdk.sli.northbound - slinorthbound-features-installer - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + slinorthbound-features-installer + 0.4.0-SNAPSHOT + pom - ccsdk-sli-northbound :: features :: ${project.artifactId} + ccsdk-sli-northbound :: features :: ${project.artifactId} - - ccsdk-sli-northbound-all - ${application.name} - mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features - false - + + ccsdk-sli-northbound-all + ${application.name} + mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features + false + - + - - org.onap.ccsdk.sli.northbound - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.northbound + ${application.name} + ${project.version} + xml + features + + + * + * + + + - + - - - - maven-assembly-plugin - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false + + + + maven-assembly-plugin + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false org.onap.ccsdk.sli.northbound - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/features/pom.xml b/features/pom.xml index bd31c8046..2744c5cd3 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -1,22 +1,22 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + - org.onap.ccsdk.sli.northbound - slinorthbound-feature-aggregator - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + slinorthbound-feature-aggregator + 0.4.0-SNAPSHOT + pom - ccsdk-sli-northbound :: features + ccsdk-sli-northbound :: features - + ccsdk-sli-northbound-all features-sli-northbound installer diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 18b22225c..6138a3646 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -18,10 +17,14 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + + ${project.version} + - - - + + + + org.opendaylight.mdsal.model mdsal-model-artifacts ${odl.mdsal.model.version} @@ -35,9 +38,9 @@ pom import - - - + + + diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index d50d3e847..08e4fa8af 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.northbound - features-lcm - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.northbound + features-lcm + 0.4.0-SNAPSHOT + feature - ccsdk-sli-northbound :: lcm :: ${project.artifactId} + ccsdk-sli-northbound :: lcm :: ${project.artifactId} - - - ${project.groupId} - ccsdk-lcm - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-lcm + ${project.version} + xml + features + + + diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index c995e2fb6..27fdcefab 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 2dcc19748..e51a95e37 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -1,147 +1,147 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 - + org.onap.ccsdk.sli.northbound - lcm-installer + lcm-installer 0.4.0-SNAPSHOT - pom + pom - ccsdk-sli-northbound :: lcm :: ${project.artifactId} + ccsdk-sli-northbound :: lcm :: ${project.artifactId} - - ccsdk-lcm - ${application.name} + + ccsdk-lcm + ${application.name} mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features - false - + false + - + - - org.onap.ccsdk.sli.northbound - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.northbound + ${application.name} + ${project.version} + xml + features + + + * + * + + + org.onap.ccsdk.sli.northbound lcm-model ${project.version} - - org.onap.ccsdk.sli.northbound - lcm-provider - ${project.version} - + + org.onap.ccsdk.sli.northbound + lcm-provider + ${project.version} + - + - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.onap.ccsdk.sli.northbound - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + + + + maven-assembly-plugin + 2.6 + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.northbound + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 27dcbdc78..090ed6490 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -16,6 +16,10 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + + ${project.version} + + diff --git a/lcm/pom.xml b/lcm/pom.xml index 89468a881..54f1ba6b7 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -1,27 +1,27 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 - + - org.onap.ccsdk.sli.northbound - lcm - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.northbound + lcm + 0.4.0-SNAPSHOT + pom ccsdk-sli-northbound :: lcm - - model - features - provider - installer - + + model + features + provider + installer + diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index f383df7f1..188104038 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.northbound @@ -17,6 +16,10 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + + ${project.version} + + diff --git a/pom.xml b/pom.xml index af81f479f..bc96e012c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,121 +1,121 @@ - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - - 4.0.0 - pom - org.onap.ccsdk.sli.northbound - ccsdk-sli-northbound - - ccsdk-sli-northbound - https://wiki.onap.org - The SDN-C Northbound APIs repo contains code for northbound API adaptors, typically MD-SAL applications - - - - JIRA - https://jira.onap.org/ - - - - - scm:git:ssh://git@${onap.git.host}/sdnc-northbound.git - - scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/sdnc-northbound.git - ${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/sdnc-northbound/browse - - - - Jenkins - https://jenkins.onap.org/ - - - - - sdnc-javadoc - dav:https://${onap.nexus.host}:${onap.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version} - - - - - blackduck - - - blackduck-scan - - - - - - com.blackducksoftware.integration - hub-maven-plugin - 1.4.0 - false - - ${project.name} - ${project.basedir} - - - - create-bdio-file - package - - createHubOutput - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.17 - - false - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - https://${onap.nexus.host} - ${onap.nexus.staging.profile-id} - ${onap.nexus.staging.server-id} - - - - - - - asdcApi - dataChange - lcm - dmaap-listener - ueb-listener - features - artifacts - - - ONAP - - 0.4.0-SNAPSHOT + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + + 4.0.0 + pom + org.onap.ccsdk.sli.northbound + ccsdk-sli-northbound + + ccsdk-sli-northbound + https://wiki.onap.org + The SDN-C Northbound APIs repo contains code for northbound API adaptors, typically MD-SAL applications + + + + JIRA + https://jira.onap.org/ + + + + + scm:git:ssh://git@${onap.git.host}/sdnc-northbound.git + + scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/sdnc-northbound.git + ${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/sdnc-northbound/browse + + + + Jenkins + https://jenkins.onap.org/ + + + + + sdnc-javadoc + dav:https://${onap.nexus.host}:${onap.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version} + + + + + blackduck + + + blackduck-scan + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.17 + + false + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + https://${onap.nexus.host} + ${onap.nexus.staging.profile-id} + ${onap.nexus.staging.server-id} + + + + + + + asdcApi + dataChange + lcm + dmaap-listener + ueb-listener + features + artifacts + + + ONAP + + 0.4.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index d91a5746b..43832db85 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -1,159 +1,158 @@ - - 4.0.0 + + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + - org.onap.ccsdk.sli.northbound - ueb-listener - 0.4.0-SNAPSHOT - jar + org.onap.ccsdk.sli.northbound + ueb-listener + 0.4.0-SNAPSHOT + jar - ccsdk-sli-northbound :: ueb-listener - UEB Listener + ccsdk-sli-northbound :: ueb-listener + UEB Listener - - 1.3.0 - 1.4.7 - 2.9.4 - true - /opt/app/ueb-listener - yyyyMMdd'T'HHmmss'Z' - ${maven.build.timestamp} - ${project.version}-${build.number} - + + 1.3.0 + 1.4.7 + 2.9.4 + true + /opt/app/ueb-listener + yyyyMMdd'T'HHmmss'Z' + ${maven.build.timestamp} + ${project.version}-${build.number} + ${project.version} + - + - - org.onap.sdc.sdc-distribution-client - sdc-distribution-client - ${sdc.client.version} - compile - - - org.onap.sdc.sdc-tosca - sdc-tosca - ${sdc.tosca.version} - compile - - - org.slf4j - slf4j-api - 1.7.21 - - - org.slf4j - slf4j-log4j12 - 1.6.1 - compile - - - log4j - log4j - 1.2.17 - - - com.fasterxml.jackson.core - jackson-core - ${fasterxml.jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${fasterxml.jackson.version} - - - junit - junit - ${junit.version} - test - - - org.testng - testng - 6.11 - test - - - org.mockito - mockito-core - ${mockito.version} - test - - - ch.vorburger.mariaDB4j - mariaDB4j - 2.2.3 - test - - - org.onap.ccsdk.sli.core - dblib-provider - ${sdnctl.dblib.version} - - + + org.onap.sdc.sdc-distribution-client + sdc-distribution-client + ${sdc.client.version} + compile + + + org.onap.sdc.sdc-tosca + sdc-tosca + ${sdc.tosca.version} + compile + + + org.slf4j + slf4j-api + 1.7.21 + + + org.slf4j + slf4j-log4j12 + 1.6.1 + compile + + + log4j + log4j + 1.2.17 + + + com.fasterxml.jackson.core + jackson-core + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${fasterxml.jackson.version} + + + junit + junit + ${junit.version} + test + + + org.testng + testng + 6.11 + test + + + org.mockito + mockito-core + ${mockito.version} + test + + + ch.vorburger.mariaDB4j + mariaDB4j + 2.2.3 + test + + + org.onap.ccsdk.sli.core + dblib-provider + ${sdnctl.dblib.version} + + - - + + - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.5.1 - true - - 1.7 - 1.7 - - + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + true + + 1.7 + 1.7 + + - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - org.onap.ccsdk.sli.northbound.uebclient.SdncUebClient - - - - + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + true + org.onap.ccsdk.sli.northbound.uebclient.SdncUebClient + + + + - - maven-assembly-plugin - 2.6 - - - create-zip - - single - - package - - true - ${project.artifactId}.${project.version} - true - - src/assembly/assemble_zip.xml - - false - - - - + + maven-assembly-plugin + 2.6 + + + create-zip + + single + + package + + true + ${project.artifactId}.${project.version} + true + + src/assembly/assemble_zip.xml + + false + + + + - - + + diff --git a/version.properties b/version.properties index 7439a509f..e1b84eea2 100644 --- a/version.properties +++ b/version.properties @@ -9,6 +9,6 @@ feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 90adbb654c878bfc9e1ba61c75feb3cba8280733 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 20 Dec 2018 14:29:35 -0500 Subject: Code changes to sli/northbound for ODL Fluorine Code changes needed to support port to ODL Fluorine. Change-Id: If898ed120a3d03773db815f797f1eee633ca77e3 Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 26 +------ asdcApi/features/features-asdcApi/pom.xml | 4 +- asdcApi/features/pom.xml | 4 +- asdcApi/installer/pom.xml | 4 +- asdcApi/model/pom.xml | 8 +-- asdcApi/model/src/main/yang/ASDC-API.yang | 2 +- asdcApi/pom.xml | 4 +- asdcApi/provider/pom.xml | 20 ++++-- .../sli/northbound/asdcapi/AsdcApiProvider.java | 10 +-- dataChange/features/ccsdk-dataChange/pom.xml | 25 +------ dataChange/features/features-dataChange/pom.xml | 4 +- dataChange/features/pom.xml | 4 +- dataChange/installer/pom.xml | 4 +- dataChange/model/pom.xml | 8 +-- dataChange/pom.xml | 4 +- dataChange/provider/pom.xml | 20 ++++-- .../ccsdk/sli/northbound/DataChangeProvider.java | 4 +- .../sdnc/northbound/dataChange/TestDataChange.java | 2 +- dmaap-listener/pom.xml | 4 +- features/ccsdk-sli-northbound-all/pom.xml | 25 +------ features/features-sli-northbound/pom.xml | 4 +- features/installer/pom.xml | 4 +- features/pom.xml | 4 +- lcm/features/ccsdk-lcm/pom.xml | 27 +------- lcm/features/features-lcm/pom.xml | 4 +- lcm/features/pom.xml | 4 +- lcm/installer/pom.xml | 4 +- lcm/model/pom.xml | 8 +-- lcm/pom.xml | 4 +- lcm/provider/pom.xml | 37 +++++----- .../org/onap/ccsdk/sli/northbound/LcmProvider.java | 81 +++++++++++----------- pom.xml | 6 +- ueb-listener/pom.xml | 4 +- version.properties | 2 +- 35 files changed, 159 insertions(+), 224 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index a89e19310..d15621f98 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index e538aab22..d492848f0 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,43 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - org.onap.ccsdk.sli.core diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 48bff872d..312c7b71a 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index a63f2ee5d..260878a2c 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index f4d1552d4..f17b7a1f7 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 944ca8c9b..61384fd9b 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -24,11 +24,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/asdcApi/model/src/main/yang/ASDC-API.yang b/asdcApi/model/src/main/yang/ASDC-API.yang index 00ef4522a..12cfb9a56 100755 --- a/asdcApi/model/src/main/yang/ASDC-API.yang +++ b/asdcApi/model/src/main/yang/ASDC-API.yang @@ -13,7 +13,7 @@ module ASDC-API { import ietf-inet-types { prefix inet; - revision-date "2010-09-24"; + revision-date "2013-07-15"; } organization diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index f37b06974..c724d452a 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 84ac3313e..9d41cdca8 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -20,16 +20,24 @@ ${project.version} + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + + org.onap.ccsdk.sli.northbound asdcApi-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java index 27280d2d3..1a79f8c41 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -25,7 +25,6 @@ import java.util.Properties; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; @@ -59,6 +58,7 @@ import org.slf4j.LoggerFactory; import com.google.common.base.Optional; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; /** * Defines a base implementation for your provider. This class extends from a helper class @@ -203,7 +203,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { InstanceIdentifier.InstanceIdentifierBuilder aIdBuilder = InstanceIdentifier . builder(Artifacts.class) - .child(Artifact.class, artifact.getKey()); + .child(Artifact.class, artifact.key()); InstanceIdentifier path = aIdBuilder.build(); @@ -238,7 +238,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); + .child(VfLicenseModelVersion.class, version.key()); InstanceIdentifier path = versionIdBuilder.build(); @@ -264,7 +264,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { VfLicenseModelVersion version = vBuilder.build(); InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); + .child(VfLicenseModelVersion.class, version.key()); InstanceIdentifier path = versionIdBuilder.build(); @@ -282,7 +282,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { } @Override -public Future> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { +public ListenableFuture> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { final String svcOperation = "vf-license-model-update"; Properties parms = new Properties(); diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index a18d2acf3..16383e8c0 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,42 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 792475095..66264cd23 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 99b8b861f..02e257f89 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 83aaec0b1..d2d9b1547 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 5d2ce7d1e..aa987302e 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -23,11 +23,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 824cd58a2..b6418f4c2 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 09b7741d9..dd08e3eae 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -19,6 +19,18 @@ ${project.version} + + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + @@ -26,10 +38,6 @@ dataChange-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java index f272dbbc1..3301ca8e0 100644 --- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java +++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java @@ -25,7 +25,6 @@ package org.onap.ccsdk.sli.northbound; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; import org.opendaylight.controller.md.sal.binding.api.DataBroker; @@ -43,6 +42,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; /** * Defines a base implementation for your provider. This class extends from a helper class @@ -98,7 +98,7 @@ public class DataChangeProvider implements AutoCloseable, DataChangeService { } @Override - public Future> dataChangeNotification( + public ListenableFuture> dataChangeNotification( DataChangeNotificationInput input) { final String svcOperation = "data-change-notification"; diff --git a/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java index 7855375a3..f9c39b703 100644 --- a/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java +++ b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java @@ -19,7 +19,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.sdnc.northbound; +package org.onap.sdnc.northbound.dataChange; import org.junit.Before; import org.junit.Test; diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 86c7d54de..07c80d06f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 181621b92..f4d233827 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,41 +5,20 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - ${project.groupId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 60f8d735f..5d4433514 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 37e9a269e..644ca1c76 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 2744c5cd3..f96883608 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 6138a3646..67fadb15d 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,42 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} - ${project.version} - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - + diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 08e4fa8af..571b8e0a5 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 27fdcefab..afde4e171 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index e51a95e37..10e7bdd30 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 090ed6490..38416fe25 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -24,11 +24,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/lcm/pom.xml b/lcm/pom.xml index 54f1ba6b7..4e9f1033c 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 188104038..a6dd8637b 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -20,16 +20,17 @@ ${project.version} + - - - org.opendaylight.controller - mdsal-artifacts - 1.6.1 - pom - import - - + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + @@ -38,16 +39,15 @@ lcm-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller sal-binding-api - + + org.opendaylight.controller + sal-binding-broker-impl + org.opendaylight.controller sal-common-util @@ -95,6 +95,11 @@ 10.12.1.1 test + + org.osgi + org.osgi.core + test + diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java index 570e89ec3..d1f3ba53f 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java @@ -43,6 +43,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; import org.onap.ccsdk.sli.northbound.LcmResponseCode.*; @@ -131,7 +132,7 @@ public class LcmProvider implements AutoCloseable, LCMService { @Override - public Future> checkLock(CheckLockInput input) { + public ListenableFuture> checkLock(CheckLockInput input) { CheckLockInputBuilder iBuilder = new CheckLockInputBuilder(input); CheckLockOutputBuilder oBuilder = new CheckLockOutputBuilder(); @@ -153,7 +154,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> reboot(RebootInput input) { + public ListenableFuture> reboot(RebootInput input) { RebootInputBuilder iBuilder = new RebootInputBuilder(input); RebootOutputBuilder oBuilder = new RebootOutputBuilder(); @@ -174,7 +175,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeBackup(UpgradeBackupInput input) { + public ListenableFuture> upgradeBackup(UpgradeBackupInput input) { UpgradeBackupInputBuilder iBuilder = new UpgradeBackupInputBuilder(input); UpgradeBackupOutputBuilder oBuilder = new UpgradeBackupOutputBuilder(); @@ -196,7 +197,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> rollback(RollbackInput input) { + public ListenableFuture> rollback(RollbackInput input) { RollbackInputBuilder iBuilder = new RollbackInputBuilder(input); RollbackOutputBuilder oBuilder = new RollbackOutputBuilder(); @@ -217,7 +218,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> sync(SyncInput input) { + public ListenableFuture> sync(SyncInput input) { SyncInputBuilder iBuilder = new SyncInputBuilder(input); SyncOutputBuilder oBuilder = new SyncOutputBuilder(); @@ -238,7 +239,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> query(QueryInput input) { + public ListenableFuture> query(QueryInput input) { QueryInputBuilder iBuilder = new QueryInputBuilder(input); QueryOutputBuilder oBuilder = new QueryOutputBuilder(); @@ -259,7 +260,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configExport(ConfigExportInput input) { + public ListenableFuture> configExport(ConfigExportInput input) { ConfigExportInputBuilder iBuilder = new ConfigExportInputBuilder(input); ConfigExportOutputBuilder oBuilder = new ConfigExportOutputBuilder(); @@ -280,7 +281,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> stopApplication(StopApplicationInput input) { + public ListenableFuture> stopApplication(StopApplicationInput input) { StopApplicationInputBuilder iBuilder = new StopApplicationInputBuilder(input); StopApplicationOutputBuilder oBuilder = new StopApplicationOutputBuilder(); @@ -301,7 +302,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> softwareUpload(SoftwareUploadInput input) { + public ListenableFuture> softwareUpload(SoftwareUploadInput input) { SoftwareUploadInputBuilder iBuilder = new SoftwareUploadInputBuilder(input); SoftwareUploadOutputBuilder oBuilder = new SoftwareUploadOutputBuilder(); @@ -322,7 +323,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> resumeTraffic(ResumeTrafficInput input) { + public ListenableFuture> resumeTraffic(ResumeTrafficInput input) { ResumeTrafficInputBuilder iBuilder = new ResumeTrafficInputBuilder(input); ResumeTrafficOutputBuilder oBuilder = new ResumeTrafficOutputBuilder(); @@ -343,7 +344,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> distributeTraffic(DistributeTrafficInput input) { + public ListenableFuture> distributeTraffic(DistributeTrafficInput input) { DistributeTrafficInputBuilder iBuilder = new DistributeTrafficInputBuilder(input); DistributeTrafficOutputBuilder oBuilder = new DistributeTrafficOutputBuilder(); @@ -364,7 +365,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configure(ConfigureInput input) { + public ListenableFuture> configure(ConfigureInput input) { ConfigureInputBuilder iBuilder = new ConfigureInputBuilder(input); ConfigureOutputBuilder oBuilder = new ConfigureOutputBuilder(); @@ -385,7 +386,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> actionStatus(ActionStatusInput input) { + public ListenableFuture> actionStatus(ActionStatusInput input) { ActionStatusInputBuilder iBuilder = new ActionStatusInputBuilder(input); ActionStatusOutputBuilder oBuilder = new ActionStatusOutputBuilder(); @@ -406,7 +407,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradePreCheck(UpgradePreCheckInput input) { + public ListenableFuture> upgradePreCheck(UpgradePreCheckInput input) { UpgradePreCheckInputBuilder iBuilder = new UpgradePreCheckInputBuilder(input); UpgradePreCheckOutputBuilder oBuilder = new UpgradePreCheckOutputBuilder(); @@ -427,7 +428,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> liveUpgrade(LiveUpgradeInput input) { + public ListenableFuture> liveUpgrade(LiveUpgradeInput input) { LiveUpgradeInputBuilder iBuilder = new LiveUpgradeInputBuilder(input); LiveUpgradeOutputBuilder oBuilder = new LiveUpgradeOutputBuilder(); @@ -448,7 +449,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configModify(ConfigModifyInput input) { + public ListenableFuture> configModify(ConfigModifyInput input) { ConfigModifyInputBuilder iBuilder = new ConfigModifyInputBuilder(input); ConfigModifyOutputBuilder oBuilder = new ConfigModifyOutputBuilder(); @@ -469,7 +470,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> restart(RestartInput input) { + public ListenableFuture> restart(RestartInput input) { RestartInputBuilder iBuilder = new RestartInputBuilder(input); RestartOutputBuilder oBuilder = new RestartOutputBuilder(); @@ -490,7 +491,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> healthCheck(HealthCheckInput input) { + public ListenableFuture> healthCheck(HealthCheckInput input) { HealthCheckInputBuilder iBuilder = new HealthCheckInputBuilder(input); HealthCheckOutputBuilder oBuilder = new HealthCheckOutputBuilder(); @@ -511,7 +512,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> lock(LockInput input) { + public ListenableFuture> lock(LockInput input) { LockInputBuilder iBuilder = new LockInputBuilder(input); LockOutputBuilder oBuilder = new LockOutputBuilder(); @@ -532,7 +533,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> terminate(TerminateInput input) { + public ListenableFuture> terminate(TerminateInput input) { TerminateInputBuilder iBuilder = new TerminateInputBuilder(input); TerminateOutputBuilder oBuilder = new TerminateOutputBuilder(); @@ -553,7 +554,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> attachVolume(AttachVolumeInput input) { + public ListenableFuture> attachVolume(AttachVolumeInput input) { AttachVolumeInputBuilder iBuilder = new AttachVolumeInputBuilder(input); AttachVolumeOutputBuilder oBuilder = new AttachVolumeOutputBuilder(); @@ -574,7 +575,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> migrate(MigrateInput input) { + public ListenableFuture> migrate(MigrateInput input) { MigrateInputBuilder iBuilder = new MigrateInputBuilder(input); MigrateOutputBuilder oBuilder = new MigrateOutputBuilder(); @@ -595,7 +596,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> quiesceTraffic(QuiesceTrafficInput input) { + public ListenableFuture> quiesceTraffic(QuiesceTrafficInput input) { QuiesceTrafficInputBuilder iBuilder = new QuiesceTrafficInputBuilder(input); QuiesceTrafficOutputBuilder oBuilder = new QuiesceTrafficOutputBuilder(); @@ -616,7 +617,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configRestore(ConfigRestoreInput input) { + public ListenableFuture> configRestore(ConfigRestoreInput input) { ConfigRestoreInputBuilder iBuilder = new ConfigRestoreInputBuilder(input); ConfigRestoreOutputBuilder oBuilder = new ConfigRestoreOutputBuilder(); @@ -637,7 +638,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeBackout(UpgradeBackoutInput input) { + public ListenableFuture> upgradeBackout(UpgradeBackoutInput input) { UpgradeBackoutInputBuilder iBuilder = new UpgradeBackoutInputBuilder(input); UpgradeBackoutOutputBuilder oBuilder = new UpgradeBackoutOutputBuilder(); @@ -658,7 +659,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> evacuate(EvacuateInput input) { + public ListenableFuture> evacuate(EvacuateInput input) { EvacuateInputBuilder iBuilder = new EvacuateInputBuilder(input); EvacuateOutputBuilder oBuilder = new EvacuateOutputBuilder(); @@ -679,7 +680,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> unlock(UnlockInput input) { + public ListenableFuture> unlock(UnlockInput input) { UnlockInputBuilder iBuilder = new UnlockInputBuilder(input); UnlockOutputBuilder oBuilder = new UnlockOutputBuilder(); @@ -700,7 +701,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configBackupDelete(ConfigBackupDeleteInput input) { + public ListenableFuture> configBackupDelete(ConfigBackupDeleteInput input) { ConfigBackupDeleteInputBuilder iBuilder = new ConfigBackupDeleteInputBuilder(input); ConfigBackupDeleteOutputBuilder oBuilder = new ConfigBackupDeleteOutputBuilder(); @@ -721,7 +722,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeSoftware(UpgradeSoftwareInput input) { + public ListenableFuture> upgradeSoftware(UpgradeSoftwareInput input) { UpgradeSoftwareInputBuilder iBuilder = new UpgradeSoftwareInputBuilder(input); UpgradeSoftwareOutputBuilder oBuilder = new UpgradeSoftwareOutputBuilder(); @@ -742,7 +743,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> stop(StopInput input) { + public ListenableFuture> stop(StopInput input) { StopInputBuilder iBuilder = new StopInputBuilder(input); StopOutputBuilder oBuilder = new StopOutputBuilder(); @@ -763,7 +764,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> detachVolume(DetachVolumeInput input) { + public ListenableFuture> detachVolume(DetachVolumeInput input) { DetachVolumeInputBuilder iBuilder = new DetachVolumeInputBuilder(input); DetachVolumeOutputBuilder oBuilder = new DetachVolumeOutputBuilder(); @@ -784,7 +785,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configScaleOut(ConfigScaleOutInput input) { + public ListenableFuture> configScaleOut(ConfigScaleOutInput input) { ConfigScaleOutInputBuilder iBuilder = new ConfigScaleOutInputBuilder(input); ConfigScaleOutOutputBuilder oBuilder = new ConfigScaleOutOutputBuilder(); @@ -805,7 +806,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradePostCheck(UpgradePostCheckInput input) { + public ListenableFuture> upgradePostCheck(UpgradePostCheckInput input) { UpgradePostCheckInputBuilder iBuilder = new UpgradePostCheckInputBuilder(input); UpgradePostCheckOutputBuilder oBuilder = new UpgradePostCheckOutputBuilder(); @@ -826,7 +827,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> test(TestInput input) { + public ListenableFuture> test(TestInput input) { TestInputBuilder iBuilder = new TestInputBuilder(input); TestOutputBuilder oBuilder = new TestOutputBuilder(); @@ -847,7 +848,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> startApplication(StartApplicationInput input) { + public ListenableFuture> startApplication(StartApplicationInput input) { StartApplicationInputBuilder iBuilder = new StartApplicationInputBuilder(input); StartApplicationOutputBuilder oBuilder = new StartApplicationOutputBuilder(); @@ -868,7 +869,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configBackup(ConfigBackupInput input) { + public ListenableFuture> configBackup(ConfigBackupInput input) { ConfigBackupInputBuilder iBuilder = new ConfigBackupInputBuilder(input); ConfigBackupOutputBuilder oBuilder = new ConfigBackupOutputBuilder(); @@ -889,7 +890,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> rebuild(RebuildInput input) { + public ListenableFuture> rebuild(RebuildInput input) { RebuildInputBuilder iBuilder = new RebuildInputBuilder(input); RebuildOutputBuilder oBuilder = new RebuildOutputBuilder(); @@ -910,7 +911,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> audit(AuditInput input) { + public ListenableFuture> audit(AuditInput input) { AuditInputBuilder iBuilder = new AuditInputBuilder(input); AuditOutputBuilder oBuilder = new AuditOutputBuilder(); @@ -931,7 +932,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> start(StartInput input) { + public ListenableFuture> start(StartInput input) { StartInputBuilder iBuilder = new StartInputBuilder(input); StartOutputBuilder oBuilder = new StartOutputBuilder(); @@ -952,7 +953,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> snapshot(SnapshotInput input) { + public ListenableFuture> snapshot(SnapshotInput input) { SnapshotInputBuilder iBuilder = new SnapshotInputBuilder(input); SnapshotOutputBuilder oBuilder = new SnapshotOutputBuilder(); diff --git a/pom.xml b/pom.xml index bc96e012c..e170498ad 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT 4.0.0 @@ -84,7 +84,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.17 false @@ -92,7 +91,6 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 true https://${onap.nexus.host} @@ -115,7 +113,7 @@ ONAP - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 43832db85..87a9dfe97 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index e1b84eea2..2a56aedac 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=4 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From fc013e3622d743a3f559cb2ce20311c83e7e8112 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 14 Mar 2019 11:33:05 -0400 Subject: Prepare for release 0.4.1 Prepare to create release version 0.4.1 by using released version of parent pom Change-Id: I9a3c60350913ed816b6db411df0009f4b755e072 Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 7 +++---- .../features/features-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/pom.xml | 5 ++--- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 36 files changed, 39 insertions(+), 41 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index d15621f98..244dba19a 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index d492848f0..0691fc211 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 312c7b71a..292cac23d 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 260878a2c..2c81542bc 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index f17b7a1f7..860563f8c 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 61384fd9b..3952fea74 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index c724d452a..3e8f12877 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 9d41cdca8..6df4ba2f2 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 13c062565..d5fa7b420 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT - + 1.2.1 + org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index d7f823cf2..07b4a039b 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 8c4eaf5cb..318ebad38 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 2cf83d76b..23ac81f5e 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index a38f085f4..0805a60c8 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 2542043a5..4c73bdae3 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 1dc855855..087f014f1 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 16383e8c0..ad1c29e5b 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 66264cd23..be8fabdc7 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 02e257f89..55f0c1428 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index d2d9b1547..0828da596 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index aa987302e..26b6b9cd0 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index b6418f4c2..cfeee532b 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index dd08e3eae..62d134ccc 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 07c80d06f..87f97bc21 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index f4d233827..471cadeb0 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 5d4433514..6b76770e7 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 644ca1c76..731b7a93c 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/pom.xml b/features/pom.xml index f96883608..957e07826 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 67fadb15d..fa2f73a94 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 571b8e0a5..7f216cb0c 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index afde4e171..0c5404744 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 10e7bdd30..df5214f65 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 38416fe25..a8f8a0c98 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/pom.xml b/lcm/pom.xml index 4e9f1033c..42b9002b9 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index a6dd8637b..49d8c7d51 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/pom.xml b/pom.xml index 031d405e1..f705e2c25 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index df20a01cf..39ba7efff 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From e530f30b4d7c3609cd026047ffaa6b3a77d0aec6 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 19 Mar 2019 17:11:28 -0400 Subject: Compile against Fluorine SR2 Updated to compile against Fluorine SR2 Change-Id: I7a104f16bfd17d30d925a6cd70dedbd6aa0f0b4c Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 37 files changed, 73 insertions(+), 73 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 244dba19a..ff7bc3f7b 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 0691fc211..d7ad2b799 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 292cac23d..a3c92f6e1 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 2c81542bc..95e71af76 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 860563f8c..d078f5aa9 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 3952fea74..384c03130 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 3e8f12877..aade65265 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 6df4ba2f2..97c39dc65 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index d5fa7b420..820054eff 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 07b4a039b..a8eec8ece 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 318ebad38..78187ef04 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 23ac81f5e..6d2d4c9a6 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 0805a60c8..5490df9f1 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 4c73bdae3..135ab35b9 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 087f014f1..ed8eb4fac 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index ad1c29e5b..dae1a3510 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index be8fabdc7..79affc6f6 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 55f0c1428..454eaa914 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 0828da596..1bf4fe3ca 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 26b6b9cd0..195ff6bf3 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index cfeee532b..211f9d997 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 62d134ccc..a4b892518 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 87f97bc21..cfdf0fa7f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 471cadeb0..13d12b467 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 6b76770e7..7e55dbf0d 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 731b7a93c..90df894f5 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 957e07826..d3aac65b5 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index fa2f73a94..086996eea 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 7f216cb0c..700b1f82c 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 0c5404744..0b04daff8 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index df5214f65..fd36b7a33 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index a8f8a0c98..b8e5c1879 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 42b9002b9..1e5f0c6a2 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 49d8c7d51..addb1d5c4 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 1b7d85d8d..34f36f486 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 39ba7efff..1894f8f30 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 2a56aedac..e40820109 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=4 -feature_revision=1 +feature_revision=2 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From b1cc7a21099f81395a51d63192c976bdc683e616 Mon Sep 17 00:00:00 2001 From: "Stilwell, David (stilwelld)" Date: Mon, 25 Mar 2019 17:01:04 +0000 Subject: Updated edgeRouterStatusChange.map Changes-made: Added additional entries to edgeRouterStatusChange.map Change-Id: I7e7c42d6a4b292b76758fd8cfccf7a091daa016e Issue-ID: CCSDK-1179 Signed-off-by: Stilwell, David (stilwelld) --- .../src/main/resources/edgeRouterStatusChange.map | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/resources/edgeRouterStatusChange.map b/dmaap-listener/src/main/resources/edgeRouterStatusChange.map index 57644bbd5..fa5ff0784 100644 --- a/dmaap-listener/src/main/resources/edgeRouterStatusChange.map +++ b/dmaap-listener/src/main/resources/edgeRouterStatusChange.map @@ -20,4 +20,25 @@ inms_list => inms-list encrypted_access_flag => encrypted-access-flag sw_name => sw-name nmipaddr => nm-addr -function_code => function-code \ No newline at end of file +function_code => function-code + +EquipmentId => equip-id +PTNIIEquipmentName => equip-name +EquipmentType => equip-type +Loopback0 => loopback0 +RouterStatus => prov-status +Region => region +CountryAbbreviation => country +EquipmentNameCode => equip-name-code +ASNumber => as-number +SoftwareName => sw-name +NetworkManagementIPAddress => nm-addr +FunctionCode => function-code +Loopback1 => loopback1 +Loopback2 => loopback2 +Loopback3 => loopback3 +Loopback40 => loopback40 +Loopback65535 => loopback65535 +InmsList => inms-list +EncryptedAccessFlag => encrypted-access-flag + -- cgit 1.2.3-korg From cd1d3ffe4a39154f6bef75108635761828907dd9 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Wed, 10 Apr 2019 21:15:13 -0500 Subject: DMAAP Listener support for SDNR OOF PCI DMAAP Consumer JAVA files and resources (.map, .vt) Change-Id: I0027d3f092afc4b89aed1cc756a62d5eb169f5c3 Issue-ID: CCSDK-1216 Signed-off-by: SandeepLinux --- .../ANRChangesFromPolicyToSDNRDmaapConsumer.java | 343 +++++++++++++++++++++ .../PciChangesFromPolicyToSDNRDmaapConsumer.java | 314 +++++++++++++++++++ .../resources/anr-changes-from-policy-to-sdnr.map | 5 + .../anr-pci-changes-from-policy-to-sndr.vt | 8 + .../resources/pci-changes-from-policy-to-sdnr.map | 5 + 5 files changed, 675 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java create mode 100644 dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map create mode 100644 dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt create mode 100644 dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java new file mode 100644 index 000000000..5bc2c6011 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java @@ -0,0 +1,343 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.json.JSONArray; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class ANRChangesFromPolicyToSDNRDmaapConsumer extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(ANRChangesFromPolicyToSDNRDmaapConsumer.class); + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + private static final String TEMPLATE = "SDNC.template"; + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + + private static final String PARAMETER_NAME = "parameter-name"; + private static final String STRING_VALUE = "string-value"; + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT = "generic-neighbor-configuration-input."; + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE = GENERIC_NEIGHBOR_CONFIGURATION_INPUT.concat("neighbor-list-in-use"); + private static final String EVENT_HEADER = "event-header"; + private static final String ACTION = "Action"; + private static final String PAYLOAD = "Payload"; + private static final String CONFIGURATIONS = "Configurations"; + private static final String MODIFY_CONFIG_ANR = "ModifyConfigANR"; + private static final String MAP_FILE_NAME = "anr-changes-from-policy-to-sdnr"; + private static final String DATA = "data"; + private static final String FAP_SERVICE = "FAPService"; + private static final String SLI_PARAMETERS = "sli_parameters"; + private static final String RPC_NAME = "rpc-name"; + private static final String BODY = "body"; + private static final String INPUT = "input"; + + private String rootDir; + + protected VelocityEngine velocityEngine; + + public ANRChangesFromPolicyToSDNRDmaapConsumer() { + velocityEngine = new VelocityEngine(); + Properties props = new Properties(); + rootDir = System.getenv(DMAAPLISTENERROOT); + + if ((rootDir == null) || (rootDir.length() == 0)) { + rootDir = "/opt/app/dmaap-listener/lib/"; + } + else { + rootDir = rootDir + "/lib/"; + } + + props.put("file.resource.loader.path", rootDir); + velocityEngine.init(props); + } + + /* + * for testing purposes + */ + ANRChangesFromPolicyToSDNRDmaapConsumer(Properties props) { + velocityEngine = new VelocityEngine(); + velocityEngine.init(props); + } + + protected String publish(String templatePath, String jsonString, JsonNode dataNode) throws IOException, InvalidMessageException + { + if (templatePath.contains("anr-pci-changes-from-policy-to-sdnr")){ + return publishANRChangesFromPolicyToSDNR(templatePath, dataNode); + } else { + return publishFullMessage(templatePath, jsonString); + } + } + + private String publishFullMessage(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + for(Object key : jsonObj.keySet()) + { + context.put((String)key, jsonObj.get((String)key)); + } + + String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); + context.put("req_id", id); + + context.put("curr_time", Instant.now()); + + ObjectMapper oMapper = new ObjectMapper(); + + String rpcMsgbody = oMapper.writeValueAsString(jsonString); + context.put("full_message", rpcMsgbody); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + } + + private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode) throws IOException, InvalidMessageException + { + VelocityContext context = new VelocityContext(); + + String RPC_NAME_KEY_IN_VT = "rpc_name"; + String RPC_NAME_VALUE_IN_VT = "generic-neighbor-configuration"; + + String CELL_CONFIG = "CellConfig"; + String ALIAS_LABEL = "alias"; + String LTE = "LTE"; + String RAN = "RAN"; + String LTE_CELL = "LTECell"; + String NEIGHBOR_LIST_IN_USE = "NeighborListInUse"; + + JSONObject numberOfEntries = new JSONObject(); + JSONObject alias = new JSONObject(); + JSONArray sliParametersArray = new JSONArray(); + + String aliasValue = dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS_LABEL).textValue(); + + JsonNode nbrListInUse = dataNode.get(DATA).get(FAP_SERVICE).get(CELL_CONFIG).get(LTE).get(RAN).get(NEIGHBOR_LIST_IN_USE).get(LTE_CELL); + + int entryCount = 0; + + if(nbrListInUse.isArray()) { + for(JsonNode lteCell:nbrListInUse) { + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"plmnid") + .put(STRING_VALUE, lteCell.get("PLMNID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"cid") + .put(STRING_VALUE, lteCell.get("CID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"phy-cell-id") + .put(STRING_VALUE, lteCell.get("PhyCellID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"pnf-name") + .put(STRING_VALUE, lteCell.get("PNFName"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"blacklisted") + .put(STRING_VALUE, lteCell.get("Blacklisted"))); + + entryCount++; + } + + alias.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+ALIAS_LABEL); + alias.put(STRING_VALUE, aliasValue); + + numberOfEntries.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+"number-of-neighbor-cell-entries"); + numberOfEntries.put(STRING_VALUE, entryCount); + + sliParametersArray.put(alias); + sliParametersArray.put(numberOfEntries); + + context.put(SLI_PARAMETERS, sliParametersArray); + + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + + }else { + throw new InvalidMessageException("nbrListInUse is not of Type Array. Could not read neighbor list elements"); + } + + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode anrChangesRootNode; + try { + anrChangesRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode rpcname = anrChangesRootNode.get(RPC_NAME); + if(rpcname == null) { + LOG.info("Missing rpc-name node."); + return; + } + + if(!MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname.textValue())) { + LOG.info("Unknown rpc name {}", rpcname); + return; + } + + JsonNode body = anrChangesRootNode.get(BODY); + if(body == null) { + LOG.info("Missing body node."); + return; + } + + JsonNode input = body.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode action = input.get(ACTION); + if(action == null) { + LOG.info("Missing action node."); + return; + } + + if(!MODIFY_CONFIG_ANR.equals(action.textValue())) { + LOG.info("Unknown Action {}", action); + return; + } + + JsonNode payload = input.get(PAYLOAD); + if(payload == null) { + LOG.info("Missing payload node."); + return; + } + + String payloadText = payload.asText(); + + if(!payloadText.contains(CONFIGURATIONS)) { + LOG.info("Missing configurations node."); + return; + } + + JsonNode configurationsJsonNode; + try { + configurationsJsonNode = oMapper.readTree(payloadText); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse payload value", e); + } + + String mapFilename = rootDir + MAP_FILE_NAME + ".map"; + Map fieldMap = loadMap(mapFilename); + if (fieldMap == null) { + return; + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + return; + } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + if (!fieldMap.containsKey(TEMPLATE)) { + throw new InvalidMessageException("No SDNC template known for message "); + } + String templateName = fieldMap.get(TEMPLATE); + + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); + + if(configurations.isArray()) { + for(JsonNode dataNode:configurations) { + if(dataNode.get(DATA).get(FAP_SERVICE) == null) { + LOG.info("Could not make a rpc call. Missing fapService node for dataNode element::", dataNode.textValue()); + }else { + try { + + String rpcMsgbody = publish(templateName, msg, dataNode); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + } + }else { + throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); + } + } + + private Map loadMap(String mapFilename) { + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error(String.format("Cannot read map file (%s)", mapFilename)); + return null; + } + + Map results = new HashMap<>(); + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { + + String curLine; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map " + mapFilename, e); + return null; + } + + return results; + } + +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java new file mode 100644 index 000000000..8c44377f9 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java @@ -0,0 +1,314 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.json.JSONArray; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class PciChangesFromPolicyToSDNRDmaapConsumer extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(PciChangesFromPolicyToSDNRDmaapConsumer.class); + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + private static final String TEMPLATE = "SDNC.template"; + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + + private static final String PARAMETER_NAME = "parameter-name"; + private static final String STRING_VALUE = "string-value"; + private static final String PHYSICAL_CELL_ID_INPUT_FAP_SERVICE = "configuration-phy-cell-id-input.fap-service"; + private static final String EVENT_HEADER = "event-header"; + private static final String ACTION = "Action"; + private static final String PAYLOAD = "Payload"; + private static final String CONFIGURATIONS = "Configurations"; + private static final String MODIFY_CONFIG = "ModifyConfig"; + private static final String MAP_FILE_NAME = "pci-changes-from-policy-to-sdnr"; + private static final String DATA = "data"; + private static final String FAP_SERVICE = "FAPService"; + private static final String SLI_PARAMETERS = "sli_parameters"; + private static final String RPC_NAME = "rpc-name"; + private static final String BODY = "body"; + private static final String INPUT = "input"; + + private String rootDir; + + protected VelocityEngine velocityEngine; + + public PciChangesFromPolicyToSDNRDmaapConsumer() { + velocityEngine = new VelocityEngine(); + Properties props = new Properties(); + rootDir = System.getenv(DMAAPLISTENERROOT); + + if ((rootDir == null) || (rootDir.length() == 0)) { + rootDir = "/opt/app/dmaap-listener/lib/"; + } + else { + rootDir = rootDir + "/lib/"; + } + + props.put("file.resource.loader.path", rootDir); + velocityEngine.init(props); + } + + /* + * for testing purposes + */ + PciChangesFromPolicyToSDNRDmaapConsumer(Properties props) { + velocityEngine = new VelocityEngine(); + velocityEngine.init(props); + } + + protected String publish(String templatePath, String jsonString, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException + { + if (templatePath.contains("anr-pci-changes-from-policy-to-sdnr")){ + return publishPciChangesFromPolicyToSDNR(templatePath, configurationsJsonNode); + } else { + return publishFullMessage(templatePath, jsonString); + } + } + + private String publishFullMessage(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + for(Object key : jsonObj.keySet()) + { + context.put((String)key, jsonObj.get((String)key)); + } + + String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); + context.put("req_id", id); + + context.put("curr_time", Instant.now()); + + ObjectMapper oMapper = new ObjectMapper(); + + String rpcMsgbody = oMapper.writeValueAsString(jsonString); + context.put("full_message", rpcMsgbody); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + } + + private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException + { + String RPC_NAME_KEY_IN_VT = "rpc_name"; + String RPC_NAME_VALUE_IN_VT = "configuration-phy-cell-id"; + String ALIAS = "alias"; + String X0005b9Lte = "X0005b9Lte"; + + VelocityContext context = new VelocityContext(); + + JSONObject numberOfEntries = new JSONObject(); + JSONArray sliParametersArray = new JSONArray(); + + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); + + int entryCount = 0; + + if(configurations.isArray()) { + for(JsonNode dataNode:configurations) { + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+ALIAS) + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"cid") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get("CellConfig").get("LTE").get("RAN").get("Common").get("CellIdentity"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"phy-cell-id-in-use") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("phyCellIdInUse"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"pnf-name") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName"))); + entryCount++; + } + + numberOfEntries.put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"-number-of-entries"); + numberOfEntries.put(STRING_VALUE, entryCount); + + sliParametersArray.put(numberOfEntries); + + context.put(SLI_PARAMETERS, sliParametersArray); + + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); + writer.flush(); + + return writer.toString(); + + }else { + throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); + } + + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode pciChangesRootNode; + try { + pciChangesRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode rpcname = pciChangesRootNode.get(RPC_NAME); + if(rpcname == null) { + LOG.info("Missing rpc-name node."); + return; + } + + if(!MODIFY_CONFIG.toLowerCase().equals(rpcname.textValue())) { + LOG.info("Unknown rpc name {}", rpcname); + return; + } + + JsonNode body = pciChangesRootNode.get(BODY); + if(body == null) { + LOG.info("Missing body node."); + return; + } + + JsonNode input = body.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode action = input.get(ACTION); + if(action == null) { + LOG.info("Missing action node."); + return; + } + + if(!MODIFY_CONFIG.equals(action.textValue())) { + LOG.info("Unknown Action {}", action); + return; + } + + JsonNode payload = input.get(PAYLOAD); + if(payload == null) { + LOG.info("Missing payload node."); + return; + } + + String configurations = payload.asText(); + + if(!configurations.contains(CONFIGURATIONS)) { + LOG.info("Missing configurations node."); + return; + } + + JsonNode configurationsJsonNode; + try { + configurationsJsonNode = oMapper.readTree(configurations); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse payload value", e); + } + + String mapFilename = rootDir + MAP_FILE_NAME + ".map"; + Map fieldMap = loadMap(mapFilename); + if (fieldMap == null) { + return; + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + return; + } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + if (!fieldMap.containsKey(TEMPLATE)) { + throw new InvalidMessageException("No SDNC template known for message "); + } + String templateName = fieldMap.get(TEMPLATE); + + try { + String rpcMsgbody = publish(templateName, msg, configurationsJsonNode); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + + private Map loadMap(String mapFilename) { + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error(String.format("Cannot read map file (%s)", mapFilename)); + return null; + } + + Map results = new HashMap<>(); + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { + + String curLine; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map " + mapFilename, e); + return null; + } + + return results; + } + +} diff --git a/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map b/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map new file mode 100644 index 000000000..e7c45b253 --- /dev/null +++ b/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map @@ -0,0 +1,5 @@ +# SDN-C URL +SDNC.endpoint => oofpcipoc-api:generic-neighbour-configuration + +# Field mapping +SDNC.template => anr-pci-changes-from-policy-to-sdnr.vt diff --git a/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt b/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt new file mode 100644 index 000000000..1cdd65e9c --- /dev/null +++ b/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt @@ -0,0 +1,8 @@ +{ + "input": { + "module-name": "oofpcipoc-api", + "rpc-name": $rpc_name, + "mode": "sync", + "sli-parameter": $sli_parameters + } +} \ No newline at end of file diff --git a/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map b/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map new file mode 100644 index 000000000..44c34a4d4 --- /dev/null +++ b/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map @@ -0,0 +1,5 @@ +# SDN-C URL +SDNC.endpoint => oofpcipoc-api:configuration-phy-cell-id + +# Field mapping +SDNC.template => anr-pci-changes-from-policy-to-sdnr.vt -- cgit 1.2.3-korg From dc1ac454bb77359e466395a4a92891f7cebda2a2 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Sun, 14 Apr 2019 11:19:29 -0500 Subject: JUNIT tests for SDNR OOF PCI Dmaap Listener JUNIT test JAVA files and name change for .vt file Change-Id: I513b9abd72d4c230f57ae3f89a8fafc5f72e7cfa Issue-ID: CCSDK-1226 Signed-off-by: SandeepLinux --- .../anr-pci-changes-from-policy-to-sdnr.vt | 8 + .../anr-pci-changes-from-policy-to-sndr.vt | 8 - ...estANRChangesFromPolicyToSDNRDmaapConsumer.java | 142 ++++++++++++++++ ...estPciChangesFromPolicyToSDNRDmaapConsumer.java | 181 +++++++++++++++++++++ 4 files changed, 331 insertions(+), 8 deletions(-) create mode 100644 dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt delete mode 100644 dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt b/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt new file mode 100644 index 000000000..1ded88dc7 --- /dev/null +++ b/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt @@ -0,0 +1,8 @@ +{ + "input": { + "module-name": "oofpcipoc-api", + "rpc-name": "$rpc_name", + "mode": "sync", + "sli-parameter": $sli_parameters + } +} diff --git a/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt b/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt deleted file mode 100644 index 1cdd65e9c..000000000 --- a/dmaap-listener/src/main/resources/anr-pci-changes-from-policy-to-sndr.vt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "input": { - "module-name": "oofpcipoc-api", - "rpc-name": $rpc_name, - "mode": "sync", - "sli-parameter": $sli_parameters - } -} \ No newline at end of file diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java new file mode 100644 index 000000000..66b63a17d --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java @@ -0,0 +1,142 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestANRChangesFromPolicyToSDNRDmaapConsumer { + private static final String anrChangesFromPolicyToSDNRInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"Action\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""; + + @Before + public void setUp() throws Exception { + } + + @Test + public void testRPCMessageBodyResponse() throws Exception { + Properties props = new Properties(); + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode anrChangesRootNode = oMapper.readTree(anrChangesFromPolicyToSDNRInput); + JsonNode body = anrChangesRootNode.get("body"); + JsonNode input = body.get("input"); + JsonNode payload = input.get("Payload"); + String payloadText = payload.asText(); + JsonNode configurationsJsonNode = oMapper.readTree(payloadText); + JsonNode configurations = configurationsJsonNode.get("Configurations"); + + for(JsonNode dataNode:configurations) { + String rpcMsgbody = new ANRChangesFromPolicyToSDNRDmaapConsumer(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", anrChangesFromPolicyToSDNRInput,dataNode); + + JsonNode rootNode; + try { + rootNode = oMapper.readTree(rpcMsgbody); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + assertTrue(rootNode.get("input").get("module-name") != null); + assertTrue(rootNode.get("input").get("rpc-name") != null); + assertTrue(rootNode.get("input").get("mode") != null); + assertTrue(rootNode.get("input").get("sli-parameter") != null); + } + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgInvalidMessage() throws Exception { + ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg("test"); + } + + @Test + public void testProcessMsgMissingActionHeader() throws Exception { + ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg("{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"NoAction\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""); + } + + @Test + public void testProcessMsgInvalidPayloadConfigurations() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"Action\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":{ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}} } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""; + + try { + ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg(msg); + + } catch (final InvalidMessageException e) { + final String errorMsg = "Cannot parse payload value"; + assertEquals(errorMsg, e.getMessage()); + } + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java new file mode 100644 index 000000000..a42bc48f6 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java @@ -0,0 +1,181 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestPciChangesFromPolicyToSDNRDmaapConsumer { + private static final String pciChangesFromPolicyToSDNRInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"Action\": \"ModifyConfig\",\n" + + " \"Payload\": \"{\\\"Configurations\\\":[{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0330\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":6,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0330\\\"}}}}}}},{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0331\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":7,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0331\\\"}}}}}}}]}\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + @Before + public void setUp() throws Exception { + } + + @Test + public void testRPCMessageBodyResponse() throws Exception { + Properties props = new Properties(); + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode pciChangesRootNode = oMapper.readTree(pciChangesFromPolicyToSDNRInput); + JsonNode body = pciChangesRootNode.get("body"); + JsonNode input = body.get("input"); + JsonNode payload = input.get("Payload"); + String payloadText = payload.asText(); + JsonNode configurationsJsonNode = oMapper.readTree(payloadText); + + String rpcMsgbody = new PciChangesFromPolicyToSDNRDmaapConsumer(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", pciChangesFromPolicyToSDNRInput,configurationsJsonNode); + + JsonNode rootNode; + try { + rootNode = oMapper.readTree(rpcMsgbody); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + assertTrue(rootNode.get("input").get("module-name") != null); + assertTrue(rootNode.get("input").get("rpc-name") != null); + assertTrue(rootNode.get("input").get("mode") != null); + assertTrue(rootNode.get("input").get("sli-parameter") != null); + + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgInvalidMessage() throws Exception { + PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg("test"); + } + + @Test + public void testProcessMsgMissingActionHeader() throws Exception { + PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg("{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"RenamedAction\": \"ModifyConfig\",\n" + + " \"Payload\": {\n" + + " \"Configurations \": {\n" + + " \"data \": {\n" + + " \"FAPService \": {\n" + + " \"alias\": \"Chn0330\",\n" + + " \"X0005b9Lte\": {\n" + + " \"phyCellIdInUse\": 6,\n" + + " \"pnfName\": \"ncserver23\"\n" + + " },\n" + + " \"CellConfig\": {\n" + + " \"LTE\": {\n" + + " \"RAN\": {\n" + + " \"Common\": {\n" + + " \"CellIdentity\": \"Chn0330\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + "\n" + + " }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"); + } + + @Test + public void testProcessMsgInvalidPayloadConfigurations() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"Action\": \"ModifyConfig\",\n" + + " \"Payload\": {\n" + + " \"Configurations \": {\n" + + " \"data \": {\n" + + " \"FAPService \": {\n" + + " \"alias\": \"Chn0330\",\n" + + " \"X0005b9Lte\": {\n" + + " \"phyCellIdInUse\": 6,\n" + + " \"pnfName\": \"ncserver23\"\n" + + " },\n" + + " \"CellConfig\": {\n" + + " \"LTE\": {\n" + + " \"RAN\": {\n" + + " \"Common\": {\n" + + " \"CellIdentity\": \"Chn0330\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + "\n" + + " }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + try { + PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); + consumer.processMsg(msg); + + } catch (final InvalidMessageException e) { + final String errorMsg = "Configurations is not of Type Array. Could not read configuration changes"; + assertEquals(errorMsg, e.getMessage()); + } + } +} -- cgit 1.2.3-korg From ed46a3907146c1abea813338a888e3318c7b1524 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 24 Apr 2019 13:07:12 -0400 Subject: Update to use released 1.2.2 parent Update to use released 1.2.2 version of parent poms. Change-Id: Ib0aba55743d4f799a2380a36cfbd5fcb9b729172 Issue-ID: CCSDK-1222 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index ff7bc3f7b..c52e716d8 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index d7ad2b799..515f8825f 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index a3c92f6e1..f55f8d748 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 95e71af76..8d87a57a3 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index d078f5aa9..2be88ee4d 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 384c03130..687a16064 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index aade65265..c77638918 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 97c39dc65..9f38c5b8c 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 820054eff..62a5b6427 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index a8eec8ece..98ad2a4a7 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 78187ef04..b98634e3b 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 6d2d4c9a6..5fba2e8ad 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 5490df9f1..9bbc32d10 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 135ab35b9..1d60d7599 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index ed8eb4fac..ae5a65ff0 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index dae1a3510..cb345476b 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 79affc6f6..bdc04f249 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 454eaa914..054e1384c 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 1bf4fe3ca..8d4f3f322 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 195ff6bf3..fb0500dc5 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 211f9d997..353b6976d 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index a4b892518..04f54bb57 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index cfdf0fa7f..a90504457 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 13d12b467..440209637 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 7e55dbf0d..99269b0bd 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 90df894f5..edf3038a5 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/pom.xml b/features/pom.xml index d3aac65b5..a7058eef3 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 086996eea..2f4c5819a 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 700b1f82c..7369792c1 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 0b04daff8..222258e44 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index fd36b7a33..643e8d333 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index b8e5c1879..267b1043c 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/pom.xml b/lcm/pom.xml index 1e5f0c6a2..72debbb3b 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index addb1d5c4..dbd914b34 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/pom.xml b/pom.xml index 34f36f486..167c5dcbe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 1867a261d..3d713246d 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From e5d3dc87cebc8461e1fe4deb919487f25bef59fb Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 30 Apr 2019 11:43:00 -0400 Subject: Roll master to El Alto Roll master version to El Alto versions Change-Id: Ib9fa2945f1d5b58c3f2c0c3c8be5716a6eb8390e Issue-ID: CCSDK-1222 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 4 ++-- 37 files changed, 74 insertions(+), 74 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index c52e716d8..dfa35f405 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.2 + 1.3.0-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 515f8825f..d3ba70ce3 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index f55f8d748..65191b77c 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 8d87a57a3..dee99361d 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 2be88ee4d..15e5bd4fe 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 687a16064..dfc5ce7e3 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index c77638918..c4055964a 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 9f38c5b8c..6ba7a5c95 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 62a5b6427..1716eba8d 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 98ad2a4a7..65bbf7d55 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index b98634e3b..0f2827cb3 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 5fba2e8ad..8d856529b 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 9bbc32d10..f6bb8c9aa 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 1d60d7599..a2f864b64 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index ae5a65ff0..d5563ba0e 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index cb345476b..a6f57f91d 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index bdc04f249..882831e49 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 054e1384c..940617e94 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 8d4f3f322..0f3ea6364 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index fb0500dc5..c20f07337 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 353b6976d..75caf3ebe 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 04f54bb57..0ebbcbd90 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index a90504457..6c43c9c18 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 440209637..94623a981 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 99269b0bd..aa07657f8 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index edf3038a5..250d3f8ce 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index a7058eef3..7d4eca129 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 2f4c5819a..1bb6a37eb 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 7369792c1..2499b9923 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 222258e44..02eda542f 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 643e8d333..db3cf5fa2 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 267b1043c..77c8b959c 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 72debbb3b..1098fd6f0 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index dbd914b34..e236d0ff8 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 167c5dcbe..e8e5c4950 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 3d713246d..b7ec6ff2f 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index e40820109..3e36988ca 100644 --- a/version.properties +++ b/version.properties @@ -4,8 +4,8 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=0 -sprint_number=4 -feature_revision=2 +sprint_number=5 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 6d6ccec6604ea2cd672bb1c453d6d1f96e9c0518 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Sun, 26 May 2019 10:37:21 -0500 Subject: Fix bug with DMAAP listener for SDNR OOFPCIPOC Replaced 2 dmaap consumers with one consumer for DMAAP topic SDNR-CL. Also updated corresponding JUNIT file. Issue-ID: CCSDK-1364 Signed-off-by: SandeepLinux Change-Id: I840a38d04423954102865a68b0e216c745ed161b --- .../ANRChangesFromPolicyToSDNRDmaapConsumer.java | 343 -------------- .../dmaapclient/OofPciPocDmaapConsumers.java | 504 +++++++++++++++++++++ .../PciChangesFromPolicyToSDNRDmaapConsumer.java | 314 ------------- ...estANRChangesFromPolicyToSDNRDmaapConsumer.java | 142 ------ .../dmaapclient/TestOofPciPocDmaapConsumers.java | 314 +++++++++++++ ...estPciChangesFromPolicyToSDNRDmaapConsumer.java | 181 -------- 6 files changed, 818 insertions(+), 980 deletions(-) delete mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java delete mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java delete mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestOofPciPocDmaapConsumers.java delete mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java deleted file mode 100644 index 5bc2c6011..000000000 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/ANRChangesFromPolicyToSDNRDmaapConsumer.java +++ /dev/null @@ -1,343 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.northbound.dmaapclient; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.time.Instant; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.json.JSONArray; -import org.json.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class ANRChangesFromPolicyToSDNRDmaapConsumer extends SdncDmaapConsumerImpl { - - private static final Logger LOG = LoggerFactory.getLogger(ANRChangesFromPolicyToSDNRDmaapConsumer.class); - private static final String SDNC_ENDPOINT = "SDNC.endpoint"; - private static final String TEMPLATE = "SDNC.template"; - private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; - - private static final String PARAMETER_NAME = "parameter-name"; - private static final String STRING_VALUE = "string-value"; - private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT = "generic-neighbor-configuration-input."; - private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE = GENERIC_NEIGHBOR_CONFIGURATION_INPUT.concat("neighbor-list-in-use"); - private static final String EVENT_HEADER = "event-header"; - private static final String ACTION = "Action"; - private static final String PAYLOAD = "Payload"; - private static final String CONFIGURATIONS = "Configurations"; - private static final String MODIFY_CONFIG_ANR = "ModifyConfigANR"; - private static final String MAP_FILE_NAME = "anr-changes-from-policy-to-sdnr"; - private static final String DATA = "data"; - private static final String FAP_SERVICE = "FAPService"; - private static final String SLI_PARAMETERS = "sli_parameters"; - private static final String RPC_NAME = "rpc-name"; - private static final String BODY = "body"; - private static final String INPUT = "input"; - - private String rootDir; - - protected VelocityEngine velocityEngine; - - public ANRChangesFromPolicyToSDNRDmaapConsumer() { - velocityEngine = new VelocityEngine(); - Properties props = new Properties(); - rootDir = System.getenv(DMAAPLISTENERROOT); - - if ((rootDir == null) || (rootDir.length() == 0)) { - rootDir = "/opt/app/dmaap-listener/lib/"; - } - else { - rootDir = rootDir + "/lib/"; - } - - props.put("file.resource.loader.path", rootDir); - velocityEngine.init(props); - } - - /* - * for testing purposes - */ - ANRChangesFromPolicyToSDNRDmaapConsumer(Properties props) { - velocityEngine = new VelocityEngine(); - velocityEngine.init(props); - } - - protected String publish(String templatePath, String jsonString, JsonNode dataNode) throws IOException, InvalidMessageException - { - if (templatePath.contains("anr-pci-changes-from-policy-to-sdnr")){ - return publishANRChangesFromPolicyToSDNR(templatePath, dataNode); - } else { - return publishFullMessage(templatePath, jsonString); - } - } - - private String publishFullMessage(String templatePath, String jsonString) throws IOException - { - JSONObject jsonObj = new JSONObject(jsonString); - VelocityContext context = new VelocityContext(); - for(Object key : jsonObj.keySet()) - { - context.put((String)key, jsonObj.get((String)key)); - } - - String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); - context.put("req_id", id); - - context.put("curr_time", Instant.now()); - - ObjectMapper oMapper = new ObjectMapper(); - - String rpcMsgbody = oMapper.writeValueAsString(jsonString); - context.put("full_message", rpcMsgbody); - - Writer writer = new StringWriter(); - velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); - writer.flush(); - - return writer.toString(); - } - - private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode) throws IOException, InvalidMessageException - { - VelocityContext context = new VelocityContext(); - - String RPC_NAME_KEY_IN_VT = "rpc_name"; - String RPC_NAME_VALUE_IN_VT = "generic-neighbor-configuration"; - - String CELL_CONFIG = "CellConfig"; - String ALIAS_LABEL = "alias"; - String LTE = "LTE"; - String RAN = "RAN"; - String LTE_CELL = "LTECell"; - String NEIGHBOR_LIST_IN_USE = "NeighborListInUse"; - - JSONObject numberOfEntries = new JSONObject(); - JSONObject alias = new JSONObject(); - JSONArray sliParametersArray = new JSONArray(); - - String aliasValue = dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS_LABEL).textValue(); - - JsonNode nbrListInUse = dataNode.get(DATA).get(FAP_SERVICE).get(CELL_CONFIG).get(LTE).get(RAN).get(NEIGHBOR_LIST_IN_USE).get(LTE_CELL); - - int entryCount = 0; - - if(nbrListInUse.isArray()) { - for(JsonNode lteCell:nbrListInUse) { - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"plmnid") - .put(STRING_VALUE, lteCell.get("PLMNID"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"cid") - .put(STRING_VALUE, lteCell.get("CID"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"phy-cell-id") - .put(STRING_VALUE, lteCell.get("PhyCellID"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"pnf-name") - .put(STRING_VALUE, lteCell.get("PNFName"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"blacklisted") - .put(STRING_VALUE, lteCell.get("Blacklisted"))); - - entryCount++; - } - - alias.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+ALIAS_LABEL); - alias.put(STRING_VALUE, aliasValue); - - numberOfEntries.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+"number-of-neighbor-cell-entries"); - numberOfEntries.put(STRING_VALUE, entryCount); - - sliParametersArray.put(alias); - sliParametersArray.put(numberOfEntries); - - context.put(SLI_PARAMETERS, sliParametersArray); - - context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); - - Writer writer = new StringWriter(); - velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); - writer.flush(); - - return writer.toString(); - - }else { - throw new InvalidMessageException("nbrListInUse is not of Type Array. Could not read neighbor list elements"); - } - - } - - @Override - public void processMsg(String msg) throws InvalidMessageException { - - if (msg == null) { - throw new InvalidMessageException("Null message"); - } - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode anrChangesRootNode; - try { - anrChangesRootNode = oMapper.readTree(msg); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } - - JsonNode rpcname = anrChangesRootNode.get(RPC_NAME); - if(rpcname == null) { - LOG.info("Missing rpc-name node."); - return; - } - - if(!MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname.textValue())) { - LOG.info("Unknown rpc name {}", rpcname); - return; - } - - JsonNode body = anrChangesRootNode.get(BODY); - if(body == null) { - LOG.info("Missing body node."); - return; - } - - JsonNode input = body.get(INPUT); - if(input == null) { - LOG.info("Missing input node."); - return; - } - - JsonNode action = input.get(ACTION); - if(action == null) { - LOG.info("Missing action node."); - return; - } - - if(!MODIFY_CONFIG_ANR.equals(action.textValue())) { - LOG.info("Unknown Action {}", action); - return; - } - - JsonNode payload = input.get(PAYLOAD); - if(payload == null) { - LOG.info("Missing payload node."); - return; - } - - String payloadText = payload.asText(); - - if(!payloadText.contains(CONFIGURATIONS)) { - LOG.info("Missing configurations node."); - return; - } - - JsonNode configurationsJsonNode; - try { - configurationsJsonNode = oMapper.readTree(payloadText); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse payload value", e); - } - - String mapFilename = rootDir + MAP_FILE_NAME + ".map"; - Map fieldMap = loadMap(mapFilename); - if (fieldMap == null) { - return; - } - - if (!fieldMap.containsKey(SDNC_ENDPOINT)) { - return; - } - String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); - - if (!fieldMap.containsKey(TEMPLATE)) { - throw new InvalidMessageException("No SDNC template known for message "); - } - String templateName = fieldMap.get(TEMPLATE); - - JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); - - if(configurations.isArray()) { - for(JsonNode dataNode:configurations) { - if(dataNode.get(DATA).get(FAP_SERVICE) == null) { - LOG.info("Could not make a rpc call. Missing fapService node for dataNode element::", dataNode.textValue()); - }else { - try { - - String rpcMsgbody = publish(templateName, msg, dataNode); - String odlUrlBase = getProperty("sdnc.odl.url-base"); - String odlUser = getProperty("sdnc.odl.user"); - String odlPassword = getProperty("sdnc.odl.password"); - - if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { - SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); - - conn.send("POST", "application/json", rpcMsgbody); - } else { - LOG.info("POST message body would be:\n" + rpcMsgbody); - } - } catch (Exception e) { - LOG.error("Unable to process message", e); - } - } - } - }else { - throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); - } - } - - private Map loadMap(String mapFilename) { - File mapFile = new File(mapFilename); - - if (!mapFile.canRead()) { - LOG.error(String.format("Cannot read map file (%s)", mapFilename)); - return null; - } - - Map results = new HashMap<>(); - try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { - - String curLine; - - while ((curLine = mapReader.readLine()) != null) { - curLine = curLine.trim(); - - if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { - String[] entry = curLine.split("=>"); - if (entry.length == 2) { - results.put(entry[0].trim(), entry[1].trim()); - } - } - } - mapReader.close(); - } catch (Exception e) { - LOG.error("Caught exception reading map " + mapFilename, e); - return null; - } - - return results; - } - -} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java new file mode 100644 index 000000000..2e6ae742b --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java @@ -0,0 +1,504 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.json.JSONArray; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(OofPciPocDmaapConsumers.class); + private static final String SDNC_ENDPOINT = "SDNC.endpoint"; + private static final String TEMPLATE = "SDNC.template"; + private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; + private static final String UTF_8 = "UTF-8"; + + private static final String PARAMETER_NAME = "parameter-name"; + private static final String STRING_VALUE = "string-value"; + private static final String PHYSICAL_CELL_ID_INPUT_FAP_SERVICE = "configuration-phy-cell-id-input.fap-service"; + private static final String EVENT_HEADER = "event-header"; + private static final String ACTION = "Action"; + private static final String CONFIGURATIONS = "Configurations"; + private static final String MODIFY_CONFIG = "ModifyConfig"; + private static final String DATA = "data"; + private static final String FAP_SERVICE = "FAPService"; + + private static final String PAYLOAD = "Payload"; + private static final String PCI_CHANGES_MAP_FILE_NAME = "pci-changes-from-policy-to-sdnr"; + private static final String SLI_PARAMETERS = "sli_parameters"; + private static final String RPC_NAME = "rpc-name"; + private static final String BODY = "body"; + private static final String INPUT = "input"; + + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT = "generic-neighbor-configuration-input."; + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE = GENERIC_NEIGHBOR_CONFIGURATION_INPUT.concat("neighbor-list-in-use"); + private static final String MODIFY_CONFIG_ANR = "ModifyConfigANR"; + private static final String ANR_CHANGES_MAP_FILE_NAME = "anr-changes-from-policy-to-sdnr"; + + private String rootDir; + + protected VelocityEngine velocityEngine; + + public OofPciPocDmaapConsumers() { + velocityEngine = new VelocityEngine(); + Properties props = new Properties(); + rootDir = System.getenv(DMAAPLISTENERROOT); + + if ((rootDir == null) || (rootDir.length() == 0)) { + rootDir = "/opt/app/dmaap-listener/lib/"; + } + else { + rootDir = rootDir + "/lib/"; + } + + props.put("file.resource.loader.path", rootDir); + velocityEngine.init(props); + } + + /* + * for testing purposes + */ + OofPciPocDmaapConsumers(Properties props) { + velocityEngine = new VelocityEngine(); + velocityEngine.init(props); + } + + protected String publish(String templatePath, String jsonString, JsonNode configurationsOrDataNode, boolean invokePciChangesPublish, boolean invokeAnrChangesPublish) throws IOException, InvalidMessageException + { + if (invokePciChangesPublish){ + return publishPciChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode); + } else if (invokeAnrChangesPublish){ + return publishANRChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode); + } else { + return publishFullMessage(templatePath, jsonString); + } + } + + private String publishFullMessage(String templatePath, String jsonString) throws IOException + { + JSONObject jsonObj = new JSONObject(jsonString); + VelocityContext context = new VelocityContext(); + for(Object key : jsonObj.keySet()) + { + context.put((String)key, jsonObj.get((String)key)); + } + + String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); + context.put("req_id", id); + + context.put("curr_time", Instant.now()); + + ObjectMapper oMapper = new ObjectMapper(); + + String rpcMsgbody = oMapper.writeValueAsString(jsonString); + context.put("full_message", rpcMsgbody); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, UTF_8, context, writer); + writer.flush(); + + return writer.toString(); + } + + private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode) throws IOException, InvalidMessageException + { + VelocityContext context = new VelocityContext(); + + String RPC_NAME_KEY_IN_VT = "rpc_name"; + String RPC_NAME_VALUE_IN_VT = "generic-neighbor-configuration"; + + String CELL_CONFIG = "CellConfig"; + String ALIAS_LABEL = "alias"; + String LTE = "LTE"; + String RAN = "RAN"; + String LTE_CELL = "LTECell"; + String NEIGHBOR_LIST_IN_USE = "NeighborListInUse"; + + JSONObject numberOfEntries = new JSONObject(); + JSONObject alias = new JSONObject(); + JSONArray sliParametersArray = new JSONArray(); + + String aliasValue = dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS_LABEL).textValue(); + + JsonNode nbrListInUse = dataNode.get(DATA).get(FAP_SERVICE).get(CELL_CONFIG).get(LTE).get(RAN).get(NEIGHBOR_LIST_IN_USE).get(LTE_CELL); + + int entryCount = 0; + + if(nbrListInUse.isArray()) { + for(JsonNode lteCell:nbrListInUse) { + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"plmnid") + .put(STRING_VALUE, lteCell.get("PLMNID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"cid") + .put(STRING_VALUE, lteCell.get("CID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"phy-cell-id") + .put(STRING_VALUE, lteCell.get("PhyCellID"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"pnf-name") + .put(STRING_VALUE, lteCell.get("PNFName"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"blacklisted") + .put(STRING_VALUE, lteCell.get("Blacklisted"))); + + entryCount++; + } + + alias.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+ALIAS_LABEL); + alias.put(STRING_VALUE, aliasValue); + + numberOfEntries.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+"number-of-neighbor-cell-entries"); + numberOfEntries.put(STRING_VALUE, entryCount); + + sliParametersArray.put(alias); + sliParametersArray.put(numberOfEntries); + + context.put(SLI_PARAMETERS, sliParametersArray); + + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, UTF_8, context, writer); + writer.flush(); + + return writer.toString(); + + }else { + throw new InvalidMessageException("nbrListInUse is not of Type Array. Could not read neighbor list elements"); + } + + } + + private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException + { + String RPC_NAME_KEY_IN_VT = "rpc_name"; + String RPC_NAME_VALUE_IN_VT = "configuration-phy-cell-id"; + String ALIAS = "alias"; + String X0005b9Lte = "X0005b9Lte"; + + VelocityContext context = new VelocityContext(); + + JSONObject numberOfEntries = new JSONObject(); + JSONArray sliParametersArray = new JSONArray(); + + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); + + int entryCount = 0; + + if(configurations.isArray()) { + for(JsonNode dataNode:configurations) { + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+ALIAS) + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"cid") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get("CellConfig").get("LTE").get("RAN").get("Common").get("CellIdentity"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"phy-cell-id-in-use") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("phyCellIdInUse"))); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"pnf-name") + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName"))); + entryCount++; + } + + numberOfEntries.put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"-number-of-entries"); + numberOfEntries.put(STRING_VALUE, entryCount); + + sliParametersArray.put(numberOfEntries); + + context.put(SLI_PARAMETERS, sliParametersArray); + + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, UTF_8, context, writer); + writer.flush(); + + return writer.toString(); + + }else { + throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); + } + + } + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode dmaapMessageRootNode; + try { + dmaapMessageRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + + JsonNode rpcnameNode = dmaapMessageRootNode.get(RPC_NAME); + if(rpcnameNode == null) { + LOG.info("Unable to identify the respective consumer to invoke. Please verify the dmaap message.."); + return; + } + + String rpcname = rpcnameNode.textValue(); + + if(!MODIFY_CONFIG.toLowerCase().equals(rpcname) && !MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname)) { + LOG.info("Unknown rpc name {}", rpcname); + return; + } + + if(MODIFY_CONFIG.toLowerCase().equals(rpcname)) { + invokePCIChangesConsumer(dmaapMessageRootNode, oMapper, msg); + return; + } + + if(MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname)) { + invokeANRChangesConsumer(dmaapMessageRootNode, oMapper, msg); + return; + } + + } + + private void invokeANRChangesConsumer(JsonNode dmaapMessageRootNode, ObjectMapper oMapper, + String msg) throws InvalidMessageException { + JsonNode body = dmaapMessageRootNode.get(BODY); + if(body == null) { + LOG.info("Missing body node."); + return; + } + + JsonNode input = body.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode action = input.get(ACTION); + if(action == null) { + LOG.info("Missing action node."); + return; + } + + if(!MODIFY_CONFIG_ANR.equals(action.textValue())) { + LOG.info("Unknown Action {}", action); + return; + } + + JsonNode payload = input.get(PAYLOAD); + if(payload == null) { + LOG.info("Missing payload node."); + return; + } + + String payloadText = payload.asText(); + + if(!payloadText.contains(CONFIGURATIONS)) { + LOG.info("Missing configurations node."); + return; + } + + JsonNode configurationsJsonNode; + try { + configurationsJsonNode = oMapper.readTree(payloadText); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse payload value", e); + } + + String mapFilename = rootDir + ANR_CHANGES_MAP_FILE_NAME + ".map"; + Map fieldMap = loadMap(mapFilename); + if (fieldMap == null) { + return; + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + return; + } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + if (!fieldMap.containsKey(TEMPLATE)) { + throw new InvalidMessageException("No SDNC template known for message "); + } + String templateName = fieldMap.get(TEMPLATE); + + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); + + if(configurations.isArray()) { + for(JsonNode dataNode:configurations) { + if(dataNode.get(DATA).get(FAP_SERVICE) == null) { + LOG.info("Could not make a rpc call. Missing fapService node for dataNode element::", dataNode.textValue()); + }else { + buildAndInvokeANRChangesRPC(sdncEndpoint, templateName,msg, dataNode); + } + } + }else { + throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); + } + } + + private void invokePCIChangesConsumer(JsonNode dmaapMessageRootNode, ObjectMapper oMapper, + String msg) throws InvalidMessageException { + JsonNode body = dmaapMessageRootNode.get(BODY); + if(body == null) { + LOG.info("Missing body node."); + return; + } + + JsonNode input = body.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode action = input.get(ACTION); + if(action == null) { + LOG.info("Missing action node."); + return; + } + + if(!MODIFY_CONFIG.equals(action.textValue())) { + LOG.info("Unknown Action {}", action); + return; + } + + JsonNode payload = input.get(PAYLOAD); + if(payload == null) { + LOG.info("Missing payload node."); + return; + } + + String configurations = payload.asText(); + + if(!configurations.contains(CONFIGURATIONS)) { + LOG.info("Missing configurations node."); + return; + } + + JsonNode configurationsJsonNode; + try { + configurationsJsonNode = oMapper.readTree(configurations); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse payload value", e); + } + + String mapFilename = rootDir + PCI_CHANGES_MAP_FILE_NAME + ".map"; + Map fieldMap = loadMap(mapFilename); + if (fieldMap == null) { + return; + } + + if (!fieldMap.containsKey(SDNC_ENDPOINT)) { + return; + } + String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); + + if (!fieldMap.containsKey(TEMPLATE)) { + throw new InvalidMessageException("No SDNC template known for message "); + } + String templateName = fieldMap.get(TEMPLATE); + + buildAndInvokePCIChangesRPC(sdncEndpoint, templateName, msg, configurationsJsonNode); + } + + private void buildAndInvokePCIChangesRPC(String sdncEndpoint, String templateName, String msg, JsonNode configurationsOrDataNode) { + try { + String rpcMsgbody = publish(templateName, msg, configurationsOrDataNode, true, false); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + + private void buildAndInvokeANRChangesRPC(String sdncEndpoint, String templateName, String msg, JsonNode configurationsOrDataNode) { + try { + String rpcMsgbody = publish(templateName, msg, configurationsOrDataNode, false, true); + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + + private Map loadMap(String mapFilename) { + File mapFile = new File(mapFilename); + + if (!mapFile.canRead()) { + LOG.error(String.format("Cannot read map file (%s)", mapFilename)); + return null; + } + + Map results = new HashMap<>(); + try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { + + String curLine; + + while ((curLine = mapReader.readLine()) != null) { + curLine = curLine.trim(); + + if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { + String[] entry = curLine.split("=>"); + if (entry.length == 2) { + results.put(entry[0].trim(), entry[1].trim()); + } + } + } + mapReader.close(); + } catch (Exception e) { + LOG.error("Caught exception reading map " + mapFilename, e); + return null; + } + + return results; + } + +} diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java deleted file mode 100644 index 8c44377f9..000000000 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/PciChangesFromPolicyToSDNRDmaapConsumer.java +++ /dev/null @@ -1,314 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.northbound.dmaapclient; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.time.Instant; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.json.JSONArray; -import org.json.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class PciChangesFromPolicyToSDNRDmaapConsumer extends SdncDmaapConsumerImpl { - - private static final Logger LOG = LoggerFactory.getLogger(PciChangesFromPolicyToSDNRDmaapConsumer.class); - private static final String SDNC_ENDPOINT = "SDNC.endpoint"; - private static final String TEMPLATE = "SDNC.template"; - private static final String DMAAPLISTENERROOT = "DMAAPLISTENERROOT"; - - private static final String PARAMETER_NAME = "parameter-name"; - private static final String STRING_VALUE = "string-value"; - private static final String PHYSICAL_CELL_ID_INPUT_FAP_SERVICE = "configuration-phy-cell-id-input.fap-service"; - private static final String EVENT_HEADER = "event-header"; - private static final String ACTION = "Action"; - private static final String PAYLOAD = "Payload"; - private static final String CONFIGURATIONS = "Configurations"; - private static final String MODIFY_CONFIG = "ModifyConfig"; - private static final String MAP_FILE_NAME = "pci-changes-from-policy-to-sdnr"; - private static final String DATA = "data"; - private static final String FAP_SERVICE = "FAPService"; - private static final String SLI_PARAMETERS = "sli_parameters"; - private static final String RPC_NAME = "rpc-name"; - private static final String BODY = "body"; - private static final String INPUT = "input"; - - private String rootDir; - - protected VelocityEngine velocityEngine; - - public PciChangesFromPolicyToSDNRDmaapConsumer() { - velocityEngine = new VelocityEngine(); - Properties props = new Properties(); - rootDir = System.getenv(DMAAPLISTENERROOT); - - if ((rootDir == null) || (rootDir.length() == 0)) { - rootDir = "/opt/app/dmaap-listener/lib/"; - } - else { - rootDir = rootDir + "/lib/"; - } - - props.put("file.resource.loader.path", rootDir); - velocityEngine.init(props); - } - - /* - * for testing purposes - */ - PciChangesFromPolicyToSDNRDmaapConsumer(Properties props) { - velocityEngine = new VelocityEngine(); - velocityEngine.init(props); - } - - protected String publish(String templatePath, String jsonString, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException - { - if (templatePath.contains("anr-pci-changes-from-policy-to-sdnr")){ - return publishPciChangesFromPolicyToSDNR(templatePath, configurationsJsonNode); - } else { - return publishFullMessage(templatePath, jsonString); - } - } - - private String publishFullMessage(String templatePath, String jsonString) throws IOException - { - JSONObject jsonObj = new JSONObject(jsonString); - VelocityContext context = new VelocityContext(); - for(Object key : jsonObj.keySet()) - { - context.put((String)key, jsonObj.get((String)key)); - } - - String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString(); - context.put("req_id", id); - - context.put("curr_time", Instant.now()); - - ObjectMapper oMapper = new ObjectMapper(); - - String rpcMsgbody = oMapper.writeValueAsString(jsonString); - context.put("full_message", rpcMsgbody); - - Writer writer = new StringWriter(); - velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); - writer.flush(); - - return writer.toString(); - } - - private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException - { - String RPC_NAME_KEY_IN_VT = "rpc_name"; - String RPC_NAME_VALUE_IN_VT = "configuration-phy-cell-id"; - String ALIAS = "alias"; - String X0005b9Lte = "X0005b9Lte"; - - VelocityContext context = new VelocityContext(); - - JSONObject numberOfEntries = new JSONObject(); - JSONArray sliParametersArray = new JSONArray(); - - JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); - - int entryCount = 0; - - if(configurations.isArray()) { - for(JsonNode dataNode:configurations) { - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+ALIAS) - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"cid") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get("CellConfig").get("LTE").get("RAN").get("Common").get("CellIdentity"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"phy-cell-id-in-use") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("phyCellIdInUse"))); - sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"pnf-name") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName"))); - entryCount++; - } - - numberOfEntries.put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"-number-of-entries"); - numberOfEntries.put(STRING_VALUE, entryCount); - - sliParametersArray.put(numberOfEntries); - - context.put(SLI_PARAMETERS, sliParametersArray); - - context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); - - Writer writer = new StringWriter(); - velocityEngine.mergeTemplate(templatePath, "UTF-8", context, writer); - writer.flush(); - - return writer.toString(); - - }else { - throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); - } - - } - - @Override - public void processMsg(String msg) throws InvalidMessageException { - - if (msg == null) { - throw new InvalidMessageException("Null message"); - } - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode pciChangesRootNode; - try { - pciChangesRootNode = oMapper.readTree(msg); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } - - JsonNode rpcname = pciChangesRootNode.get(RPC_NAME); - if(rpcname == null) { - LOG.info("Missing rpc-name node."); - return; - } - - if(!MODIFY_CONFIG.toLowerCase().equals(rpcname.textValue())) { - LOG.info("Unknown rpc name {}", rpcname); - return; - } - - JsonNode body = pciChangesRootNode.get(BODY); - if(body == null) { - LOG.info("Missing body node."); - return; - } - - JsonNode input = body.get(INPUT); - if(input == null) { - LOG.info("Missing input node."); - return; - } - - JsonNode action = input.get(ACTION); - if(action == null) { - LOG.info("Missing action node."); - return; - } - - if(!MODIFY_CONFIG.equals(action.textValue())) { - LOG.info("Unknown Action {}", action); - return; - } - - JsonNode payload = input.get(PAYLOAD); - if(payload == null) { - LOG.info("Missing payload node."); - return; - } - - String configurations = payload.asText(); - - if(!configurations.contains(CONFIGURATIONS)) { - LOG.info("Missing configurations node."); - return; - } - - JsonNode configurationsJsonNode; - try { - configurationsJsonNode = oMapper.readTree(configurations); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse payload value", e); - } - - String mapFilename = rootDir + MAP_FILE_NAME + ".map"; - Map fieldMap = loadMap(mapFilename); - if (fieldMap == null) { - return; - } - - if (!fieldMap.containsKey(SDNC_ENDPOINT)) { - return; - } - String sdncEndpoint = fieldMap.get(SDNC_ENDPOINT); - - if (!fieldMap.containsKey(TEMPLATE)) { - throw new InvalidMessageException("No SDNC template known for message "); - } - String templateName = fieldMap.get(TEMPLATE); - - try { - String rpcMsgbody = publish(templateName, msg, configurationsJsonNode); - String odlUrlBase = getProperty("sdnc.odl.url-base"); - String odlUser = getProperty("sdnc.odl.user"); - String odlPassword = getProperty("sdnc.odl.password"); - - if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { - SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); - - conn.send("POST", "application/json", rpcMsgbody); - } else { - LOG.info("POST message body would be:\n" + rpcMsgbody); - } - } catch (Exception e) { - LOG.error("Unable to process message", e); - } - } - - private Map loadMap(String mapFilename) { - File mapFile = new File(mapFilename); - - if (!mapFile.canRead()) { - LOG.error(String.format("Cannot read map file (%s)", mapFilename)); - return null; - } - - Map results = new HashMap<>(); - try (BufferedReader mapReader = new BufferedReader(new FileReader(mapFile))) { - - String curLine; - - while ((curLine = mapReader.readLine()) != null) { - curLine = curLine.trim(); - - if ((curLine.length() > 0) && (!curLine.startsWith("#")) && curLine.contains("=>")) { - String[] entry = curLine.split("=>"); - if (entry.length == 2) { - results.put(entry[0].trim(), entry[1].trim()); - } - } - } - mapReader.close(); - } catch (Exception e) { - LOG.error("Caught exception reading map " + mapFilename, e); - return null; - } - - return results; - } - -} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java deleted file mode 100644 index 66b63a17d..000000000 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestANRChangesFromPolicyToSDNRDmaapConsumer.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.onap.ccsdk.sli.northbound.dmaapclient; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.Properties; - -import org.junit.Before; -import org.junit.Test; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class TestANRChangesFromPolicyToSDNRDmaapConsumer { - private static final String anrChangesFromPolicyToSDNRInput = "{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - "\"Action\": \"ModifyConfigANR\",\n" + - " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfiganr\",\n" + - " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + - " \"type\": \"request\"\n" + - "}\n" + - ""; - - @Before - public void setUp() throws Exception { - } - - @Test - public void testRPCMessageBodyResponse() throws Exception { - Properties props = new Properties(); - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode anrChangesRootNode = oMapper.readTree(anrChangesFromPolicyToSDNRInput); - JsonNode body = anrChangesRootNode.get("body"); - JsonNode input = body.get("input"); - JsonNode payload = input.get("Payload"); - String payloadText = payload.asText(); - JsonNode configurationsJsonNode = oMapper.readTree(payloadText); - JsonNode configurations = configurationsJsonNode.get("Configurations"); - - for(JsonNode dataNode:configurations) { - String rpcMsgbody = new ANRChangesFromPolicyToSDNRDmaapConsumer(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", anrChangesFromPolicyToSDNRInput,dataNode); - - JsonNode rootNode; - try { - rootNode = oMapper.readTree(rpcMsgbody); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } - - assertTrue(rootNode.get("input").get("module-name") != null); - assertTrue(rootNode.get("input").get("rpc-name") != null); - assertTrue(rootNode.get("input").get("mode") != null); - assertTrue(rootNode.get("input").get("sli-parameter") != null); - } - } - - @Test(expected = InvalidMessageException.class) - public void testProcessMsgNullMessage() throws Exception { - ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg(null); - } - - @Test(expected = InvalidMessageException.class) - public void testProcessMsgInvalidMessage() throws Exception { - ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg("test"); - } - - @Test - public void testProcessMsgMissingActionHeader() throws Exception { - ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg("{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - "\"NoAction\": \"ModifyConfigANR\",\n" + - " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfiganr\",\n" + - " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + - " \"type\": \"request\"\n" + - "}\n" + - ""); - } - - @Test - public void testProcessMsgInvalidPayloadConfigurations() throws Exception { - String msg = "{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - "\"Action\": \"ModifyConfigANR\",\n" + - " \"Payload\": \"{ \\\"Configurations\\\":{ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}} } } } } } } } ] }\"\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfiganr\",\n" + - " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + - " \"type\": \"request\"\n" + - "}\n" + - ""; - - try { - ANRChangesFromPolicyToSDNRDmaapConsumer consumer = new ANRChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg(msg); - - } catch (final InvalidMessageException e) { - final String errorMsg = "Cannot parse payload value"; - assertEquals(errorMsg, e.getMessage()); - } - } -} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestOofPciPocDmaapConsumers.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestOofPciPocDmaapConsumers.java new file mode 100644 index 000000000..cd2ea6eb0 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestOofPciPocDmaapConsumers.java @@ -0,0 +1,314 @@ +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Properties; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestOofPciPocDmaapConsumers { + + private static final String pciChangesFromPolicyToSDNRInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"Action\": \"ModifyConfig\",\n" + + " \"Payload\": \"{\\\"Configurations\\\":[{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0330\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":6,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0330\\\"}}}}}}},{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0331\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":7,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0331\\\"}}}}}}}]}\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + private static final String anrChangesFromPolicyToSDNRInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"Action\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""; + + @Before + public void setUp() throws Exception { + } + + /* ---------- PCI Changes DMAAP messages test cases ------------------- */ + + @Test + public void testPCIChangesDmaapRPCMessageBodyResponse() throws Exception { + Properties props = new Properties(); + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode pciChangesRootNode = oMapper.readTree(pciChangesFromPolicyToSDNRInput); + JsonNode body = pciChangesRootNode.get("body"); + JsonNode input = body.get("input"); + JsonNode payload = input.get("Payload"); + String payloadText = payload.asText(); + JsonNode configurationsJsonNode = oMapper.readTree(payloadText); + + String rpcMsgbody = new OofPciPocDmaapConsumers(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", pciChangesFromPolicyToSDNRInput,configurationsJsonNode, true, false); + + JsonNode rootNode; + try { + rootNode = oMapper.readTree(rpcMsgbody); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + assertTrue(rootNode.get("input").get("module-name") != null); + assertTrue(rootNode.get("input").get("rpc-name") != null); + assertTrue(rootNode.get("input").get("mode") != null); + assertTrue(rootNode.get("input").get("sli-parameter") != null); + + } + + @Test(expected = InvalidMessageException.class) + public void testPCIChangesDmaapProcessMsgNullMessage() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testPCIChangesDmaapProcessMsgInvalidMessage() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg("test"); + } + + @Test + public void testPCIChangesDmaapProcessMsgMissingActionHeader() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg("{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"RenamedAction\": \"ModifyConfig\",\n" + + " \"Payload\": {\n" + + " \"Configurations \": {\n" + + " \"data \": {\n" + + " \"FAPService \": {\n" + + " \"alias\": \"Chn0330\",\n" + + " \"X0005b9Lte\": {\n" + + " \"phyCellIdInUse\": 6,\n" + + " \"pnfName\": \"ncserver23\"\n" + + " },\n" + + " \"CellConfig\": {\n" + + " \"LTE\": {\n" + + " \"RAN\": {\n" + + " \"Common\": {\n" + + " \"CellIdentity\": \"Chn0330\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + "\n" + + " }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"); + } + + @Test + public void testPCIChangesDmaapProcessMsgInvalidPayloadConfigurations() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + " \"Action\": \"ModifyConfig\",\n" + + " \"Payload\": {\n" + + " \"Configurations \": {\n" + + " \"data \": {\n" + + " \"FAPService \": {\n" + + " \"alias\": \"Chn0330\",\n" + + " \"X0005b9Lte\": {\n" + + " \"phyCellIdInUse\": 6,\n" + + " \"pnfName\": \"ncserver23\"\n" + + " },\n" + + " \"CellConfig\": {\n" + + " \"LTE\": {\n" + + " \"RAN\": {\n" + + " \"Common\": {\n" + + " \"CellIdentity\": \"Chn0330\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + "\n" + + " }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfig\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + try { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg(msg); + + } catch (final InvalidMessageException e) { + final String errorMsg = "Configurations is not of Type Array. Could not read configuration changes"; + assertEquals(errorMsg, e.getMessage()); + } + } + + /* ---------- PCI Changes DMAAP messages test cases ------------------- */ + + /* ---------- ANR Changes DMAAP messages test cases ------------------- */ + + @Test + public void testANRChangesDmaapRPCMessageBodyResponse() throws Exception { + Properties props = new Properties(); + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode anrChangesRootNode = oMapper.readTree(anrChangesFromPolicyToSDNRInput); + JsonNode body = anrChangesRootNode.get("body"); + JsonNode input = body.get("input"); + JsonNode payload = input.get("Payload"); + String payloadText = payload.asText(); + JsonNode configurationsJsonNode = oMapper.readTree(payloadText); + JsonNode configurations = configurationsJsonNode.get("Configurations"); + + for(JsonNode dataNode:configurations) { + String rpcMsgbody = new OofPciPocDmaapConsumers(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", anrChangesFromPolicyToSDNRInput,dataNode, false, true); + + JsonNode rootNode; + try { + rootNode = oMapper.readTree(rpcMsgbody); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + assertTrue(rootNode.get("input").get("module-name") != null); + assertTrue(rootNode.get("input").get("rpc-name") != null); + assertTrue(rootNode.get("input").get("mode") != null); + assertTrue(rootNode.get("input").get("sli-parameter") != null); + } + } + + @Test(expected = InvalidMessageException.class) + public void testANRChangesDmaapProcessMsgNullMessage() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg(null); + } + + @Test(expected = InvalidMessageException.class) + public void testANRChangesDmaapProcessMsgInvalidMessage() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg("test"); + } + + @Test + public void testANRChangesDmaapProcessMsgMissingActionHeader() throws Exception { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg("{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"NoAction\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":[ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}] } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""); + } + + @Test + public void testANRChangesDmaapProcessMsgInvalidPayloadConfigurations() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIVer\": \"1.0\",\n" + + " \"RequestID\": \"722ee65a-8afd-48df-bf57-c152ae45bacc\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n" + + " },\n" + + "\"Action\": \"ModifyConfigANR\",\n" + + " \"Payload\": \"{ \\\"Configurations\\\":{ { \\\"data\\\":{ \\\"FAPService\\\":{ \\\"alias\\\":\\\"Cell1\\\", \\\"CellConfig\\\":{ \\\"LTE\\\":{ \\\"RAN\\\":{ \\\"Common\\\":{ \\\"CellIdentity\\\":\\\"1\\\" }, \\\"NeighborListInUse\\\" : { \\\"LTECellNumberOfEntries\\\" : \\\"1\\\" , \\\"LTECell\\\" : [{ \\\"PLMNID\\\" :\\\"plmnid1\\\", \\\"CID\\\":\\\"Chn0001\\\", \\\"PhyCellID\\\":\\\"3\\\", \\\"PNFName\\\":\\\"ncserver01\\\", \\\"Blacklisted\\\":\\\"false\\\"}} } } } } } } } ] }\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"modifyconfiganr\",\n" + + " \"correlation-id\": \"722ee65a-8afd-48df-bf57-c152ae45bacc-1\",\n" + + " \"type\": \"request\"\n" + + "}\n" + + ""; + + try { + OofPciPocDmaapConsumers consumer = new OofPciPocDmaapConsumers(); + consumer.processMsg(msg); + + } catch (final InvalidMessageException e) { + final String errorMsg = "Cannot parse payload value"; + assertEquals(errorMsg, e.getMessage()); + } + } + + /* ---------- ANR Changes DMAAP messages test cases ------------------- */ +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java deleted file mode 100644 index a42bc48f6..000000000 --- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestPciChangesFromPolicyToSDNRDmaapConsumer.java +++ /dev/null @@ -1,181 +0,0 @@ -package org.onap.ccsdk.sli.northbound.dmaapclient; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.Properties; - -import org.junit.Before; -import org.junit.Test; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class TestPciChangesFromPolicyToSDNRDmaapConsumer { - private static final String pciChangesFromPolicyToSDNRInput = "{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - " \"Action\": \"ModifyConfig\",\n" + - " \"Payload\": \"{\\\"Configurations\\\":[{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0330\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":6,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0330\\\"}}}}}}},{\\\"data\\\":{\\\"FAPService\\\":{\\\"alias\\\":\\\"Chn0331\\\",\\\"X0005b9Lte\\\":{\\\"phyCellIdInUse\\\":7,\\\"pnfName\\\":\\\"ncserver23\\\"},\\\"CellConfig\\\":{\\\"LTE\\\":{\\\"RAN\\\":{\\\"Common\\\":{\\\"CellIdentity\\\":\\\"Chn0331\\\"}}}}}}}]}\"\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfig\",\n" + - " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + - " \"type\": \"request\"\n" + - "}"; - - @Before - public void setUp() throws Exception { - } - - @Test - public void testRPCMessageBodyResponse() throws Exception { - Properties props = new Properties(); - - ObjectMapper oMapper = new ObjectMapper(); - JsonNode pciChangesRootNode = oMapper.readTree(pciChangesFromPolicyToSDNRInput); - JsonNode body = pciChangesRootNode.get("body"); - JsonNode input = body.get("input"); - JsonNode payload = input.get("Payload"); - String payloadText = payload.asText(); - JsonNode configurationsJsonNode = oMapper.readTree(payloadText); - - String rpcMsgbody = new PciChangesFromPolicyToSDNRDmaapConsumer(props).publish("src/main/resources/anr-pci-changes-from-policy-to-sdnr.vt", pciChangesFromPolicyToSDNRInput,configurationsJsonNode); - - JsonNode rootNode; - try { - rootNode = oMapper.readTree(rpcMsgbody); - } catch (Exception e) { - throw new InvalidMessageException("Cannot parse json object", e); - } - - assertTrue(rootNode.get("input").get("module-name") != null); - assertTrue(rootNode.get("input").get("rpc-name") != null); - assertTrue(rootNode.get("input").get("mode") != null); - assertTrue(rootNode.get("input").get("sli-parameter") != null); - - } - - @Test(expected = InvalidMessageException.class) - public void testProcessMsgNullMessage() throws Exception { - PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg(null); - } - - @Test(expected = InvalidMessageException.class) - public void testProcessMsgInvalidMessage() throws Exception { - PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg("test"); - } - - @Test - public void testProcessMsgMissingActionHeader() throws Exception { - PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg("{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - " \"RenamedAction\": \"ModifyConfig\",\n" + - " \"Payload\": {\n" + - " \"Configurations \": {\n" + - " \"data \": {\n" + - " \"FAPService \": {\n" + - " \"alias\": \"Chn0330\",\n" + - " \"X0005b9Lte\": {\n" + - " \"phyCellIdInUse\": 6,\n" + - " \"pnfName\": \"ncserver23\"\n" + - " },\n" + - " \"CellConfig\": {\n" + - " \"LTE\": {\n" + - " \"RAN\": {\n" + - " \"Common\": {\n" + - " \"CellIdentity\": \"Chn0330\"\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - "\n" + - " }\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfig\",\n" + - " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + - " \"type\": \"request\"\n" + - "}"); - } - - @Test - public void testProcessMsgInvalidPayloadConfigurations() throws Exception { - String msg = "{\n" + - " \"body\": {\n" + - " \"input\": {\n" + - " \"CommonHeader\": {\n" + - " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + - " \"APIVer\": \"1.0\",\n" + - " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + - " \"SubRequestID\": \"1\",\n" + - " \"RequestTrack\": {},\n" + - " \"Flags\": {}\n" + - " },\n" + - " \"Action\": \"ModifyConfig\",\n" + - " \"Payload\": {\n" + - " \"Configurations \": {\n" + - " \"data \": {\n" + - " \"FAPService \": {\n" + - " \"alias\": \"Chn0330\",\n" + - " \"X0005b9Lte\": {\n" + - " \"phyCellIdInUse\": 6,\n" + - " \"pnfName\": \"ncserver23\"\n" + - " },\n" + - " \"CellConfig\": {\n" + - " \"LTE\": {\n" + - " \"RAN\": {\n" + - " \"Common\": {\n" + - " \"CellIdentity\": \"Chn0330\"\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - " }\n" + - "\n" + - " }\n" + - " }\n" + - " },\n" + - " \"version\": \"1.0\",\n" + - " \"rpc-name\": \"modifyconfig\",\n" + - " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + - " \"type\": \"request\"\n" + - "}"; - - try { - PciChangesFromPolicyToSDNRDmaapConsumer consumer = new PciChangesFromPolicyToSDNRDmaapConsumer(); - consumer.processMsg(msg); - - } catch (final InvalidMessageException e) { - final String errorMsg = "Configurations is not of Type Array. Could not read configuration changes"; - assertEquals(errorMsg, e.getMessage()); - } - } -} -- cgit 1.2.3-korg From e8fcf7c536a77381542dabc239a3e127c319e4a8 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 9 May 2019 10:26:49 -0400 Subject: Update to use standalone pom Update standalone containers dmaap-listener and ueb-listener to use standalone parent poms. This version contains some vulnerability fixes that are not possible to address in containers that install their own third-party library versions. Change-Id: I75a295b331190d87a38002924ccbdd985ca8f494 Issue-ID: CCSDK-1320 Signed-off-by: Timoney, Dan (dt5972) --- dmaap-listener/pom.xml | 36 +++++++++++++----------------------- ueb-listener/pom.xml | 44 +++++++++++++++++++------------------------- 2 files changed, 32 insertions(+), 48 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6c43c9c18..500121378 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent - odlparent-lite + standalone-parent 1.3.0-SNAPSHOT @@ -17,21 +17,27 @@ DMAAP Listener - 1.2.0-SNAPSHOT - 2.9.4 - 2.0 true /opt/app/dmaap-listener - 1.1.5 yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} + + 0.5.0-SNAPSHOT ${project.version} + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + javax.ws.rs @@ -46,61 +52,45 @@ org.onap.dmaap.messagerouter.dmaapclient dmaapClient - ${dmaap.listener.version} org.slf4j slf4j-api - 1.7.21 - - - org.slf4j - slf4j-log4j12 - 1.6.1 - compile - log4j - log4j - 1.2.17 + org.apache.logging.log4j + log4j-slf4j-impl com.fasterxml.jackson.core jackson-core - ${fasterxml.jackson.version} com.fasterxml.jackson.core jackson-databind - ${fasterxml.jackson.version} com.fasterxml.jackson.core jackson-annotations - ${fasterxml.jackson.version} org.apache.velocity velocity-engine-core - ${velocity.version} junit junit - ${junit.version} test ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 test org.onap.ccsdk.sli.core dblib-provider - ${sdnctl.dblib.version} diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 550cbfdd9..f219f5238 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent - odlparent-lite + standalone-parent 1.3.0-SNAPSHOT @@ -17,48 +17,47 @@ UEB Listener - 1.3.0 - 1.5.1 - true /opt/app/ueb-listener yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} + 0.5.0-SNAPSHOT ${project.version} + + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + + org.onap.sdc.sdc-distribution-client sdc-distribution-client - ${sdc.client.version} compile org.onap.sdc.sdc-tosca sdc-tosca - ${sdc.tosca.version} compile org.slf4j slf4j-api - 1.7.21 - org.slf4j - slf4j-log4j12 - 1.6.1 - compile - - - log4j - log4j - 1.2.17 + org.apache.logging.log4j + log4j-slf4j-impl com.fasterxml.jackson.core @@ -71,31 +70,26 @@ junit junit - ${junit.version} test org.testng testng - 6.11 test org.mockito mockito-core - ${mockito.version} test ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 test org.onap.ccsdk.sli.core dblib-provider - ${sdnctl.dblib.version} @@ -111,8 +105,8 @@ 2.5.1 true - 1.7 - 1.7 + 1.8 + 1.8 -- cgit 1.2.3-korg From 9b5c8a76bf6a75d5d82df56a1db0a09651596f82 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Thu, 13 Jun 2019 05:50:38 -0500 Subject: Bug fixes/mods to dmaap-listener for SDNR OOF PCI Bug fixes to support payload with escape characters and modifications to velocity template map files to point to correct SDNC end point Issue-ID: CCSDK-1399 Signed-off-by: SandeepLinux Change-Id: I38a0a3f19379ea20b7055e9581318f54b93dca6d --- .../dmaapclient/OofPciPocDmaapConsumers.java | 21 ++++++++++++--------- .../resources/anr-changes-from-policy-to-sdnr.map | 4 ++-- .../resources/pci-changes-from-policy-to-sdnr.map | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java index 2e6ae742b..7037d8848 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java @@ -65,6 +65,9 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { private static final String BODY = "body"; private static final String INPUT = "input"; + private static final String EMPTY = ""; + private static final String ESCAPE_SEQUENCE_QUOTES = "\""; + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT = "generic-neighbor-configuration-input."; private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE = GENERIC_NEIGHBOR_CONFIGURATION_INPUT.concat("neighbor-list-in-use"); private static final String MODIFY_CONFIG_ANR = "ModifyConfigANR"; @@ -162,15 +165,15 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { if(nbrListInUse.isArray()) { for(JsonNode lteCell:nbrListInUse) { sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"plmnid") - .put(STRING_VALUE, lteCell.get("PLMNID"))); + .put(STRING_VALUE, lteCell.get("PLMNID").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"cid") - .put(STRING_VALUE, lteCell.get("CID"))); + .put(STRING_VALUE, lteCell.get("CID").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"phy-cell-id") - .put(STRING_VALUE, lteCell.get("PhyCellID"))); + .put(STRING_VALUE, lteCell.get("PhyCellID").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"pnf-name") - .put(STRING_VALUE, lteCell.get("PNFName"))); + .put(STRING_VALUE, lteCell.get("PNFName").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"blacklisted") - .put(STRING_VALUE, lteCell.get("Blacklisted"))); + .put(STRING_VALUE, lteCell.get("Blacklisted").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); entryCount++; } @@ -219,13 +222,13 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { if(configurations.isArray()) { for(JsonNode dataNode:configurations) { sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+ALIAS) - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS))); + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS).toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"cid") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get("CellConfig").get("LTE").get("RAN").get("Common").get("CellIdentity"))); + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get("CellConfig").get("LTE").get("RAN").get("Common").get("CellIdentity").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"phy-cell-id-in-use") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("phyCellIdInUse"))); + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("phyCellIdInUse").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+"pnf-name") - .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName"))); + .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); entryCount++; } diff --git a/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map b/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map index e7c45b253..5cd2b8371 100644 --- a/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map +++ b/dmaap-listener/src/main/resources/anr-changes-from-policy-to-sdnr.map @@ -1,5 +1,5 @@ # SDN-C URL -SDNC.endpoint => oofpcipoc-api:generic-neighbour-configuration +SDNC.endpoint => SLI-API:execute-graph -# Field mapping +# Field mapping SDNC.template => anr-pci-changes-from-policy-to-sdnr.vt diff --git a/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map b/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map index 44c34a4d4..5cd2b8371 100644 --- a/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map +++ b/dmaap-listener/src/main/resources/pci-changes-from-policy-to-sdnr.map @@ -1,5 +1,5 @@ # SDN-C URL -SDNC.endpoint => oofpcipoc-api:configuration-phy-cell-id +SDNC.endpoint => SLI-API:execute-graph -# Field mapping +# Field mapping SDNC.template => anr-pci-changes-from-policy-to-sdnr.vt -- cgit 1.2.3-korg From 18551cc0bf09a0c0443e3f96cb01c1b4743e7a40 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 17 Jul 2019 11:00:02 -0400 Subject: Update parent version to 1.3.1 Update parent poms to version 1.3.1-SNAPSHOT Change-Id: Ia53c92b56e16cdef8a82927513e4ce6cf24862e0 Issue-ID: CCSDK-1496 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index dfa35f405..95adfa3fb 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index d3ba70ce3..76814c0e5 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 65191b77c..6a0af748b 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index dee99361d..2b37fa363 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 15e5bd4fe..ff870be56 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index dfc5ce7e3..70ba14589 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index c4055964a..e170341df 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 6ba7a5c95..9295b3ecc 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 1716eba8d..9ed8d2812 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 65bbf7d55..92858ef9e 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 0f2827cb3..9be977c55 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 8d856529b..ba9644dc8 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index f6bb8c9aa..8aa844482 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index a2f864b64..685577229 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 301092999..cf71caa8a 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index a6f57f91d..3b071b912 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 882831e49..e5a9f04c7 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 940617e94..cf4f3881a 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 0f3ea6364..88f0f59fc 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index c20f07337..e801ba33a 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 75caf3ebe..96cfba7db 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 4f1c6e3bb..ee04ce501 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 500121378..fc9df6e34 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 94623a981..97aa31080 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index aa07657f8..b5eb43eae 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 250d3f8ce..969121d59 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index 7d4eca129..b2a528d99 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 1bb6a37eb..9b21ca015 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 2499b9923..067fc351a 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 02eda542f..9090200a3 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index db3cf5fa2..264582bb8 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 77c8b959c..0d07359eb 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/pom.xml b/lcm/pom.xml index 1098fd6f0..0bf9bed10 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 111346949..df4701964 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index e8e5c4950..c03cfdf43 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index f219f5238..97d88a4cd 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From 47a2c99bdeeefd34172d2b4a2cb7170b1c81bd67 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Thu, 1 Aug 2019 09:13:34 -0500 Subject: OOFPCIPPOC DMAAP listener bug fix DMAAP listener code change to refer to the correct YANG RPC leaf node Issue-ID: CCSDK-1565 Signed-off-by: SandeepLinux Change-Id: Id8afb807bf281125e522f86079a877184271ca51 --- .../dmaapclient/OofPciPocDmaapConsumers.java | 108 ++++++++++----------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java index 7037d8848..9d78e8acf 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java @@ -57,17 +57,17 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { private static final String MODIFY_CONFIG = "ModifyConfig"; private static final String DATA = "data"; private static final String FAP_SERVICE = "FAPService"; - + private static final String PAYLOAD = "Payload"; private static final String PCI_CHANGES_MAP_FILE_NAME = "pci-changes-from-policy-to-sdnr"; private static final String SLI_PARAMETERS = "sli_parameters"; private static final String RPC_NAME = "rpc-name"; private static final String BODY = "body"; private static final String INPUT = "input"; - + private static final String EMPTY = ""; private static final String ESCAPE_SEQUENCE_QUOTES = "\""; - + private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT = "generic-neighbor-configuration-input."; private static final String GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE = GENERIC_NEIGHBOR_CONFIGURATION_INPUT.concat("neighbor-list-in-use"); private static final String MODIFY_CONFIG_ANR = "ModifyConfigANR"; @@ -137,31 +137,31 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { return writer.toString(); } - + private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode) throws IOException, InvalidMessageException { VelocityContext context = new VelocityContext(); - + String RPC_NAME_KEY_IN_VT = "rpc_name"; String RPC_NAME_VALUE_IN_VT = "generic-neighbor-configuration"; - + String CELL_CONFIG = "CellConfig"; String ALIAS_LABEL = "alias"; String LTE = "LTE"; String RAN = "RAN"; String LTE_CELL = "LTECell"; String NEIGHBOR_LIST_IN_USE = "NeighborListInUse"; - + JSONObject numberOfEntries = new JSONObject(); JSONObject alias = new JSONObject(); JSONArray sliParametersArray = new JSONArray(); - + String aliasValue = dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS_LABEL).textValue(); - + JsonNode nbrListInUse = dataNode.get(DATA).get(FAP_SERVICE).get(CELL_CONFIG).get(LTE).get(RAN).get(NEIGHBOR_LIST_IN_USE).get(LTE_CELL); - + int entryCount = 0; - + if(nbrListInUse.isArray()) { for(JsonNode lteCell:nbrListInUse) { sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"plmnid") @@ -174,21 +174,21 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { .put(STRING_VALUE, lteCell.get("PNFName").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT_NEIGHBOR_LIST_IN_USE+"["+entryCount+"]."+"blacklisted") .put(STRING_VALUE, lteCell.get("Blacklisted").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); - + entryCount++; } - + alias.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+ALIAS_LABEL); alias.put(STRING_VALUE, aliasValue); - - numberOfEntries.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+"number-of-neighbor-cell-entries"); + + numberOfEntries.put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+"lte-cell-number-of-entries"); numberOfEntries.put(STRING_VALUE, entryCount); - + sliParametersArray.put(alias); sliParametersArray.put(numberOfEntries); - + context.put(SLI_PARAMETERS, sliParametersArray); - + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); Writer writer = new StringWriter(); @@ -196,29 +196,29 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { writer.flush(); return writer.toString(); - + }else { throw new InvalidMessageException("nbrListInUse is not of Type Array. Could not read neighbor list elements"); } - + } - + private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException { String RPC_NAME_KEY_IN_VT = "rpc_name"; String RPC_NAME_VALUE_IN_VT = "configuration-phy-cell-id"; String ALIAS = "alias"; String X0005b9Lte = "X0005b9Lte"; - + VelocityContext context = new VelocityContext(); - + JSONObject numberOfEntries = new JSONObject(); JSONArray sliParametersArray = new JSONArray(); - + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); - + int entryCount = 0; - + if(configurations.isArray()) { for(JsonNode dataNode:configurations) { sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"["+entryCount+"]."+ALIAS) @@ -231,14 +231,14 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { .put(STRING_VALUE, dataNode.get(DATA).get(FAP_SERVICE).get(X0005b9Lte).get("pnfName").toString().replace(ESCAPE_SEQUENCE_QUOTES, EMPTY))); entryCount++; } - + numberOfEntries.put(PARAMETER_NAME, PHYSICAL_CELL_ID_INPUT_FAP_SERVICE+"-number-of-entries"); numberOfEntries.put(STRING_VALUE, entryCount); - + sliParametersArray.put(numberOfEntries); - + context.put(SLI_PARAMETERS, sliParametersArray); - + context.put(RPC_NAME_KEY_IN_VT, RPC_NAME_VALUE_IN_VT); Writer writer = new StringWriter(); @@ -246,11 +246,11 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { writer.flush(); return writer.toString(); - + }else { throw new InvalidMessageException("Configurations is not of Type Array. Could not read configuration changes"); } - + } @Override @@ -267,31 +267,31 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { } catch (Exception e) { throw new InvalidMessageException("Cannot parse json object", e); } - + JsonNode rpcnameNode = dmaapMessageRootNode.get(RPC_NAME); if(rpcnameNode == null) { LOG.info("Unable to identify the respective consumer to invoke. Please verify the dmaap message.."); return; } - + String rpcname = rpcnameNode.textValue(); - + if(!MODIFY_CONFIG.toLowerCase().equals(rpcname) && !MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname)) { LOG.info("Unknown rpc name {}", rpcname); return; } - + if(MODIFY_CONFIG.toLowerCase().equals(rpcname)) { invokePCIChangesConsumer(dmaapMessageRootNode, oMapper, msg); return; } - + if(MODIFY_CONFIG_ANR.toLowerCase().equals(rpcname)) { invokeANRChangesConsumer(dmaapMessageRootNode, oMapper, msg); return; } - + } private void invokeANRChangesConsumer(JsonNode dmaapMessageRootNode, ObjectMapper oMapper, @@ -301,24 +301,24 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { LOG.info("Missing body node."); return; } - + JsonNode input = body.get(INPUT); if(input == null) { LOG.info("Missing input node."); return; } - + JsonNode action = input.get(ACTION); if(action == null) { LOG.info("Missing action node."); return; } - + if(!MODIFY_CONFIG_ANR.equals(action.textValue())) { LOG.info("Unknown Action {}", action); return; } - + JsonNode payload = input.get(PAYLOAD); if(payload == null) { LOG.info("Missing payload node."); @@ -326,12 +326,12 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { } String payloadText = payload.asText(); - + if(!payloadText.contains(CONFIGURATIONS)) { LOG.info("Missing configurations node."); return; } - + JsonNode configurationsJsonNode; try { configurationsJsonNode = oMapper.readTree(payloadText); @@ -354,9 +354,9 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { throw new InvalidMessageException("No SDNC template known for message "); } String templateName = fieldMap.get(TEMPLATE); - + JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); - + if(configurations.isArray()) { for(JsonNode dataNode:configurations) { if(dataNode.get(DATA).get(FAP_SERVICE) == null) { @@ -377,24 +377,24 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { LOG.info("Missing body node."); return; } - + JsonNode input = body.get(INPUT); if(input == null) { LOG.info("Missing input node."); return; } - + JsonNode action = input.get(ACTION); if(action == null) { LOG.info("Missing action node."); return; } - + if(!MODIFY_CONFIG.equals(action.textValue())) { LOG.info("Unknown Action {}", action); return; } - + JsonNode payload = input.get(PAYLOAD); if(payload == null) { LOG.info("Missing payload node."); @@ -402,12 +402,12 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { } String configurations = payload.asText(); - + if(!configurations.contains(CONFIGURATIONS)) { LOG.info("Missing configurations node."); return; } - + JsonNode configurationsJsonNode; try { configurationsJsonNode = oMapper.readTree(configurations); @@ -430,7 +430,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { throw new InvalidMessageException("No SDNC template known for message "); } String templateName = fieldMap.get(TEMPLATE); - + buildAndInvokePCIChangesRPC(sdncEndpoint, templateName, msg, configurationsJsonNode); } @@ -452,7 +452,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { LOG.error("Unable to process message", e); } } - + private void buildAndInvokeANRChangesRPC(String sdncEndpoint, String templateName, String msg, JsonNode configurationsOrDataNode) { try { String rpcMsgbody = publish(templateName, msg, configurationsOrDataNode, false, true); -- cgit 1.2.3-korg From e48d419ff3348af068aa2e72e283b0fed0cb5108 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 6 Aug 2019 11:02:42 -0400 Subject: Roll version to recreate artifacts Roll version to 0.5.1 to recreate El Alto early drop artifacts Change-Id: I0b516ccc051ca5a08414c653b7631716fafa987e Issue-ID: CCSDK-1563 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- .../features/features-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 6 +++--- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 6 +++--- version.properties | 2 +- 37 files changed, 75 insertions(+), 75 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 95adfa3fb..1ca2f7276 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.1-SNAPSHOT + 1.3.2 diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 76814c0e5..5cb47d9c5 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 6a0af748b..4c0762b59 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound features-asdcApi - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 2b37fa363..37929d871 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound asdcApi-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index ff870be56..70b8ad896 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound asdcApi-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 70ba14589..5c11f7fe1 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound asdcApi-model - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index e170341df..7909602c2 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound asdcApi - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 9295b3ecc..fff19f630 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound asdcApi-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 9ed8d2812..6e5e39854 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 92858ef9e..fa5fce035 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 9be977c55..904aa5a06 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index ba9644dc8..3b48a5356 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 8aa844482..b842ee670 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 685577229..a2c624e8e 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index cf71caa8a..e91fc6b11 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 3b071b912..7aca371c2 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index e5a9f04c7..a55235507 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound features-dataChange - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index cf4f3881a..b9652a11b 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dataChange-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 88f0f59fc..c778296f2 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dataChange-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index e801ba33a..5aa0825b1 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dataChange-model - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 96cfba7db..a8def686e 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dataChange - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index ee04ce501..db1f3aff3 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dataChange-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index fc9df6e34..a6c6cdfe8 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound dmaap-listener - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - 0.5.0-SNAPSHOT + ${project.version} ${project.version} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 97aa31080..0835eff1d 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index b5eb43eae..e2cb8cf00 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound features-sli-northbound - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 969121d59..fa17f17c2 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index b2a528d99..d20d77be4 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 9b21ca015..1bc3a1e77 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 067fc351a..54315d1cf 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound features-lcm - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 9090200a3..f177a06a8 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound lcm-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 264582bb8..3625134c8 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound lcm-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 0d07359eb..f79e5718b 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound lcm-model - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 0bf9bed10..b9d1a770a 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound lcm - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index df4701964..7734d929c 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound lcm-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index c03cfdf43..120548d9b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 97d88a4cd..e31603106 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.northbound ueb-listener - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - 0.5.0-SNAPSHOT + ${project.version} ${project.version} diff --git a/version.properties b/version.properties index 3e36988ca..71ba554ca 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=5 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 3f336cecddbc7adf45489e0d4a0b1b19deeee1ef Mon Sep 17 00:00:00 2001 From: "lalena.aria" Date: Wed, 7 Aug 2019 19:59:04 +0000 Subject: Use getEntity to populate Complex Resource-Related tables Changes made: Clean up in SdncBaseModel for unused methods. Fixes in SdncGroupModel. Convert SdncNodeModel to entity. Corrected logging in SdncVFCModel. Corresponding Group-related and logging fixes in SdncVFModel. Corresponding SdncBaseModel changes for getEntity migration. Corresponding junit changes for getEntity migration. Issue-ID: CCSDK-1578 Change-Id: Ic7f7ec38325aeddcad2d86c8f8425ec825512714 Signed-off-by: lalena.aria --- artifacts/pom.xml | 4 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 +- asdcApi/features/features-asdcApi/pom.xml | 4 +- asdcApi/features/pom.xml | 4 +- asdcApi/installer/pom.xml | 4 +- asdcApi/model/pom.xml | 4 +- asdcApi/pom.xml | 4 +- asdcApi/provider/pom.xml | 4 +- .../features/ccsdk-daexim-offsite-backup/pom.xml | 4 +- .../features-daexim-offsite-backup/pom.xml | 4 +- daexim-offsite-backup/features/pom.xml | 4 +- daexim-offsite-backup/installer/pom.xml | 4 +- daexim-offsite-backup/model/pom.xml | 4 +- daexim-offsite-backup/pom.xml | 4 +- daexim-offsite-backup/provider/pom.xml | 4 +- dataChange/features/ccsdk-dataChange/pom.xml | 4 +- dataChange/features/features-dataChange/pom.xml | 4 +- dataChange/features/pom.xml | 4 +- dataChange/installer/pom.xml | 4 +- dataChange/model/pom.xml | 4 +- dataChange/pom.xml | 4 +- dataChange/provider/pom.xml | 4 +- dmaap-listener/pom.xml | 4 +- features/ccsdk-sli-northbound-all/pom.xml | 4 +- features/features-sli-northbound/pom.xml | 4 +- features/installer/pom.xml | 4 +- features/pom.xml | 4 +- lcm/features/ccsdk-lcm/pom.xml | 4 +- lcm/features/features-lcm/pom.xml | 4 +- lcm/features/pom.xml | 4 +- lcm/installer/pom.xml | 4 +- lcm/model/pom.xml | 4 +- lcm/pom.xml | 4 +- lcm/provider/pom.xml | 4 +- pom.xml | 4 +- ueb-listener/pom.xml | 4 +- .../sli/northbound/uebclient/SdncBaseModel.java | 281 ++++++--------------- .../sli/northbound/uebclient/SdncGroupModel.java | 24 +- .../sli/northbound/uebclient/SdncNodeModel.java | 126 ++++----- .../sli/northbound/uebclient/SdncUebCallback.java | 24 +- .../sli/northbound/uebclient/SdncVFCModel.java | 4 +- .../sli/northbound/uebclient/SdncVFModel.java | 25 +- .../northbound/uebclient/SdncGroupModelTest.java | 6 +- .../northbound/uebclient/SdncNodeModelTest.java | 18 +- .../northbound/uebclient/TestSdncUebCallback.java | 152 +++++++++++ .../src/test/resources/ueb-listener.properties | 3 +- version.properties | 2 +- 47 files changed, 428 insertions(+), 381 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 1ca2f7276..42eeb71f6 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.2 + 1.3.3-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 5cb47d9c5..be3dee2b5 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 4c0762b59..2917abd74 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 37929d871..6f6ac13f6 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 70b8ad896..33af1bd52 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 5c11f7fe1..a5bb371c6 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 7909602c2..d00afcb41 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index fff19f630..34f65285f 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 6e5e39854..d54eb208a 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index fa5fce035..632cad587 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 904aa5a06..d23a039c1 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 3b48a5356..d58467bb0 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index b842ee670..e0702fee5 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index a2c624e8e..34e4e1953 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index e91fc6b11..49bd6e7ec 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 7aca371c2..635cbe5f7 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index a55235507..5a50ef10a 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index b9652a11b..d4fab812c 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index c778296f2..d3e7cb2b4 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 5aa0825b1..57a8a8774 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index a8def686e..1419661b2 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index db1f3aff3..204e9158a 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index a6c6cdfe8..d07f8111d 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 0835eff1d..c5c1b914c 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index e2cb8cf00..fce265bbe 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index fa17f17c2..46bdfdf3f 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index d20d77be4..486ff093c 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 1bc3a1e77..cd80fb34d 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 54315d1cf..cb7126187 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index f177a06a8..b59d2b92c 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 3625134c8..3966c9d2f 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index f79e5718b..6f41820c3 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index b9d1a770a..455beb899 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 7734d929c..def00a9b3 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 120548d9b..76ad8082c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index e31603106..63b849ec6 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener 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 84918ab10..d3fef173f 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 @@ -77,10 +77,6 @@ public class SdncBaseModel { protected NodeTemplate nodeTemplate = null; protected IEntityDetails entityDetails = null; - public SdncBaseModel(DBResourceManager jdbcDataSource) { - this.jdbcDataSource = jdbcDataSource; - } - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, DBResourceManager jdbcDataSource) { this (sdcCsarHelper, nodeTemplate); this.sdcCsarHelper = sdcCsarHelper; @@ -159,28 +155,7 @@ public class SdncBaseModel { addParameter(PARAM_UUID_KEY, UUID); addParameter(PARAM_VERSION_KEY, extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VERSION)); } - - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group, SdncUebConfiguration config, DBResourceManager jdbcDataSource) throws IOException { - this (sdcCsarHelper, group); - this.sdcCsarHelper = sdcCsarHelper; - this.config = config; - this.jdbcDataSource = jdbcDataSource; - } - - public SdncBaseModel(ISdcCsarHelper sdcCsarHelper, Group group) { - - params = new HashMap(); - this.sdcCsarHelper = sdcCsarHelper; - attributeValueParams = new HashMap(); - // extract group metadata - Metadata metadata = group.getMetadata(); - //customizationUUID = extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULECUSTOMIZATIONUUID); - returning null - customizationUUID = extractValue (metadata, "vfModuleModelCustomizationUUID"); - addParameter(PARAM_INVARIANT_UUID_KEY, extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELINVARIANTUUID)); - addParameter(PARAM_UUID_KEY, extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID)); - addParameter(PARAM_VERSION_KEY, extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELVERSION)); - } /* This is the generic approach Shoujit attempted for 18.06 but can't be implemented without parser API to * get properties with substring match on the name @@ -238,7 +213,7 @@ public class SdncBaseModel { addParameter("resource_type", metadataType, attributeParams); addParameter("resource_customization_uuid", getCustomizationUUID(), attributeParams); - LOG.info("Call insertToscaData for ATTRIBUTE_VALUE_PAIR where resource_uuid = " + getUUID() + " and attriubute_name = " + paramName); + LOG.info("Call insertToscaData for ATTRIBUTE_VALUE_PAIR where resource_uuid = " + getUUID() + " and attribute_name = \"" + paramName + "\""); try { insertToscaData(buildSql("ATTRIBUTE_VALUE_PAIR", "resource_uuid", getUUID(), model_yaml, attributeParams), null); } catch (IOException e) { @@ -248,13 +223,13 @@ public class SdncBaseModel { } } - protected void insertGroupData (NodeTemplate nodeTemplate, NodeTemplate targetNode, String groupType) throws IOException { + protected void insertEntityGroupData (IEntityDetails entityDetails, IEntityDetails targetNode, String groupType) throws IOException { // Get the Groups on a node - Convert to use getEntity in 19.08 EntityQuery entityQuery = EntityQuery.newBuilder(groupType).build(); String customizationUuid = getCustomizationUUIDNoQuotes(); - SdcTypes nodeTemplateSdcType = SdcTypes.valueOf(extractValue(nodeTemplate.getMetaData(), SdcPropertyNames.PROPERTY_NAME_TYPE)); - TopologyTemplateQuery topologyTemplateQuery = TopologyTemplateQuery.newBuilder(nodeTemplateSdcType) + SdcTypes entitySdcType = SdcTypes.valueOf(extractValue(entityDetails.getMetadata(), SdcPropertyNames.PROPERTY_NAME_TYPE)); + TopologyTemplateQuery topologyTemplateQuery = TopologyTemplateQuery.newBuilder(entitySdcType) .customizationUUID(customizationUuid).build(); List groupList = sdcCsarHelper.getEntity(entityQuery, topologyTemplateQuery, false); if (groupList == null) { @@ -268,21 +243,22 @@ public class SdncBaseModel { // ATTRIBUTE_VALUE_PAIR (group properties): group_type, group_role, group_function // RESOURCE_GROUP_TO_TARGET_NODE_MAPPING: group_uuid, parent_uuid (CR node UUID), target_node_uuid, target_type, table_name - SdncGroupModel groupModel = new SdncGroupModel (sdcCsarHelper, group, nodeTemplate, config, jdbcDataSource); - groupModel.insertGroupData(nodeTemplate); + SdncGroupModel groupModel = new SdncGroupModel (sdcCsarHelper, group, entityDetails, config, jdbcDataSource); + String resourceUuid = getUUID(); + groupModel.insertGroupData(resourceUuid); // insert RESOURCE_GROUP_TO_TARGET_NODE_MAPPING try { Map mappingCleanupParams = new HashMap(); addParameter("group_uuid", groupModel.getUUID(), mappingCleanupParams); - addParameter("parent_uuid", extractValue(nodeTemplate.getMetaData(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingCleanupParams); - addParameter("target_node_uuid", extractValue(targetNode.getMetaData(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingCleanupParams); + addParameter("parent_uuid", extractValue(entityDetails.getMetadata(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingCleanupParams); + addParameter("target_node_uuid", extractValue(targetNode.getMetadata(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingCleanupParams); cleanupExistingToscaData("RESOURCE_GROUP_TO_TARGET_NODE_MAPPING", mappingCleanupParams); Map mappingParams = new HashMap(); - addParameter("parent_uuid", extractValue(nodeTemplate.getMetaData(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingParams); - addParameter("target_node_uuid", extractValue(targetNode.getMetaData(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingParams); - String targetType = extractValue(targetNode.getMetaData(), PARAM_TYPE_KEY); + addParameter("parent_uuid", extractValue(entityDetails.getMetadata(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingParams); + addParameter("target_node_uuid", extractValue(targetNode.getMetadata(), SdcPropertyNames.PROPERTY_NAME_UUID), mappingParams); + String targetType = extractValue(targetNode.getMetadata(), PARAM_TYPE_KEY); addParameter("target_type", targetType, mappingParams); String tableName = ""; switch (targetType) { @@ -310,7 +286,7 @@ public class SdncBaseModel { TopologyTemplateQuery topologyTemplateQuery = TopologyTemplateQuery.newBuilder(queryType).customizationUUID(nodeTemplateCustomizationUuid).build(); List policyEntities = sdcCsarHelper.getEntity(policyEntityQuery, topologyTemplateQuery, false); if (policyEntities == null || policyEntities.isEmpty()) { - LOG.info("insertPolicyData: Could not find policy data for: " + nodeTemplateCustomizationUuid); + LOG.debug("insertPolicyData: Could not find policy data for: " + nodeTemplateCustomizationUuid); return; } @@ -339,7 +315,7 @@ public class SdncBaseModel { List policyEntities = sdcCsarHelper.getEntity(policyEntityQuery, topologyTemplateQuery, false); if (policyEntities == null || policyEntities.isEmpty()) { - LOG.info("insertPolicyData: Could not find policy data for Service/VF: " + resourceUuid); + LOG.debug("insertPolicyData: Could not find policy data for Service/VF: " + resourceUuid); return; } @@ -352,7 +328,7 @@ public class SdncBaseModel { insertResourcePolicyData(policyEntity, resourceUuid); List targetEntities = policyEntity.getTargetEntities(); if (targetEntities == null || targetEntities.isEmpty()) { - LOG.info("insertPolicyData: Could not find targetEntites for policy: " + policyUuid); + LOG.debug("insertPolicyData: Could not find targetEntites for policy: " + policyUuid); continue; } @@ -483,7 +459,7 @@ public class SdncBaseModel { try { cleanupExistingToscaData("NODE_CAPABILITY", cleanupParams); // will also delete NODE_CAPABILITY_PROPERTY with same capability_id - LOG.info("Call insertToscaData for NODE_CAPABILITY where capability_provider_uuid = " + capabilityProviderUuid + " and capability_name = " + capability.getName()); + LOG.info("Call insertToscaData for NODE_CAPABILITY where capability_provider_uuid = " + capabilityProviderUuid + " and capability_name = \"" + capability.getName() + "\""); insertToscaData(buildSql("NODE_CAPABILITY", "capability_provider_uuid", capabilityProviderUuid, model_yaml, nodeCapabilityParams), null); // Get capabilityId for capability just inserted @@ -545,7 +521,7 @@ public class SdncBaseModel { try { cleanupExistingToscaData("NODE_CAPABILITY", cleanupParams); // will also delete NODE_CAPABILITY_PROPERTY with same capability_id - LOG.info("Call insertToscaData for NODE_CAPABILITY where capability_provider_uuid = " + capabilityProviderUuid + " and capability_name = " + capability.getName()); + LOG.info("Call insertToscaData for NODE_CAPABILITY where capability_provider_uuid = " + capabilityProviderUuid + " and capability_name = \"" + capability.getName()+ "\""); insertToscaData(buildSql("NODE_CAPABILITY", "capability_provider_uuid", capabilityProviderUuid, model_yaml, nodeCapabilityParams), null); // Get capabilityId for capability just inserted @@ -578,7 +554,7 @@ public class SdncBaseModel { try { // Data from NODE_CAPABILITY_PROPERTY is cleaned up via cascade delete on NODE_CAPABILITY - LOG.info("Call insertToscaData for NODE_CAPABILITY_PROPERTY where capability_id = " + capabilityId + " and property_name = " + property.getName() + ", property_value: " + property.getValue().toString()); + LOG.info("Call insertToscaData for NODE_CAPABILITY_PROPERTY where capability_id = \"" + capabilityId + "\" and capability_property_name = \"" + property.getName() + "\" and capability_property_type = \"" + property.getValue().toString() + "\""); insertToscaData(buildSql("NODE_CAPABILITY_PROPERTY", "capability_id", capabilityId, model_yaml, nodeCapabilityPropertyParams), null); } catch (IOException e) { LOG.error("Could not insert Tosca CSAR data into the NODE_CAPABILITY_PROPERTY table"); @@ -605,12 +581,6 @@ public class SdncBaseModel { } } - public static void addIntParameter (String name, String value, Map params) { - if (value != null && !value.isEmpty()) { - params.put(name, value); - } - } - public static void addParameter (String name, String value, Map params) { if (value != null && !value.isEmpty()) { // remove any quotes within the string @@ -682,7 +652,7 @@ public class SdncBaseModel { if (entityDetails.getProperties().containsKey(path)) { Property property = entityDetails.getProperties().get(path); - if (property != null && property.getLeafPropertyValue(name) != null) { + if (property != null && !property.getLeafPropertyValue(name).isEmpty()) { value = property.getLeafPropertyValue(name).get(0); } } @@ -693,34 +663,49 @@ public class SdncBaseModel { return ""; } } - - protected String extractValue (Property property, String name) { + + protected String extractValue (IEntityDetails entityDetails, String path1, String path2, String name) { String value = ""; - if (!property.getLeafPropertyValue(name).isEmpty()) { - value = property.getLeafPropertyValue(name).get(0); - } - + value = extractNestedValue (entityDetails, path1, path2, name); + if (value != null && !value.isEmpty() && !value.equalsIgnoreCase("null")) { return value; } else { return ""; } } - - protected String extractBooleanValue (Property property, String name) { + + protected String extractBooleanValue (IEntityDetails entityDetails, String path1, String path2, String name) { String value = ""; - if (!property.getLeafPropertyValue(name).isEmpty()) { - value = property.getLeafPropertyValue(name).get(0); - } + value = extractNestedValue (entityDetails, path1, path2, name); - if (value != null && !value.isEmpty() && !value.equalsIgnoreCase("null")) { + if (value != null && !value.isEmpty()) { return value.contains("true") ? "Y" : "N"; } else { return ""; } } + + protected String extractNestedValue (IEntityDetails entityDetails, String path1, String path2, String name) { + String value = ""; + + if (entityDetails.getProperties().containsKey(path1)) { + Property path1Property = entityDetails.getProperties().get(path1); + if (path1Property != null) { + Map path1PropertyValue = (Map) path1Property.getValue(); + if (path1PropertyValue.containsKey(path2)) { + Map path2PropertyValue = (Map) path1PropertyValue.get(path2); + if (path2PropertyValue != null && path2PropertyValue.containsKey(name)) { + value = path2PropertyValue.get(name).toString(); + } + } + } + } + + return value; + } protected String extractIntegerValue (Property property, String name) { String value = ""; @@ -735,35 +720,48 @@ public class SdncBaseModel { return ""; } } + + protected String extractGetInputValue (IEntityDetails group, IEntityDetails entityDetails, String name) { - protected String extractGetInputValue (Group group, NodeTemplate nodeTemplate, String name) { - - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, extractGetInputName (group, name)); - if (value != null) { - return value; + // Extract the property on entityDetails after getting the property name from the group + String getInputName = extractGetInputName (group, name); + String entityPropertyValue = ""; + + if (entityDetails.getProperties().containsKey(getInputName)) { + Property entityProperty = entityDetails.getProperties().get(getInputName); + entityPropertyValue = entityProperty.getValue().toString(); + } + + if (!entityPropertyValue.isEmpty()) { + return entityPropertyValue; } else { return ""; } } - protected String extractGetInputName (Group group, String name) { + protected String extractGetInputName (IEntityDetails group, String name) { String getInputName = name; - String groupProperty = sdcCsarHelper.getGroupPropertyLeafValue(group, name); - if (groupProperty != null) { - int getInputIndex = groupProperty.indexOf("{get_input="); + String groupPropertyValue = ""; + if (group.getProperties().containsKey(name)) { + Property groupProperty = group.getProperties().get(name); + groupPropertyValue = groupProperty.getValue().toString(); + } + if (!groupPropertyValue.isEmpty()) { + int getInputIndex = groupPropertyValue.indexOf("{get_input="); if (getInputIndex > -1) { - getInputName = groupProperty.substring(getInputIndex+11, groupProperty.length()-1); + getInputName = groupPropertyValue.substring(getInputIndex+11, groupPropertyValue.length()-1); } } return getInputName; } - - protected String extractGetInputValue (Policy policy, NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, extractGetInputName (policy, name)); + // Remove this after migrate SdncVFModel to getEntity + protected String extractGetInputValue (Group group, NodeTemplate nodeTemplate, String name) { + + String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, extractGetInputName (group, name)); if (value != null) { return value; } else { @@ -771,13 +769,12 @@ public class SdncBaseModel { } } - protected String extractGetInputName (Policy policy, String name) { + // Remove this after migrate SdncVFModel to getEntity + protected String extractGetInputName (Group group, String name) { String getInputName = name; - //String groupProperty = sdcCsarHelper.getPolicyPropertyLeafValue(policy, name); - Map propMap = policy.getPolicyProperties(); - String groupProperty = nullCheck(propMap.get(name)); - if (!groupProperty.isEmpty()) { + String groupProperty = sdcCsarHelper.getGroupPropertyLeafValue(group, name); + if (groupProperty != null) { int getInputIndex = groupProperty.indexOf("{get_input="); if (getInputIndex > -1) { getInputName = groupProperty.substring(getInputIndex+11, groupProperty.length()-1); @@ -787,36 +784,7 @@ public class SdncBaseModel { return getInputName; } - - protected String extractValue (Policy policy, String name) { - - Map propMap = policy.getPolicyProperties(); - if (propMap == null) { - return ""; - } else { - return nullCheck(propMap.get(name)); - } - } - - protected static String extractValueStatic (Policy policy, String name) { - - Map propMap = policy.getPolicyProperties(); - if (propMap == null) { - return ""; - } else { - return nullCheckStatic(propMap.get(name)); - } - } - - public static String extractValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null) { - return value; - } else { - return ""; - } - } - + protected String extractValue (CapabilityAssignment capability, String name) { String value = sdcCsarHelper.getCapabilityPropertyLeafValue(capability, name); if (value != null) { @@ -855,8 +823,10 @@ public class SdncBaseModel { String value = null; if (entityDetails.getProperties().containsKey(path)) { Property property = entityDetails.getProperties().get(path); - if (property != null && property.getLeafPropertyValue(name) != null) { - value = property.getLeafPropertyValue(name).get(0); + if (property != null) { + if (property != null && !property.getLeafPropertyValue(name).isEmpty()) { + value = property.getLeafPropertyValue(name).get(0); + } } } @@ -867,15 +837,6 @@ public class SdncBaseModel { } } - public static String extractBooleanValue (ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, String name) { - String value = sdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - protected Object extractObjectValue (NodeTemplate nodeTemplate, String name) { Object value = sdcCsarHelper.getNodeTemplatePropertyValueAsObject(nodeTemplate, name); if (value != null) { @@ -885,60 +846,6 @@ public class SdncBaseModel { } } - protected String extractValue (Group group, String name) { - String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractBooleanValue (Group group, String name) { - String value = sdcCsarHelper.getGroupPropertyLeafValue(group, name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - protected String extractInputDefaultValue (String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null) { - return value; - } else { - return ""; - } - } - - protected String extractBooleanInputDefaultValue (String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - - public static String extractInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null) { - return value; - } else { - return ""; - } - } - - public static String extractBooleanInputDefaultValue (ISdcCsarHelper sdcCsarHelper, String name) { - String value = sdcCsarHelper.getServiceInputLeafValueOfDefault(name); - if (value != null && !value.isEmpty()) { - return value.contains("true") ? "Y" : "N"; - } else { - return ""; - } - } - public static String extractSubstitutionMappingTypeName (ISdcCsarHelper sdcCsarHelper) { String value = sdcCsarHelper.getServiceSubstitutionMappingsTypeName(); if (value != null) { @@ -1058,21 +965,6 @@ public class SdncBaseModel { throw new IOException (e); } - } - - protected static void insertToscaData(DBResourceManager jdbcDataSource, String toscaDataString, ArrayList arguments) throws IOException - { - LOG.debug("insertToscaData: " + toscaDataString); - - try { - - jdbcDataSource.writeData(toscaDataString, arguments, null); - - } catch (SQLException e) { - LOG.error("Could not insert Tosca data into the database"); - throw new IOException (e); - } - } protected void cleanUpExistingToscaData(String tableName, String keyName, String keyValue) throws IOException @@ -1188,7 +1080,7 @@ public class SdncBaseModel { rowCount ++; } if (rowCount != 0) { - LOG.info("checkForExistingToscaData in " + tableName + ": Data FOUND"); + LOG.debug("checkForExistingToscaData in " + tableName + ": Data FOUND"); dataExists = true; } @@ -1233,6 +1125,7 @@ public class SdncBaseModel { return data; } + protected void addParamsToMap (Map fromMap, Map toMap) { for (String key : fromMap.keySet()) { if (!toMap.containsKey(key)) { @@ -1249,12 +1142,4 @@ public class SdncBaseModel { return stringValue; } - protected static String nullCheckStatic (Object extractedObject) { - String stringValue = ""; - if (extractedObject != null) { - return extractedObject.toString(); - } - return stringValue; - } - } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java index 268590feb..622936652 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModel.java @@ -27,8 +27,6 @@ import java.io.IOException; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; -import org.onap.sdc.toscaparser.api.Group; -import org.onap.sdc.toscaparser.api.NodeTemplate; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +38,7 @@ public class SdncGroupModel extends SdncBaseModel { private static final String groupType = "group_type"; - public SdncGroupModel(ISdcCsarHelper sdcCsarHelper, IEntityDetails group, NodeTemplate nodeTemplate, SdncUebConfiguration config, DBResourceManager jdbcDataSource) throws IOException { + public SdncGroupModel(ISdcCsarHelper sdcCsarHelper, IEntityDetails group, IEntityDetails entityDetails, SdncUebConfiguration config, DBResourceManager jdbcDataSource) throws IOException { super(sdcCsarHelper, group); @@ -60,24 +58,20 @@ public class SdncGroupModel extends SdncBaseModel { addParameter("vfc_parent_port_role", extractValue(group, "vfc_parent_port_role"), attributeValueParams); addParameter("subinterface_role", extractValue(group, "subinterface_role"), attributeValueParams); - // relevant complex group properties are extracted and inserted into ATTRIBUTE_VALUE_PAIR - String extractedGroupType = extractValue (group, groupType); - String extractedGroupRole = extractValue (group, "group_role"); - String extractedGroupFunction = extractValue (group, "group_function"); - addParameter(groupType, extractedGroupType, attributeValueParams); - addParameter("group_role", extractedGroupRole, attributeValueParams); - addParameter("group_function", extractedGroupFunction, attributeValueParams); + // relevant complex group properties are extracted and inserted into ATTRIBUTE_VALUE_PAIR + addParameter(extractGetInputName (group, groupType), extractGetInputValue(group, entityDetails, groupType), attributeValueParams); + addParameter(extractGetInputName (group, "group_role"), extractGetInputValue(group, entityDetails, "group_role"), attributeValueParams); + addParameter(extractGetInputName (group, "group_function"), extractGetInputValue(group, entityDetails, "group_function"), attributeValueParams); } - public void insertGroupData(NodeTemplate resourceNodeTemplate) throws IOException { + public void insertGroupData(String resourceUuid) throws IOException { try { // insert into RESOURCE_GROUP/ATTRIBUTE_VALUE_PAIR - String resourceNodeUuid = "\"" + extractValue (resourceNodeTemplate.getMetaData(), "UUID") + "\""; - cleanUpExistingToscaData("RESOURCE_GROUP", "resource_uuid", resourceNodeUuid, "group_uuid", getUUID()) ; - LOG.info("Call insertToscaData for RESOURCE_GROUP where group_uuid = " + getUUID() + " and resource_uuid = " + resourceNodeUuid); - insertToscaData(buildSql("RESOURCE_GROUP", "resource_uuid", resourceNodeUuid, model_yaml, params), null); + cleanUpExistingToscaData("RESOURCE_GROUP", "resource_uuid", resourceUuid, "group_uuid", getUUID()) ; + LOG.info("Call insertToscaData for RESOURCE_GROUP where group_uuid = " + getUUID() + " and resource_uuid = " + resourceUuid); + insertToscaData(buildSql("RESOURCE_GROUP", "resource_uuid", resourceUuid, model_yaml, params), null); insertRelevantAttributeData("group"); } catch (IOException e) { diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java index 4870f29e3..cf81b3cae 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModel.java @@ -24,11 +24,13 @@ package org.onap.ccsdk.sli.northbound.uebclient; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; -import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.onap.sdc.toscaparser.api.Property; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,59 +45,53 @@ public class SdncNodeModel extends SdncBaseModel { private String [] bindingUuids = null; // Using ASDC TOSCA Parser 17.07 - public SdncNodeModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, DBResourceManager jdbcDataSource) { + public SdncNodeModel(ISdcCsarHelper sdcCsarHelper, IEntityDetails nodeEntity, DBResourceManager jdbcDataSource, SdncUebConfiguration config) throws IOException { - super(sdcCsarHelper, nodeTemplate, jdbcDataSource); + super(sdcCsarHelper, nodeEntity, jdbcDataSource, config); - // extract inpuecompGeneratedNamingts - String ecompGeneratedNaming = extractBooleanInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_ECOMPGENERATEDNAMING); - addParameter("ecomp_generated_naming",ecompGeneratedNaming); - addParameter("naming_policy", extractInputDefaultValue(SdcPropertyNames.PROPERTY_NAME_SERVICENAMING_DEFAULT_NAMINGPOLICY)); - // extract properties - addParameter("network_type", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE)); - addParameter("network_role", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE)); - addParameter("network_scope", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE)); - addParameter("network_technology", extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY)); + addParameter("ecomp_generated_naming", extractBooleanValue (nodeEntity, "exVL_naming", "ecomp_generated_naming")); // should be extractBooleanValue? + addParameter("naming_policy", extractValue (nodeEntity, "exVL_naming", "naming_policy")); + + addParameter("network_type", extractValue (nodeEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE)); + addParameter("network_role", extractValue (nodeEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE)); + addParameter("network_scope", extractValue (nodeEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE)); + addParameter("network_technology", extractValue (nodeEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY)); // extract properties - network_assignments - addParameter("is_shared_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISSHAREDNETWORK)); - addParameter("is_external_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_ISEXTERNALNETWORK)); - String trunkNetworkIndicator = extractBooleanValue(nodeTemplate, "network_assignments#is_trunked"); + addParameter("is_shared_network", extractBooleanValue (nodeEntity, "network_assignments", "is_shared_network")); + addParameter("is_external_network", extractBooleanValue (nodeEntity, "network_assignments", "is_external_network")); + String trunkNetworkIndicator = extractBooleanValue(nodeEntity, "network_assignments", "is_trunked"); addParameter("trunk_network_indicator", trunkNetworkIndicator); // extract properties - network_assignments - ipv4_subnet_default_assignment - String useIpv4 = extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#use_ipv4"); + String useIpv4 = extractBooleanValue(nodeEntity, "network_assignments", "use_ipv4"); addParameter("use_ipv4", useIpv4); - addParameter("ipv4_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#dhcp_enabled")); - if (useIpv4.contains("Y")) { - addParameter("ipv4_ip_version", "ipv4"); - } - addParameter("ipv4_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#cidr_mask")); - addParameter("eipam_v4_address_plan", extractValue(nodeTemplate, "network_assignments#ipv4_subnet_default_assignment#ip_network_address_plan")); + addParameter("ipv4_dhcp_enabled", extractBooleanValue(nodeEntity, "network_assignments", "ipv4_subnet_default_assignment", "dhcp_enabled")); + addParameter("ipv4_ip_version", extractValue(nodeEntity, "network_assignments", "ipv4_subnet_default_assignment", "ip_version")); + addParameter("ipv4_cidr_mask", extractValue(nodeEntity, "network_assignments", "ipv4_subnet_default_assignment", "cidr_mask")); + addParameter("eipam_v4_address_plan", extractValue(nodeEntity, "network_assignments", "ipv4_subnet_default_assignment", "ip_network_address_plan")); // extract properties - network_assignments - ipv6_subnet_default_assignment - String useIpv6 = extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#use_ipv6"); + String useIpv6 = extractBooleanValue(nodeEntity, "network_assignments", "use_ipv6"); addParameter("use_ipv6", useIpv6); - addParameter("ipv6_dhcp_enabled", extractBooleanValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#dhcp_enabled")); - if (useIpv6.contains("Y")) { - addParameter("ipv6_ip_version", "ipv6"); - } - addParameter("ipv6_cidr_mask", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#cidr_mask")); - addParameter("eipam_v6_address_plan", extractValue(nodeTemplate, "network_assignments#ipv6_subnet_default_assignment#ip_network_address_plan")); + addParameter("ipv6_dhcp_enabled", extractBooleanValue(nodeEntity, "network_assignments", "ipv6_subnet_default_assignment", "dhcp_enabled")); + addParameter("ipv6_ip_version", extractValue(nodeEntity, "network_assignments", "ipv6_subnet_default_assignment", "ip_version")); + addParameter("ipv6_cidr_mask", extractValue(nodeEntity, "network_assignments", "ipv6_subnet_default_assignment", "cidr_mask")); + addParameter("eipam_v6_address_plan", extractValue(nodeEntity, "network_assignments", "ipv6_subnet_default_assignment", "ip_network_address_plan")); // extract properties - provider_network - addParameter("is_provider_network", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK)); - addParameter("physical_network_name", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_PHYSICALNETWORKNAME)); + addParameter("is_provider_network", extractBooleanValue (nodeEntity, "provider_network", "is_provider_network")); + addParameter("physical_network_name", extractValue(nodeEntity, "provider_network", "physical_network_name")); // extract properties - network_flows - addParameter("is_bound_to_vpn", extractBooleanValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_ISBOUNDTOVPN)); + addParameter("is_bound_to_vpn", extractBooleanValue (nodeEntity, "network_flows", "is_bound_to_vpn")); // extract properties - network_flows - vpn_bindings - String vpnBindingString = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKFLOWS_VPNBINDING); + String vpnBindingString = extractValue (nodeEntity, "network_flows", "vpn_binding"); bindingUuids = vpnBindingString.split(","); -} + } public String getServiceUUID() { return serviceUUID; @@ -113,13 +109,24 @@ public class SdncNodeModel extends SdncBaseModel { params.put("ecomp_generated_naming", "\"" + ecompGeneratedNaming + "\""); } } + public void setComplexResourceUUID(String complexResourceUuid) { + if (complexResourceUuid != null && !complexResourceUuid.isEmpty()) { + params.put("complex_resource_uuid", complexResourceUuid); + } + } + + public void setComplexResourceCustomizationUUID(String complexResourceCustomizationUuid) { + if (complexResourceCustomizationUuid != null && !complexResourceCustomizationUuid.isEmpty()) { + params.put("complex_resource_customization_uuid", complexResourceCustomizationUuid); + } + } public void insertNetworkModelData () throws IOException { try { // Clean up NETWORK_MODEL data for this customization_uuid and service_uuid? cleanUpExistingToscaData("NETWORK_MODEL", "customization_uuid", getCustomizationUUID()); cleanUpExistingToscaData("VPN_BINDINGS", "network_customization_uuid", getCustomizationUUID()); - LOG.info("Call insertToscaData for NETWORK_MODEL customizationUUID = " + getCustomizationUUID()); + LOG.info("Call insertToscaData for NETWORK_MODEL where customization_uuid = " + getCustomizationUUID()); insertToscaData(getSql(model_yaml), null); insertToscaData(getVpnBindingsSql(), null); } catch (IOException e) { @@ -127,48 +134,47 @@ public class SdncNodeModel extends SdncBaseModel { throw new IOException (e); } } - + public void insertRelatedNetworkRoleData () throws IOException { - Object propertyValue = sdcCsarHelper.getNodeTemplatePropertyValueAsObject(nodeTemplate, "network_assignments#related_networks"); - ArrayList> relatedNetworkList = (ArrayList)propertyValue; - - String networkModelCustomizationUUID = getCustomizationUUID(); + if (entityDetails.getProperties().containsKey("related_networks")) { + + Property relatedNetworksProperty = entityDetails.getProperties().get("related_networks"); + List relatedNetworkRoles = relatedNetworksProperty.getLeafPropertyValue("related_network_role"); + + String networkModelCustomizationUUID = getCustomizationUUID(); - if (relatedNetworkList != null) { - - try { - cleanUpExistingToscaData("RELATED_NETWORK_ROLE", "network_model_customization_uuid", networkModelCustomizationUUID); - } catch (IOException e) { - LOG.error("Could not clean up Tosca CSAR data in the RELATED_NETWORK_ROLE table"); - throw new IOException (e); - } - - for (Map relatedNetworkValue : relatedNetworkList) { - LOG.debug("Node Template [" + nodeTemplate.getName() + "], property [" + "related_network_role" + "] property value: " + relatedNetworkValue.get("related_network_role")); + try { + cleanUpExistingToscaData("RELATED_NETWORK_ROLE", "network_model_customization_uuid", networkModelCustomizationUUID); + } catch (IOException e) { + LOG.error("Could not clean up Tosca CSAR data in the RELATED_NETWORK_ROLE table"); + throw new IOException (e); + } + + for (String relatedNetworkRole : relatedNetworkRoles) { + + LOG.debug("Node Template [" + entityDetails.getName() + "], property [" + "related_network_role" + "] property value: " + relatedNetworkRole); - String relatedNetworkRoleValue = relatedNetworkValue.get("related_network_role"); - try { // Table cleanup RELATED_NETWORK_ROLE occurs per network // If related_network_role for this service already exist in RELATED_NETWORK_ROLE, don't attempt insertion Map relatedNetworkRoleParamsCheck = new HashMap(); - addParameter("related_network_role", relatedNetworkRoleValue, relatedNetworkRoleParamsCheck); + addParameter("related_network_role", relatedNetworkRole, relatedNetworkRoleParamsCheck); addParameter("network_model_customization_uuid", networkModelCustomizationUUID, relatedNetworkRoleParamsCheck); if (checkForExistingToscaData("RELATED_NETWORK_ROLE", relatedNetworkRoleParamsCheck) == false) { relatedNetworkRoleParamsCheck.remove("related_network_role"); LOG.info("Call insertToscaData for RELATED_NETWORK_ROLE where network_model_customization_uuid = " + networkModelCustomizationUUID); - insertToscaData(buildSql("RELATED_NETWORK_ROLE", "related_network_role", "\"" + relatedNetworkRoleValue + "\"", model_yaml, relatedNetworkRoleParamsCheck), null); + insertToscaData(buildSql("RELATED_NETWORK_ROLE", "related_network_role", "\"" + relatedNetworkRole + "\"", model_yaml, relatedNetworkRoleParamsCheck), null); } } catch (IOException e) { LOG.debug("Could not insert Tosca CSAR data into the RELATED_NETWORK_ROLE table"); throw new IOException (e); } - } - } - else { - LOG.debug("Node Template [" + nodeTemplate.getName() + "], property [" + "related_networks" + "] property value: " + null); - } + } + } + else { + LOG.debug("Node Template [" + entityDetails.getName() + "], property [" + "related_networks" + "] property value: " + null); + } } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index d39622621..d7418824b 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -703,18 +703,22 @@ public class SdncUebCallback implements INotificationCallback { } - // Ingest Network (VL) Data - 1707 - List vlNodeTemplatesList = sdcCsarHelper.getServiceVlList(); + // Ingest Network (VL) Data - 1707 / migrate to getEntity - 1908 + EntityQuery vlEntityQuery = EntityQuery.newBuilder(SdcTypes.VL).build(); + TopologyTemplateQuery vlTopologyTemplateQuery = TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE).build(); + List vlEntities = sdcCsarHelper.getEntity(vlEntityQuery, vlTopologyTemplateQuery, false); // false to not recurse + if (vlEntities != null && !vlEntities.isEmpty()) { + for (IEntityDetails vlEntity : vlEntities){ - for (NodeTemplate nodeTemplate : vlNodeTemplatesList) { - SdncNodeModel nodeModel = new SdncNodeModel (sdcCsarHelper, nodeTemplate, jdbcDataSource); - nodeModel.setServiceUUID(serviceModel.getServiceUUID()); + try { + SdncNodeModel nodeModel = new SdncNodeModel (sdcCsarHelper, vlEntity, jdbcDataSource, config); + nodeModel.setServiceUUID(serviceModel.getServiceUUID()); - try { - nodeModel.insertNetworkModelData(); - nodeModel.insertRelatedNetworkRoleData(); - } catch (IOException e) { - deployStatus = DistributionStatusEnum.DEPLOY_ERROR; + nodeModel.insertNetworkModelData(); + nodeModel.insertRelatedNetworkRoleData(); + } catch (IOException e) { + deployStatus = DistributionStatusEnum.DEPLOY_ERROR; + } } } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java index bd71c0240..fc288aaa9 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java @@ -94,7 +94,7 @@ public class SdncVFCModel extends SdncBaseModel { TopologyTemplateQuery topologyTemplateQueryVFC = TopologyTemplateQuery.newBuilder(SdcTypes.CVFC).customizationUUID(vfcCustomizationUuid).build(); List cpEntities = sdcCsarHelper.getEntity(entityQueryCP, topologyTemplateQueryVFC, true); if (cpEntities == null || cpEntities.isEmpty()) { - LOG.info("insertVFCtoNetworkRoleMappingData: Could not find the nested CVFCs for: " + vfcCustomizationUuid); + LOG.debug("insertVFCtoNetworkRoleMappingData: Could not find the nested CVFCs for: " + vfcCustomizationUuid); return; } @@ -282,7 +282,7 @@ public class SdncVFCModel extends SdncBaseModel { TopologyTemplateQuery topologyTemplateQueryVFC = TopologyTemplateQuery.newBuilder(SdcTypes.CVFC).customizationUUID(vfcCustomizationUuid).build(); List cpEntities = sdcCsarHelper.getEntity(entityQueryCP, topologyTemplateQueryVFC, true); if (cpEntities == null || cpEntities.isEmpty()) { - LOG.info("insertVFCRelatedNetworkRoleData: Could not find the nested CVFCs for: " + vfcCustomizationUuid); + LOG.debug("insertVFCRelatedNetworkRoleData: Could not find the nested CVFCs for: " + vfcCustomizationUuid); return; } diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java index 2b2d078f7..dd93f45db 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFModel.java @@ -54,7 +54,14 @@ public class SdncVFModel extends SdncBaseModel { public SdncVFModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate, DBResourceManager jdbcDataSource, SdncUebConfiguration config) throws IOException { super(sdcCsarHelper, nodeTemplate, jdbcDataSource, config); - + + // Since SdncVFModel is not yet converted for getEntity, find the entity for this nodeTemplate + EntityQuery vfEntityQuery = EntityQuery.newBuilder(SdcTypes.VF).customizationUUID(getCustomizationUUIDNoQuotes()).build(); + TopologyTemplateQuery vfTopologyTemplateQuery = TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE).build(); + List vfEntities = sdcCsarHelper.getEntity(vfEntityQuery, vfTopologyTemplateQuery, true); + if (vfEntities != null && !vfEntities.isEmpty()) { + entityDetails = vfEntities.get(0); + } // extract metadata Metadata metadata = nodeTemplate.getMetaData(); addParameter("name", extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME)); @@ -158,7 +165,7 @@ public class SdncVFModel extends SdncBaseModel { try { cleanUpExistingToscaData("VF_MODULE_MODEL", "customization_uuid", vfModuleModel.getCustomizationUUID()); cleanUpExistingToscaData("VF_MODULE_TO_VFC_MAPPING", "vf_module_customization_uuid", vfModuleModel.getCustomizationUUID()); - LOG.info("Call insertToscaData for VF_MODULE_MODEL where vf_module_customization_uuid = " + vfModuleModel.getCustomizationUUID()); + LOG.info("Call insertToscaData for VF_MODULE_MODEL where customization_uuid = " + vfModuleModel.getCustomizationUUID()); insertToscaData(vfModuleModel.buildSql("VF_MODULE_MODEL", model_yaml), null); } catch (IOException e) { LOG.error("Could not insert Tosca CSAR data into the VF_MODULE_MODEL table "); @@ -175,7 +182,7 @@ public class SdncVFModel extends SdncBaseModel { .build(); List vfModulesNonCatalog = sdcCsarHelper.getEntity(entityQuery2, topologyTemplateQuery2, false); if (vfModulesNonCatalog == null || vfModulesNonCatalog.isEmpty()) { - LOG.info("insertVFModuleData: Could not find the non-catelog VF Module for: " + vfModuleModel.getCustomizationUUID() + ". Unable to insert members into VF_MODULE_TO_VFC_MAPPING"); + LOG.debug("insertVFModuleData: Could not find the non-catelog VF Module for: " + vfModuleModel.getCustomizationUUID() + ". Unable to insert members into VF_MODULE_TO_VFC_MAPPING"); continue; } @@ -217,7 +224,7 @@ public class SdncVFModel extends SdncBaseModel { .build(); List nestedCvfcs = sdcCsarHelper.getEntity(entityQuery3, topologyTemplateQuery3, true); // true allows for nested search if (nestedCvfcs == null || nestedCvfcs.isEmpty()) { - LOG.info("insertVFModuleData: Could not find the nested CVFCs for: " + cvfcCustomizationUuid); + LOG.debug("insertVFModuleData: Could not find the nested CVFCs for: " + cvfcCustomizationUuid); continue; } @@ -284,7 +291,7 @@ public class SdncVFModel extends SdncBaseModel { TopologyTemplateQuery topologyTemplateQueryVF = TopologyTemplateQuery.newBuilder(SdcTypes.VF).customizationUUID(getCustomizationUUIDNoQuotes()).build(); List cpEntities = sdcCsarHelper.getEntity(entityQueryCP, topologyTemplateQueryVF, true); if (cpEntities == null || cpEntities.isEmpty()) { - LOG.info("insertVFtoNetworkRoleMappingData: Could not find CPs for VF: " + getCustomizationUUIDNoQuotes()); + LOG.debug("insertVFtoNetworkRoleMappingData: Could not find CPs for VF: " + getCustomizationUUIDNoQuotes()); return; } @@ -343,7 +350,7 @@ public class SdncVFModel extends SdncBaseModel { .build(); List cvfcEntities = sdcCsarHelper.getEntity(entityQuery, topologyTemplateQuery, true); // true allows for nested search if (cvfcEntities == null || cvfcEntities.isEmpty()) { - LOG.info("insertVFCDataEntity: Could not find the CVFCs for: " + vfCustomizationUid); + LOG.debug("insertVFCDataEntity: Could not find the CVFCs for: " + vfCustomizationUid); } for (IEntityDetails cvfcEntity: cvfcEntities) { @@ -382,8 +389,8 @@ public class SdncVFModel extends SdncBaseModel { for (IEntityDetails group : vfcInstanceGroupListForVf){ - SdncGroupModel groupModel = new SdncGroupModel (sdcCsarHelper, group, nodeTemplate, config, jdbcDataSource); - groupModel.insertGroupData(nodeTemplate); + SdncGroupModel groupModel = new SdncGroupModel (sdcCsarHelper, group, entityDetails, config, jdbcDataSource); + groupModel.insertGroupData(getUUID()); // For each group, populate NODE_CAPABILITY/NODE_CAPABILITY_PROPERTY insertNodeCapabilitiesEntityData(group.getCapabilities()); @@ -419,7 +426,7 @@ public class SdncVFModel extends SdncBaseModel { break; } addParameter("table_name", tableName, mappingParams); - LOG.info("Call insertToscaData for RESOURCE_GROUP_TO_TARGET_NODE_MAPPING where group_uuid = " + groupModel.getUUID() + " and target_node_uuid = " + targetNodeUuid); + LOG.info("Call insertToscaData for RESOURCE_GROUP_TO_TARGET_NODE_MAPPING where group_uuid = " + groupModel.getUUID() + " and target_node_uuid = \"" + targetNodeUuid + "\""); insertToscaData(buildSql("RESOURCE_GROUP_TO_TARGET_NODE_MAPPING", "group_uuid", groupModel.getUUID(), model_yaml, mappingParams), null); } catch (IOException e) { LOG.error("Could not insert Tosca CSAR data into the RESOURCE_GROUP_TO_TARGET_NODE_MAPPING"); diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModelTest.java index 8bf3c9145..3b2cd96a1 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncGroupModelTest.java @@ -8,8 +8,6 @@ import java.io.IOException; import org.junit.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; -import org.onap.sdc.toscaparser.api.NodeTemplate; -import org.onap.sdc.toscaparser.api.Group; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; public class SdncGroupModelTest { @@ -17,13 +15,13 @@ import org.onap.ccsdk.sli.core.dblib.DBResourceManager; @Test public void testSdncGroupModelConstructor() { ISdcCsarHelper mockCsarHelper = mock(ISdcCsarHelper.class); - NodeTemplate nodeTemplate = mock(NodeTemplate.class); IEntityDetails group = mock(IEntityDetails.class); + IEntityDetails entityDetails = mock(IEntityDetails.class); DBResourceManager mockDBResourceManager = mock(DBResourceManager.class); SdncUebConfiguration mockSdncUebConfiguration = mock(SdncUebConfiguration.class); SdncGroupModel testSdncGroupModel = null; try { - testSdncGroupModel = new SdncGroupModel(mockCsarHelper,group,nodeTemplate,mockSdncUebConfiguration,mockDBResourceManager); + testSdncGroupModel = new SdncGroupModel(mockCsarHelper,group,entityDetails,mockSdncUebConfiguration,mockDBResourceManager); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java index a77c5adbf..9f859e793 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/SdncNodeModelTest.java @@ -7,9 +7,9 @@ import static org.mockito.Mockito.*; import java.io.IOException; import org.junit.Before; -import org.junit.Test; -import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; -import org.onap.sdc.toscaparser.api.NodeTemplate; +import org.junit.Test; +import org.onap.sdc.tosca.parser.api.IEntityDetails; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.onap.ccsdk.sli.core.dblib.DBResourceManager; @@ -18,17 +18,17 @@ public class SdncNodeModelTest { SdncNodeModel sdncNodeModel; @Before - public void setUp() throws Exception { + public void setUp() throws Exception { + SdncUebConfiguration config = mock(SdncUebConfiguration.class); ISdcCsarHelper isdcCsarHelper = mock(ISdcCsarHelper.class); - NodeTemplate nodeTemplate = mock(NodeTemplate.class); + IEntityDetails entityDetails = mock(IEntityDetails.class); Metadata mockMetadata = mock(Metadata.class); DBResourceManager mockDBResourceManager = mock(DBResourceManager.class); - when(nodeTemplate.getMetaData()).thenReturn(mockMetadata); + when(entityDetails.getMetadata()).thenReturn(mockMetadata); when(isdcCsarHelper.getMetadataPropertyValue(mockMetadata, "customizationUUID")).thenReturn("aaaa-bbbb-cccc-dddd"); - when(isdcCsarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, "network_type")).thenReturn("test-network-type"); - sdncNodeModel = new SdncNodeModel(isdcCsarHelper, nodeTemplate, mockDBResourceManager); + sdncNodeModel = new SdncNodeModel(isdcCsarHelper, entityDetails, mockDBResourceManager, config); sdncNodeModel.setServiceUUID("0e8d757f-1c80-40af-85de-31d64f1f5af8"); sdncNodeModel.setEcompGeneratedNaming("hello-world"); } @@ -48,7 +48,7 @@ public class SdncNodeModelTest { @Test public void testGetSqlString() { String result = sdncNodeModel.getSql("TEST-HELLO"); - String test = "INSERT into NETWORK_MODEL (service_uuid, customization_uuid, model_yaml, ecomp_generated_naming, network_type) values (0e8d757f-1c80-40af-85de-31d64f1f5af8, \"aaaa-bbbb-cccc-dddd\", \"TEST-HELLO\", \"hello-world\", \"test-network-type\");"; + String test = "INSERT into NETWORK_MODEL (service_uuid, customization_uuid, model_yaml, ecomp_generated_naming) values (0e8d757f-1c80-40af-85de-31d64f1f5af8, \"aaaa-bbbb-cccc-dddd\", \"TEST-HELLO\", \"hello-world\");"; assertEquals(test, result); } diff --git a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java index 5b4637ea7..2c44ba732 100644 --- a/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java +++ b/ueb-listener/src/test/java/org/onap/ccsdk/sli/northbound/uebclient/TestSdncUebCallback.java @@ -46,6 +46,23 @@ public class TestSdncUebCallback { " `naming_policy` varchar(255) DEFAULT NULL,\n" + " PRIMARY KEY (`service_uuid`)\n" + ") "; + + private static final String CRTBL_SERVICE_MODEL_TO_VF_MODEL_MAPPING = "CREATE TABLE `SERVICE_MODEL_TO_VF_MODEL_MAPPING` (\n" + + " `service_uuid` varchar(255) NOT NULL,\n" + + " `vf_uuid` varchar(255) DEFAULT NULL,\n" + + " `vf_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " `service_invariant_uuid` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`service_uuid`)\n" + + ") "; + + private static final String CRTBL_ATTRIBUTE_VALUE_PAIR = "CREATE TABLE `ATTRIBUTE_VALUE_PAIR` (\n" + + " `resource_uuid` varchar(255) NOT NULL,\n" + + " `attribute_name` varchar(255) NOT NULL,\n" + + " `resource_type` varchar(255) NOT NULL,\n" + + " `attribute_value` varchar(255) DEFAULT NULL,\n" + + " `resource_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`resource_uuid`,`attribute_name`,`resource_type`)\n" + + ") "; private static final String CRTBL_NETWORK_MODEL = "CREATE TABLE `NETWORK_MODEL` (\n" + " `customization_uuid` varchar(255) NOT NULL,\n" + @@ -118,6 +135,39 @@ public class TestSdncUebCallback { " PRIMARY KEY (`customization_uuid`)\n" + ") "; + private static final String CRTBL_VFC_RELATED_NETWORK_ROLE = "CREATE TABLE `VFC_RELATED_NETWORK_ROLE` (\n" + + " `vfc_customization_uuid` varchar(255) NOT NULL,\n" + + " `vm_type` varchar(255) NOT NULL,\n" + + " `network_role` varchar(255) NOT NULL,\n" + + " `related_network_role` varchar(255) NOT NULL,\n" + + " PRIMARY KEY (`vfc_customization_uuid`,`vm_type`,`network_role`,`related_network_role`)\n" + + ") "; + + private static final String CRTBL_VFC_TO_NETWORK_ROLE_MAPPING = "CREATE TABLE `VFC_TO_NETWORK_ROLE_MAPPING` (\n" + + " `seq` int(11) NOT NULL AUTO_INCREMENT,\n" + + " `vfc_customization_uuid` varchar(255) NOT NULL,\n" + + " `network_role` varchar(255) NOT NULL,\n" + + " `vm_type` varchar(255) DEFAULT NULL,\n" + + " `network_role_tag` varchar(255) DEFAULT NULL,\n" + + " `ipv4_count` int(11) NOT NULL,\n" + + " `ipv6_count` int(11) NOT NULL,\n" + + " `ipv4_use_dhcp` char(1) DEFAULT NULL,\n" + + " `ipv6_use_dhcp` char(1) DEFAULT NULL,\n" + + " `ipv4_ip_version` char(1) DEFAULT NULL,\n" + + " `ipv6_ip_version` char(1) DEFAULT NULL,\n" + + " `extcp_subnetpool_id` varchar(512) DEFAULT NULL,\n" + + " `ipv4_floating_count` int(11) DEFAULT NULL,\n" + + " `ipv6_floating_count` int(11) DEFAULT NULL,\n" + + " `ipv4_address_plan_name` varchar(512) DEFAULT NULL,\n" + + " `ipv6_address_plan_name` varchar(512) DEFAULT NULL,\n" + + " `ipv4_vrf_name` varchar(512) DEFAULT NULL,\n" + + " `ipv6_vrf_name` varchar(512) DEFAULT NULL,\n" + + " `subnet_role` varchar(255) DEFAULT NULL,\n" + + " `subinterface_indicator` char(1) DEFAULT NULL,\n" + + " PRIMARY KEY (`seq`),\n" + + " KEY `IX1_VFC_TO_NETWORK_ROLE_MAPPING` (`vfc_customization_uuid`)\n" + + ") "; + private static final String CRTBL_VF_MODEL = "CREATE TABLE `VF_MODEL` (\n" + " `customization_uuid` varchar(255) NOT NULL,\n" + " `model_yaml` longblob,\n" + @@ -137,6 +187,21 @@ public class TestSdncUebCallback { " PRIMARY KEY (`customization_uuid`)\n" + ")"; + private static final String CRTBL_VNF_RELATED_NETWORK_ROLE = "CREATE TABLE `VNF_RELATED_NETWORK_ROLE` (\n" + + " `vnf_customization_uuid` varchar(255) NOT NULL,\n" + + " `network_role` varchar(255) NOT NULL,\n" + + " `related_network_role` varchar(255) NOT NULL,\n" + + " PRIMARY KEY (`vnf_customization_uuid`,`network_role`,`related_network_role`)\n" + + ")"; + + private static final String CRTBL_VF_TO_NETWORK_ROLE_MAPPING = "CREATE TABLE `VF_TO_NETWORK_ROLE_MAPPING` (\n" + + " `seq` int(11) NOT NULL AUTO_INCREMENT,\n" + + " `vf_customization_uuid` varchar(255) NOT NULL,\n" + + " `network_role` varchar(255) NOT NULL,\n" + + " PRIMARY KEY (`seq`),\n" + + " KEY `IX1_VF_TO_NETWORK_ROLE_MAPPING` (`vf_customization_uuid`)\n" + + ")"; + private static final String CRTBL_VF_MODULE_MODEL = "CREATE TABLE `VF_MODULE_MODEL` (\n" + " `customization_uuid` varchar(255) NOT NULL,\n" + " `model_yaml` longblob,\n" + @@ -146,8 +211,82 @@ public class TestSdncUebCallback { " `vf_module_type` varchar(255) DEFAULT NULL,\n" + " `availability_zone_count` int(11) DEFAULT NULL,\n" + " `ecomp_generated_vm_assignments` char(1) DEFAULT NULL,\n" + + " `vf_customization_uuid` char(255) DEFAULT NULL,\n" + + " `vf_module_label` char(255) DEFAULT NULL,\n" + " PRIMARY KEY (`customization_uuid`)\n" + ")"; + + private static final String CRTBL_VF_MODULE_TO_VFC_MAPPING = "CREATE TABLE `VF_MODULE_TO_VFC_MAPPING` (\n" + + " `seq` int(11) NOT NULL AUTO_INCREMENT,\n" + + " `vf_module_customization_uuid` varchar(255) NOT NULL,\n" + + " `vfc_customization_uuid` varchar(255) NOT NULL,\n" + + " `vm_type` varchar(255) NOT NULL,\n" + + " `vm_count` int(11) NOT NULL,\n" + + " PRIMARY KEY (`seq`),\n" + + " KEY `IX1_VF_MODULE_TO_VFC_MAPPING` (`vf_module_customization_uuid`)\n" + + ")"; + + private static final String CRTBL_RESOURCE_GROUP = "CREATE TABLE `RESOURCE_GROUP` (\n" + + " `resource_uuid` varchar(255) NOT NULL,\n" + + " `group_uuid` varchar(255) NOT NULL,\n" + + " `group_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " `group_invariant_uuid` varchar(255) DEFAULT NULL,\n" + + " `group_name` varchar(255) DEFAULT NULL,\n" + + " `version` varchar(255) DEFAULT NULL,\n" + + " `group_type` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`resource_uuid`,`group_uuid`)\n" + + ")"; + + private static final String CRTBL_RESOURCE_GROUP_TO_TARGET_NODE_MAPPING = "CREATE TABLE `RESOURCE_GROUP_TO_TARGET_NODE_MAPPING` (\n" + + " `group_uuid` varchar(255) NOT NULL,\n" + + " `parent_uuid` varchar(255) NOT NULL,\n" + + " `target_node_uuid` varchar(255) NOT NULL,\n" + + " `target_type` varchar(255) DEFAULT NULL,\n" + + " `table_name` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`group_uuid`,`parent_uuid`,`target_node_uuid`)\n" + + ")"; + + private static final String CRTBL_RESOURCE_POLICY = "CREATE TABLE `RESOURCE_POLICY` (\n" + + " `resource_uuid` varchar(255) NOT NULL,\n" + + " `policy_uuid` varchar(255) NOT NULL,\n" + + " `policy_invariant_uuid` varchar(255) NOT NULL,\n" + + " `policy_name` varchar(255) DEFAULT NULL,\n" + + " `version` varchar(255) DEFAULT NULL,\n" + + " `policy_type` varchar(255) DEFAULT NULL,\n" + + " `property_type` varchar(255) DEFAULT NULL,\n" + + " `property_source` varchar(255) DEFAULT NULL,\n" + + " `property_name` varchar(255) DEFAULT NULL,\n" + + " `policy_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`resource_uuid`,`policy_uuid`)\n" + + ")"; + + private static final String CRTBL_RESOURCE_POLICY_TO_TARGET_NODE_MAPPING = "CREATE TABLE `RESOURCE_POLICY_TO_TARGET_NODE_MAPPING` (\n" + + " `policy_uuid` varchar(255) NOT NULL,\n" + + " `parent_uuid` varchar(255) NOT NULL,\n" + + " `target_node_uuid` varchar(255) NOT NULL,\n" + + " `target_type` varchar(255) DEFAULT NULL,\n" + + " `target_node_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " `policy_customization_uuid` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`policy_uuid`,`parent_uuid`,`target_node_uuid`)\n" + + ")"; + + private static final String CRTBL_NODE_CAPABILITY = "CREATE TABLE `NODE_CAPABILITY` (\n" + + " `capability_id` int(11) NOT NULL AUTO_INCREMENT,\n" + + " `capability_provider_uuid` varchar(255) NOT NULL,\n" + + " `capability_provider_customization_uuid` varchar(255) NOT NULL,\n" + + " `capability_name` varchar(255) DEFAULT NULL,\n" + + " `capability_type` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`capability_id`)\n" + + ")"; + + private static final String CRTBL_NODE_CAPABILITY_PROPERTY = "CREATE TABLE `NODE_CAPABILITY_PROPERTY` (\n" + + " `capability_id` int(11) NOT NULL AUTO_INCREMENT,\n" + + " `capability_property_name` varchar(255) NOT NULL,\n" + + " `capability_property_type` varchar(255) DEFAULT NULL,\n" + + " PRIMARY KEY (`capability_id`,`capability_property_name`),\n" + + " CONSTRAINT `NODE_CAPABILITY_PROPERTY_TO_NODE_CAPABILITY` FOREIGN KEY (`capability_id`) REFERENCES `NODE_CAPABILITY` (`capability_id`) ON DELETE CASCADE\n" + + ")"; + private static final Logger LOG = LoggerFactory .getLogger(TestSdncUebCallback.class); @@ -195,11 +334,24 @@ public class TestSdncUebCallback { // Create TOSCA tables dblibSvc.writeData(CRTBL_SERVICE_MODEL, null, null); + dblibSvc.writeData(CRTBL_SERVICE_MODEL_TO_VF_MODEL_MAPPING, null, null); + dblibSvc.writeData(CRTBL_ATTRIBUTE_VALUE_PAIR, null, null); dblibSvc.writeData(CRTBL_NETWORK_MODEL, null, null); dblibSvc.writeData(CRTBL_VFC_MODEL, null, null); + dblibSvc.writeData(CRTBL_VFC_RELATED_NETWORK_ROLE, null, null); + dblibSvc.writeData(CRTBL_VFC_TO_NETWORK_ROLE_MAPPING, null, null); dblibSvc.writeData(CRTBL_VF_MODEL, null, null); + dblibSvc.writeData(CRTBL_VNF_RELATED_NETWORK_ROLE, null, null); + dblibSvc.writeData(CRTBL_VF_TO_NETWORK_ROLE_MAPPING, null, null); dblibSvc.writeData(CRTBL_VF_MODULE_MODEL, null, null); + dblibSvc.writeData(CRTBL_VF_MODULE_TO_VFC_MAPPING, null, null); dblibSvc.writeData(CRTBL_ALLOTTED_RESOURCE_MODEL, null, null); + dblibSvc.writeData(CRTBL_RESOURCE_GROUP, null, null); + dblibSvc.writeData(CRTBL_RESOURCE_GROUP_TO_TARGET_NODE_MAPPING, null, null); + dblibSvc.writeData(CRTBL_RESOURCE_POLICY, null, null); + dblibSvc.writeData(CRTBL_RESOURCE_POLICY_TO_TARGET_NODE_MAPPING, null, null); + dblibSvc.writeData(CRTBL_NODE_CAPABILITY, null, null); + dblibSvc.writeData(CRTBL_NODE_CAPABILITY_PROPERTY, null, null); processLevelArtifactList = new ArrayList<>(); serviceLevelArtifactList = new ArrayList<>(); diff --git a/ueb-listener/src/test/resources/ueb-listener.properties b/ueb-listener/src/test/resources/ueb-listener.properties index 35c380595..c017cbd7b 100755 --- a/ueb-listener/src/test/resources/ueb-listener.properties +++ b/ueb-listener/src/test/resources/ueb-listener.properties @@ -14,8 +14,9 @@ org.onap.ccsdk.sli.northbound.uebclient.polling-interval=30 org.onap.ccsdk.sli.northbound.uebclient.polling-timeout=15 org.onap.ccsdk.sli.northbound.uebclient.client-startup-timeout=60 org.onap.ccsdk.sli.northbound.uebclient.relevant-artifact-types=YANG_XML,VF_LICENSE,TOSCA_TEMPLATE,TOSCA_CSAR,UCPE_LAYER_2_CONFIGURATION +org.onap.ccsdk.sli.northbound.uebclient.relevant-capability-names=RoutingConfiguration,routing_configuration,VLANAssignment,vlan_assignment org.onap.ccsdk.sli.northbound.uebclient.activate-server-tls-auth=false org.onap.ccsdk.sli.northbound.uebclient.keystore-path= org.onap.ccsdk.sli.northbound.uebclient.keystore-password= org.onap.ccsdk.sli.northbound.uebclient.xslt-path-list= -org.onap.ccsdk.sli.northbound.uebclient.artifact-map=src/test/resources/artifact.map \ No newline at end of file +org.onap.ccsdk.sli.northbound.uebclient.artifact-map=src/test/resources/artifact.map diff --git a/version.properties b/version.properties index 71ba554ca..74fd99918 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=5 -feature_revision=1 +feature_revision=2 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 5e2c493f9856c2d8cc966ca9a89506f57f00930f Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 9 Jul 2019 13:36:38 -0400 Subject: Code changes for Neon Updated code via ccsdk/parent/tools/fluorine2neon.sh script. Change-Id: Ie19b69db481318afa9224d4673f27e74bfc65a81 Issue-ID: CCSDK-1389 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 +-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 +-- asdcApi/features/features-asdcApi/pom.xml | 4 +-- asdcApi/features/pom.xml | 4 +-- asdcApi/installer/pom.xml | 4 +-- asdcApi/model/pom.xml | 14 ++++----- asdcApi/pom.xml | 4 +-- asdcApi/provider/pom.xml | 4 +-- .../OSGI-INF/blueprint/asdc-blueprint.xml | 32 ++++++++++++++++++++ .../features/ccsdk-daexim-offsite-backup/pom.xml | 4 +-- .../features-daexim-offsite-backup/pom.xml | 4 +-- daexim-offsite-backup/features/pom.xml | 4 +-- daexim-offsite-backup/installer/pom.xml | 4 +-- daexim-offsite-backup/model/pom.xml | 14 ++++----- daexim-offsite-backup/pom.xml | 4 +-- daexim-offsite-backup/provider/pom.xml | 4 +-- .../OSGI-INF/blueprint/DaeximOffsiteBackup.xml | 20 +++++++++++++ dataChange/features/ccsdk-dataChange/pom.xml | 4 +-- dataChange/features/features-dataChange/pom.xml | 4 +-- dataChange/features/pom.xml | 4 +-- dataChange/installer/pom.xml | 4 +-- dataChange/model/pom.xml | 14 ++++----- dataChange/pom.xml | 4 +-- dataChange/provider/pom.xml | 4 +-- .../OSGI-INF/blueprint/datachange-blueprint.xml | 32 ++++++++++++++++++++ dmaap-listener/pom.xml | 6 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 +-- features/features-sli-northbound/pom.xml | 4 +-- features/installer/pom.xml | 4 +-- features/pom.xml | 4 +-- lcm/features/ccsdk-lcm/pom.xml | 4 +-- lcm/features/features-lcm/pom.xml | 4 +-- lcm/features/pom.xml | 4 +-- lcm/installer/pom.xml | 4 +-- lcm/model/pom.xml | 14 ++++----- lcm/pom.xml | 4 +-- lcm/provider/pom.xml | 4 +-- .../resources/OSGI-INF/blueprint/lcm-blueprint.xml | 34 ++++++++++++++++++++++ pom.xml | 4 +-- ueb-listener/pom.xml | 6 ++-- version.properties | 4 +-- 41 files changed, 210 insertions(+), 100 deletions(-) create mode 100644 asdcApi/provider/src/main/resources/OSGI-INF/blueprint/asdc-blueprint.xml create mode 100755 daexim-offsite-backup/provider/src/main/resources/OSGI-INF/blueprint/DaeximOffsiteBackup.xml create mode 100644 dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml create mode 100644 lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 42eeb71f6..b9f354ba8 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index be3dee2b5..7210cc270 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 2917abd74..3a09e3efb 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 6f6ac13f6..7a03ab51b 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 33af1bd52..b2d77b6ee 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index a5bb371c6..d5e835615 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -23,13 +23,11 @@ - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 + org.opendaylight.mdsal.binding.model.ietf + rfc6991 + + diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index d00afcb41..0fcc15370 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 34f65285f..071af8d8d 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/provider/src/main/resources/OSGI-INF/blueprint/asdc-blueprint.xml b/asdcApi/provider/src/main/resources/OSGI-INF/blueprint/asdc-blueprint.xml new file mode 100644 index 000000000..9ad08d3db --- /dev/null +++ b/asdcApi/provider/src/main/resources/OSGI-INF/blueprint/asdc-blueprint.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index d54eb208a..98b6de9fb 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 632cad587..604d9173a 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index d23a039c1..86c49397e 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index d58467bb0..a3abfcf1d 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index e0702fee5..58097f9a5 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,24 +4,22 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 + org.opendaylight.mdsal.binding.model.ietf + rfc6991 + + diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 34e4e1953..40601e600 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 49bd6e7ec..4cedda69f 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle diff --git a/daexim-offsite-backup/provider/src/main/resources/OSGI-INF/blueprint/DaeximOffsiteBackup.xml b/daexim-offsite-backup/provider/src/main/resources/OSGI-INF/blueprint/DaeximOffsiteBackup.xml new file mode 100755 index 000000000..8e2101ad3 --- /dev/null +++ b/daexim-offsite-backup/provider/src/main/resources/OSGI-INF/blueprint/DaeximOffsiteBackup.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 635cbe5f7..8f9e1b647 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 5a50ef10a..4d36c4a38 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index d4fab812c..be06b9914 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index d3e7cb2b4..25511b3d9 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 57a8a8774..5586e4ad5 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -22,13 +22,11 @@ - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 + org.opendaylight.mdsal.binding.model.ietf + rfc6991 + + diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 1419661b2..6a3d3ea0f 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 204e9158a..121328389 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml b/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml new file mode 100644 index 000000000..5a38c81f1 --- /dev/null +++ b/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index d07f8111d..d010de56b 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - ${project.version} + 0.5.1-SNAPSHOT ${project.version} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index c5c1b914c..1df648428 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index fce265bbe..c98c303d7 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 46bdfdf3f..796eadd74 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 486ff093c..01d543294 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index cd80fb34d..0528e6e5b 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index cb7126187..68e2150ef 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index b59d2b92c..f5b49230c 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 3966c9d2f..fb3123df4 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 6f41820c3..e27875081 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -23,13 +23,11 @@ - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 + org.opendaylight.mdsal.binding.model.ietf + rfc6991 + + diff --git a/lcm/pom.xml b/lcm/pom.xml index 455beb899..d2299d154 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index def00a9b3..7eba7c9b7 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml b/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml new file mode 100644 index 000000000..5597d0801 --- /dev/null +++ b/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 76ad8082c..047eaf45e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 63b849ec6..d0cc96518 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - ${project.version} + 0.5.1-SNAPSHOT ${project.version} diff --git a/version.properties b/version.properties index 74fd99918..54c44bc24 100644 --- a/version.properties +++ b/version.properties @@ -4,8 +4,8 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=0 -sprint_number=5 -feature_revision=2 +sprint_number=6 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 4852d3577447aa8790b63442b6d5c48412e2eb21 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Mon, 19 Aug 2019 21:40:44 -0500 Subject: Bug fix to address DMAAPLISTENERROOT Modified rootDir to /opt/onap/sdnc/...where map and vt template files are transferred in the docker Issue-ID: CCSDK-1400 Signed-off-by: SandeepLinux Change-Id: Ie634ff60cf439be5f5136275f2ea19abf40949de --- .../onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java index 9d78e8acf..e8dacb959 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java @@ -83,7 +83,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { rootDir = System.getenv(DMAAPLISTENERROOT); if ((rootDir == null) || (rootDir.length() == 0)) { - rootDir = "/opt/app/dmaap-listener/lib/"; + rootDir = "/opt/onap/sdnc/dmaap-listener/lib/"; } else { rootDir = rootDir + "/lib/"; -- cgit 1.2.3-korg From 7b76725b56304435b01c5b97c3424da0605119ee Mon Sep 17 00:00:00 2001 From: Matej Perina Date: Wed, 3 Apr 2019 14:38:29 +0200 Subject: Proposal to remove OSGi dependencies from the CCSDK project Dependencies on the OSGi frameworks and libraries are removed by integrating the CCSDK project with the lighty.io. It's a toolkit that allows to use ODL services (in this case core services and the Restconf) without the dependency on the Karaf framework and the Blueprint DI. In this change are created the lighty.io modules which initialize and expose same services as the Blueprint DI in the blueprint.xml files. More info about the lighty.io - https://lighty.io Change-Id: Ieb512990e191bbb5a9403f05cdce0b79640ce474 Signed-off-by: Matej Perina Signed-off-by: Samuel Kontris --- asdcApi/lighty/pom.xml | 47 ++++++++ .../northbound/asdcapi/lighty/AsdcApiModule.java | 61 +++++++++++ asdcApi/pom.xml | 1 + ccsdk-northbound-lighty/pom.xml | 39 +++++++ .../lighty/CcsdkNorhboundLightyModule.java | 119 +++++++++++++++++++++ dataChange/lighty/pom.xml | 47 ++++++++ .../dataChange/lighty/DataChangeModule.java | 62 +++++++++++ dataChange/pom.xml | 1 + dmaap-listener/pom.xml | 2 +- lcm/lighty/pom.xml | 47 ++++++++ .../ccsdk/sli/northbound/lcm/lighty/LcmModule.java | 64 +++++++++++ lcm/pom.xml | 1 + pom.xml | 1 + ueb-listener/pom.xml | 2 +- 14 files changed, 492 insertions(+), 2 deletions(-) create mode 100755 asdcApi/lighty/pom.xml create mode 100644 asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java create mode 100755 ccsdk-northbound-lighty/pom.xml create mode 100644 ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java create mode 100755 dataChange/lighty/pom.xml create mode 100644 dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java create mode 100755 lcm/lighty/pom.xml create mode 100644 lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java (limited to 'dmaap-listener') diff --git a/asdcApi/lighty/pom.xml b/asdcApi/lighty/pom.xml new file mode 100755 index 000000000..4bc9fd305 --- /dev/null +++ b/asdcApi/lighty/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 1.4.0-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + asdcApi-lighty + 0.6.0-SNAPSHOT + jar + + ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + http://maven.apache.org + + + UTF-8 + + + + + + org.onap.ccsdk.sli.core + ccsdk-lighty-dependency-versions + ${project.version} + pom + import + + + + + + + io.lighty.core + lighty-controller + + + org.onap.ccsdk.sli.northbound + asdcApi-provider + ${project.version} + + + diff --git a/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java b/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java new file mode 100644 index 000000000..2895e17e4 --- /dev/null +++ b/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * Copyright (c) 2019 PANTHEON.tech s.r.o. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * + */ +package org.onap.ccsdk.sli.northbound.asdcapi.lighty; + +import io.lighty.core.controller.api.AbstractLightyModule; +import io.lighty.core.controller.api.LightyModule; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiProvider; +import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiSliClient; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; + +/** + * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from + * the asdcApi-provicer artifact. + */ +public class AsdcApiModule extends AbstractLightyModule implements LightyModule { + + private final SvcLogicService svcLogicService; + private final DataBroker dataBroker; + private final NotificationPublishService publishService; + private final RpcProviderRegistry rpcRegistry; + private AsdcApiSliClient asdcApiClient; + private AsdcApiProvider asdcApiProvider; + + public AsdcApiModule(SvcLogicService svcLogicService, DataBroker dataBroker, + NotificationPublishService publishService, RpcProviderRegistry rpcRegistry) { + this.svcLogicService = svcLogicService; + this.dataBroker = dataBroker; + this.publishService = publishService; + this.rpcRegistry = rpcRegistry; + } + + @Override + protected boolean initProcedure() { + this.asdcApiClient = new AsdcApiSliClient(svcLogicService); + this.asdcApiProvider = new AsdcApiProvider(dataBroker, publishService, rpcRegistry, asdcApiClient); + return true; + } + + @Override + protected boolean stopProcedure() { + return true; + } + +} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 0fcc15370..bf28c44ea 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -25,6 +25,7 @@ features provider installer + lighty diff --git a/ccsdk-northbound-lighty/pom.xml b/ccsdk-northbound-lighty/pom.xml new file mode 100755 index 000000000..a75f235aa --- /dev/null +++ b/ccsdk-northbound-lighty/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.4.0-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + ccsdk-northbound-lighty + 0.6.0-SNAPSHOT + jar + + + + org.onap.ccsdk.sli.core + ccsdk-core-lighty + ${project.version} + + + org.onap.ccsdk.sli.northbound + asdcApi-lighty + ${project.version} + + + org.onap.ccsdk.sli.northbound + dataChange-lighty + ${project.version} + + + org.onap.ccsdk.sli.northbound + lcm-lighty + ${project.version} + + + diff --git a/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java b/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java new file mode 100644 index 000000000..ce907bd95 --- /dev/null +++ b/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java @@ -0,0 +1,119 @@ +/* + * ============LICENSE_START========================================== + * Copyright (c) 2019 PANTHEON.tech s.r.o. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * + */ +package org.onap.ccsdk.sli.northbound.lighty; + +import io.lighty.core.controller.api.AbstractLightyModule; +import org.onap.ccsdk.sli.core.lighty.common.CcsdkLightyUtils; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.onap.ccsdk.sli.northbound.asdcapi.lighty.AsdcApiModule; +import org.onap.ccsdk.sli.northbound.dataChange.lighty.DataChangeModule; +import org.onap.ccsdk.sli.northbound.lcm.lighty.LcmModule; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that groups all other LightyModules + * from the ccsdk-sli-northbound repository so they can be all treated as one component (for example started/stopped at once). + * For more information about the lighty.io visit the website https://lighty.io. + */ +public class CcsdkNorhboundLightyModule extends AbstractLightyModule { + + private static final Logger LOG = LoggerFactory.getLogger(CcsdkNorhboundLightyModule.class); + + private final SvcLogicService svcLogicService; + private final DataBroker dataBroker; + private final NotificationPublishService publishService; + private final RpcProviderRegistry rpcProviderRegistry; + + private AsdcApiModule asdcApiModule; + private DataChangeModule dataChangeModule; + private LcmModule lcmModule; + + public CcsdkNorhboundLightyModule(SvcLogicService svcLogicService, DataBroker dataBroker, + NotificationPublishService publishService, RpcProviderRegistry rpcProviderRegistry) { + + this.svcLogicService = svcLogicService; + this.dataBroker = dataBroker; + this.publishService = publishService; + this.rpcProviderRegistry = rpcProviderRegistry; + } + + protected boolean initProcedure() { + LOG.debug("Initializing CCSDK Northbound Lighty module..."); + + this.asdcApiModule = new AsdcApiModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); + if (!CcsdkLightyUtils.startLightyModule(asdcApiModule)) { + LOG.error("Unable to start AsdcApiModule in CCSDK Northbound Lighty module!"); + return false; + } + + this.dataChangeModule = new DataChangeModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); + if (!CcsdkLightyUtils.startLightyModule(dataChangeModule)) { + LOG.error("Unable to start DataChangeModule in CCSDK Northbound Lighty module!"); + return false; + } + + this.lcmModule = new LcmModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); + if (!CcsdkLightyUtils.startLightyModule(lcmModule)) { + LOG.error("Unable to start LcmModule in CCSDK Northbound Lighty module!"); + return false; + } + + LOG.debug("CCSDK Northbound Lighty module was initialized successfully"); + return true; + } + + protected boolean stopProcedure() { + LOG.debug("Stopping CCSDK Northbound Lighty module..."); + + boolean stopSuccessful = true; + + if (!CcsdkLightyUtils.stopLightyModule(lcmModule)) { + stopSuccessful = false; + } + + if (!CcsdkLightyUtils.stopLightyModule(dataChangeModule)) { + stopSuccessful = false; + } + + if (!CcsdkLightyUtils.stopLightyModule(asdcApiModule)) { + stopSuccessful = false; + } + + if (stopSuccessful) { + LOG.debug("CCSDK Northbound Lighty module was stopped successfully"); + } else { + LOG.error("CCSDK Northbound Lighty module was not stopped successfully!"); + } + return stopSuccessful; + } + + public AsdcApiModule getAsdcApiModule() { + return asdcApiModule; + } + + public DataChangeModule getDataChangeModule() { + return dataChangeModule; + } + + public LcmModule getLcmModule() { + return lcmModule; + } +} diff --git a/dataChange/lighty/pom.xml b/dataChange/lighty/pom.xml new file mode 100755 index 000000000..91f1c96ac --- /dev/null +++ b/dataChange/lighty/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 1.4.0-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + dataChange-lighty + 0.6.0-SNAPSHOT + jar + + ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + http://maven.apache.org + + + UTF-8 + + + + + + org.onap.ccsdk.sli.core + ccsdk-lighty-dependency-versions + ${project.version} + pom + import + + + + + + + io.lighty.core + lighty-controller + + + org.onap.ccsdk.sli.northbound + dataChange-provider + ${project.version} + + + diff --git a/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java b/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java new file mode 100644 index 000000000..412d46657 --- /dev/null +++ b/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * Copyright (c) 2019 PANTHEON.tech s.r.o. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * + */ +package org.onap.ccsdk.sli.northbound.dataChange.lighty; + +import io.lighty.core.controller.api.AbstractLightyModule; +import io.lighty.core.controller.api.LightyModule; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.onap.ccsdk.sli.northbound.DataChangeClient; +import org.onap.ccsdk.sli.northbound.DataChangeProvider; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; + +/** + * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from + * the dataChange-provider artifact. + */ +public class DataChangeModule extends AbstractLightyModule implements LightyModule { + + private final SvcLogicService svcLogicService; + private final DataBroker dataBroker; + private final NotificationPublishService publishService; + private final RpcProviderRegistry rpcRegistry; + + private DataChangeClient dataChangeClient; + private DataChangeProvider dataChangeProvider; + + public DataChangeModule(SvcLogicService svcLogicService, DataBroker dataBroker, + NotificationPublishService publishService, RpcProviderRegistry rpcRegistry) { + this.svcLogicService = svcLogicService; + this.dataBroker = dataBroker; + this.publishService = publishService; + this.rpcRegistry = rpcRegistry; + } + + @Override + protected boolean initProcedure() { + this.dataChangeClient = new DataChangeClient(svcLogicService); + this.dataChangeProvider = new DataChangeProvider(dataBroker, publishService, rpcRegistry, dataChangeClient); + return true; + } + + @Override + protected boolean stopProcedure() { + return true; + } + +} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 6a3d3ea0f..7588c79cd 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -21,6 +21,7 @@ features provider installer + lighty diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index d010de56b..e111bb8c7 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - 0.5.1-SNAPSHOT + 0.6.0-SNAPSHOT ${project.version} diff --git a/lcm/lighty/pom.xml b/lcm/lighty/pom.xml new file mode 100755 index 000000000..90c073233 --- /dev/null +++ b/lcm/lighty/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 1.4.0-SNAPSHOT + + + + org.onap.ccsdk.sli.northbound + lcm-lighty + 0.6.0-SNAPSHOT + jar + + ccsdk-sli-northbound :: lcm :: ${project.artifactId} + http://maven.apache.org + + + UTF-8 + + + + + + org.onap.ccsdk.sli.core + ccsdk-lighty-dependency-versions + ${project.version} + pom + import + + + + + + + io.lighty.core + lighty-controller + + + org.onap.ccsdk.sli.northbound + lcm-provider + ${project.version} + + + diff --git a/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java b/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java new file mode 100644 index 000000000..cbbf9fb2e --- /dev/null +++ b/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * Copyright (c) 2019 PANTHEON.tech s.r.o. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * + */ +package org.onap.ccsdk.sli.northbound.lcm.lighty; + +import io.lighty.core.controller.api.AbstractLightyModule; +import io.lighty.core.controller.api.LightyModule; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.onap.ccsdk.sli.northbound.LcmProvider; +import org.onap.ccsdk.sli.northbound.LcmSliClient; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; + +/** + * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from + * the lcm-provider artifact. + */ +public class LcmModule extends AbstractLightyModule implements LightyModule { + + private final SvcLogicService svcLogicService; + private final DataBroker dataBroker; + private final NotificationPublishService publishService; + private final RpcProviderRegistry rpcRegistry; + + private LcmSliClient lcmSliClient; + private LcmProvider lcmProvider; + + public LcmModule(final SvcLogicService svcLogicService, + final DataBroker dataBroker, + final NotificationPublishService publishService, + final RpcProviderRegistry rpcRegistry) { + this.svcLogicService = svcLogicService; + this.dataBroker = dataBroker; + this.publishService = publishService; + this.rpcRegistry = rpcRegistry; + } + + @Override + protected boolean initProcedure() { + this.lcmSliClient = new LcmSliClient(svcLogicService); + this.lcmProvider = new LcmProvider(dataBroker, publishService, rpcRegistry, lcmSliClient); + return true; + } + + @Override + protected boolean stopProcedure() { + return true; + } + +} diff --git a/lcm/pom.xml b/lcm/pom.xml index d2299d154..3baeb96b6 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -21,6 +21,7 @@ features provider installer + lighty diff --git a/pom.xml b/pom.xml index 047eaf45e..04f681ac8 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ daexim-offsite-backup features artifacts + ccsdk-northbound-lighty ONAP diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index d0cc96518..f9c5474d1 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - 0.5.1-SNAPSHOT + 0.6.0-SNAPSHOT ${project.version} -- cgit 1.2.3-korg From b9de9b7836dc88ca6cf746b1199014850b04e853 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 28 Aug 2019 13:15:08 -0400 Subject: Roll versions Roll versions in master branch Change-Id: Idd6c405684fee6eaa860286359493c667a1bf50f Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/lighty/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- ccsdk-northbound-lighty/pom.xml | 4 ++-- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/lighty/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/lighty/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 41 files changed, 81 insertions(+), 81 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index b9f354ba8..b047d23c1 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 7210cc270..b112574c9 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 3a09e3efb..9927bce43 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 7a03ab51b..e1d4bf261 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index b2d77b6ee..5192bfa3f 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/lighty/pom.xml b/asdcApi/lighty/pom.xml index 4bc9fd305..5bfbf2bf2 100755 --- a/asdcApi/lighty/pom.xml +++ b/asdcApi/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index d5e835615..e0f70a34e 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index bf28c44ea..e6e6af694 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 071af8d8d..951368777 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/ccsdk-northbound-lighty/pom.xml b/ccsdk-northbound-lighty/pom.xml index a75f235aa..dd3921dc6 100755 --- a/ccsdk-northbound-lighty/pom.xml +++ b/ccsdk-northbound-lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-northbound-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 98b6de9fb..8754d11f6 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 604d9173a..e3df29494 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 86c49397e..1fcf9c486 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index a3abfcf1d..69216cbbe 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 58097f9a5..19346c001 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 40601e600..6a0e90db8 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 4cedda69f..d813b9082 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 8f9e1b647..97bd9a127 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 4d36c4a38..c47cecffd 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index be06b9914..aa5756437 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 25511b3d9..822e4016b 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/lighty/pom.xml b/dataChange/lighty/pom.xml index 91f1c96ac..28ff8ed87 100755 --- a/dataChange/lighty/pom.xml +++ b/dataChange/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 5586e4ad5..123f1a0da 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 7588c79cd..fed24d7bd 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 121328389..1f94f774c 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index e111bb8c7..2b3914a96 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 1df648428..78e1ee8ca 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index c98c303d7..cd6359cb9 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 796eadd74..327c59c5f 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 01d543294..6bfc1a1f2 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 0528e6e5b..380065bc6 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 68e2150ef..06ea67d23 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index f5b49230c..21ab47fd5 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index fb3123df4..c562038af 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/lighty/pom.xml b/lcm/lighty/pom.xml index 90c073233..53c88dd24 100755 --- a/lcm/lighty/pom.xml +++ b/lcm/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index e27875081..234cb6606 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 3baeb96b6..3316f3adf 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 7eba7c9b7..ebf1e7b0a 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 04f681ac8..9b3cc39c1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT 4.0.0 @@ -105,7 +105,7 @@ ONAP - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index f9c5474d1..f6a802f14 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 54c44bc24..54d8edb35 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=6 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 6a146258879e64344b5837dfa6dee566edba4dda Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 29 Aug 2019 11:16:02 -0400 Subject: Revert "Proposal to remove OSGi dependencies from the CCSDK project" This reverts commit 7b76725b56304435b01c5b97c3424da0605119ee. This must be reverted due to lack of jUnit test cases. Change-Id: I0a9116e3ed95553505cd7517f8f3aca53d0c9c5d Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/lighty/pom.xml | 47 -------- .../northbound/asdcapi/lighty/AsdcApiModule.java | 61 ----------- asdcApi/pom.xml | 1 - ccsdk-northbound-lighty/pom.xml | 39 ------- .../lighty/CcsdkNorhboundLightyModule.java | 119 --------------------- dataChange/lighty/pom.xml | 47 -------- .../dataChange/lighty/DataChangeModule.java | 62 ----------- dataChange/pom.xml | 1 - dmaap-listener/pom.xml | 2 +- lcm/lighty/pom.xml | 47 -------- .../ccsdk/sli/northbound/lcm/lighty/LcmModule.java | 64 ----------- lcm/pom.xml | 1 - pom.xml | 1 - ueb-listener/pom.xml | 2 +- 14 files changed, 2 insertions(+), 492 deletions(-) delete mode 100755 asdcApi/lighty/pom.xml delete mode 100644 asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java delete mode 100755 ccsdk-northbound-lighty/pom.xml delete mode 100644 ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java delete mode 100755 dataChange/lighty/pom.xml delete mode 100644 dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java delete mode 100755 lcm/lighty/pom.xml delete mode 100644 lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java (limited to 'dmaap-listener') diff --git a/asdcApi/lighty/pom.xml b/asdcApi/lighty/pom.xml deleted file mode 100755 index 5bfbf2bf2..000000000 --- a/asdcApi/lighty/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 1.4.1-SNAPSHOT - - - - org.onap.ccsdk.sli.northbound - asdcApi-lighty - 0.6.1-SNAPSHOT - jar - - ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - - - - - - org.onap.ccsdk.sli.core - ccsdk-lighty-dependency-versions - ${project.version} - pom - import - - - - - - - io.lighty.core - lighty-controller - - - org.onap.ccsdk.sli.northbound - asdcApi-provider - ${project.version} - - - diff --git a/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java b/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java deleted file mode 100644 index 2895e17e4..000000000 --- a/asdcApi/lighty/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/lighty/AsdcApiModule.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * ============LICENSE_START========================================== - * Copyright (c) 2019 PANTHEON.tech s.r.o. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - * - */ -package org.onap.ccsdk.sli.northbound.asdcapi.lighty; - -import io.lighty.core.controller.api.AbstractLightyModule; -import io.lighty.core.controller.api.LightyModule; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiProvider; -import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiSliClient; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; - -/** - * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from - * the asdcApi-provicer artifact. - */ -public class AsdcApiModule extends AbstractLightyModule implements LightyModule { - - private final SvcLogicService svcLogicService; - private final DataBroker dataBroker; - private final NotificationPublishService publishService; - private final RpcProviderRegistry rpcRegistry; - private AsdcApiSliClient asdcApiClient; - private AsdcApiProvider asdcApiProvider; - - public AsdcApiModule(SvcLogicService svcLogicService, DataBroker dataBroker, - NotificationPublishService publishService, RpcProviderRegistry rpcRegistry) { - this.svcLogicService = svcLogicService; - this.dataBroker = dataBroker; - this.publishService = publishService; - this.rpcRegistry = rpcRegistry; - } - - @Override - protected boolean initProcedure() { - this.asdcApiClient = new AsdcApiSliClient(svcLogicService); - this.asdcApiProvider = new AsdcApiProvider(dataBroker, publishService, rpcRegistry, asdcApiClient); - return true; - } - - @Override - protected boolean stopProcedure() { - return true; - } - -} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index e6e6af694..4f2b816f4 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -25,7 +25,6 @@ features provider installer - lighty diff --git a/ccsdk-northbound-lighty/pom.xml b/ccsdk-northbound-lighty/pom.xml deleted file mode 100755 index dd3921dc6..000000000 --- a/ccsdk-northbound-lighty/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - odlparent-lite - 1.4.1-SNAPSHOT - - - - org.onap.ccsdk.sli.northbound - ccsdk-northbound-lighty - 0.6.1-SNAPSHOT - jar - - - - org.onap.ccsdk.sli.core - ccsdk-core-lighty - ${project.version} - - - org.onap.ccsdk.sli.northbound - asdcApi-lighty - ${project.version} - - - org.onap.ccsdk.sli.northbound - dataChange-lighty - ${project.version} - - - org.onap.ccsdk.sli.northbound - lcm-lighty - ${project.version} - - - diff --git a/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java b/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java deleted file mode 100644 index ce907bd95..000000000 --- a/ccsdk-northbound-lighty/src/main/java/org/onap/ccsdk/sli/northbound/lighty/CcsdkNorhboundLightyModule.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * ============LICENSE_START========================================== - * Copyright (c) 2019 PANTHEON.tech s.r.o. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - * - */ -package org.onap.ccsdk.sli.northbound.lighty; - -import io.lighty.core.controller.api.AbstractLightyModule; -import org.onap.ccsdk.sli.core.lighty.common.CcsdkLightyUtils; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.onap.ccsdk.sli.northbound.asdcapi.lighty.AsdcApiModule; -import org.onap.ccsdk.sli.northbound.dataChange.lighty.DataChangeModule; -import org.onap.ccsdk.sli.northbound.lcm.lighty.LcmModule; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that groups all other LightyModules - * from the ccsdk-sli-northbound repository so they can be all treated as one component (for example started/stopped at once). - * For more information about the lighty.io visit the website https://lighty.io. - */ -public class CcsdkNorhboundLightyModule extends AbstractLightyModule { - - private static final Logger LOG = LoggerFactory.getLogger(CcsdkNorhboundLightyModule.class); - - private final SvcLogicService svcLogicService; - private final DataBroker dataBroker; - private final NotificationPublishService publishService; - private final RpcProviderRegistry rpcProviderRegistry; - - private AsdcApiModule asdcApiModule; - private DataChangeModule dataChangeModule; - private LcmModule lcmModule; - - public CcsdkNorhboundLightyModule(SvcLogicService svcLogicService, DataBroker dataBroker, - NotificationPublishService publishService, RpcProviderRegistry rpcProviderRegistry) { - - this.svcLogicService = svcLogicService; - this.dataBroker = dataBroker; - this.publishService = publishService; - this.rpcProviderRegistry = rpcProviderRegistry; - } - - protected boolean initProcedure() { - LOG.debug("Initializing CCSDK Northbound Lighty module..."); - - this.asdcApiModule = new AsdcApiModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); - if (!CcsdkLightyUtils.startLightyModule(asdcApiModule)) { - LOG.error("Unable to start AsdcApiModule in CCSDK Northbound Lighty module!"); - return false; - } - - this.dataChangeModule = new DataChangeModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); - if (!CcsdkLightyUtils.startLightyModule(dataChangeModule)) { - LOG.error("Unable to start DataChangeModule in CCSDK Northbound Lighty module!"); - return false; - } - - this.lcmModule = new LcmModule(svcLogicService, dataBroker, publishService, rpcProviderRegistry); - if (!CcsdkLightyUtils.startLightyModule(lcmModule)) { - LOG.error("Unable to start LcmModule in CCSDK Northbound Lighty module!"); - return false; - } - - LOG.debug("CCSDK Northbound Lighty module was initialized successfully"); - return true; - } - - protected boolean stopProcedure() { - LOG.debug("Stopping CCSDK Northbound Lighty module..."); - - boolean stopSuccessful = true; - - if (!CcsdkLightyUtils.stopLightyModule(lcmModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(dataChangeModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(asdcApiModule)) { - stopSuccessful = false; - } - - if (stopSuccessful) { - LOG.debug("CCSDK Northbound Lighty module was stopped successfully"); - } else { - LOG.error("CCSDK Northbound Lighty module was not stopped successfully!"); - } - return stopSuccessful; - } - - public AsdcApiModule getAsdcApiModule() { - return asdcApiModule; - } - - public DataChangeModule getDataChangeModule() { - return dataChangeModule; - } - - public LcmModule getLcmModule() { - return lcmModule; - } -} diff --git a/dataChange/lighty/pom.xml b/dataChange/lighty/pom.xml deleted file mode 100755 index 28ff8ed87..000000000 --- a/dataChange/lighty/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 1.4.1-SNAPSHOT - - - - org.onap.ccsdk.sli.northbound - dataChange-lighty - 0.6.1-SNAPSHOT - jar - - ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - - - - - - org.onap.ccsdk.sli.core - ccsdk-lighty-dependency-versions - ${project.version} - pom - import - - - - - - - io.lighty.core - lighty-controller - - - org.onap.ccsdk.sli.northbound - dataChange-provider - ${project.version} - - - diff --git a/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java b/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java deleted file mode 100644 index 412d46657..000000000 --- a/dataChange/lighty/src/main/java/org/onap/ccsdk/sli/northbound/dataChange/lighty/DataChangeModule.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * ============LICENSE_START========================================== - * Copyright (c) 2019 PANTHEON.tech s.r.o. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - * - */ -package org.onap.ccsdk.sli.northbound.dataChange.lighty; - -import io.lighty.core.controller.api.AbstractLightyModule; -import io.lighty.core.controller.api.LightyModule; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.onap.ccsdk.sli.northbound.DataChangeClient; -import org.onap.ccsdk.sli.northbound.DataChangeProvider; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; - -/** - * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from - * the dataChange-provider artifact. - */ -public class DataChangeModule extends AbstractLightyModule implements LightyModule { - - private final SvcLogicService svcLogicService; - private final DataBroker dataBroker; - private final NotificationPublishService publishService; - private final RpcProviderRegistry rpcRegistry; - - private DataChangeClient dataChangeClient; - private DataChangeProvider dataChangeProvider; - - public DataChangeModule(SvcLogicService svcLogicService, DataBroker dataBroker, - NotificationPublishService publishService, RpcProviderRegistry rpcRegistry) { - this.svcLogicService = svcLogicService; - this.dataBroker = dataBroker; - this.publishService = publishService; - this.rpcRegistry = rpcRegistry; - } - - @Override - protected boolean initProcedure() { - this.dataChangeClient = new DataChangeClient(svcLogicService); - this.dataChangeProvider = new DataChangeProvider(dataBroker, publishService, rpcRegistry, dataChangeClient); - return true; - } - - @Override - protected boolean stopProcedure() { - return true; - } - -} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index fed24d7bd..18c9e379d 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -21,7 +21,6 @@ features provider installer - lighty diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 2b3914a96..97853b22b 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT ${project.version} diff --git a/lcm/lighty/pom.xml b/lcm/lighty/pom.xml deleted file mode 100755 index 53c88dd24..000000000 --- a/lcm/lighty/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 1.4.1-SNAPSHOT - - - - org.onap.ccsdk.sli.northbound - lcm-lighty - 0.6.1-SNAPSHOT - jar - - ccsdk-sli-northbound :: lcm :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - - - - - - org.onap.ccsdk.sli.core - ccsdk-lighty-dependency-versions - ${project.version} - pom - import - - - - - - - io.lighty.core - lighty-controller - - - org.onap.ccsdk.sli.northbound - lcm-provider - ${project.version} - - - diff --git a/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java b/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java deleted file mode 100644 index cbbf9fb2e..000000000 --- a/lcm/lighty/src/main/java/org/onap/ccsdk/sli/northbound/lcm/lighty/LcmModule.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * ============LICENSE_START========================================== - * Copyright (c) 2019 PANTHEON.tech s.r.o. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - * - */ -package org.onap.ccsdk.sli.northbound.lcm.lighty; - -import io.lighty.core.controller.api.AbstractLightyModule; -import io.lighty.core.controller.api.LightyModule; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.onap.ccsdk.sli.northbound.LcmProvider; -import org.onap.ccsdk.sli.northbound.LcmSliClient; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; - -/** - * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that manages and provides services from - * the lcm-provider artifact. - */ -public class LcmModule extends AbstractLightyModule implements LightyModule { - - private final SvcLogicService svcLogicService; - private final DataBroker dataBroker; - private final NotificationPublishService publishService; - private final RpcProviderRegistry rpcRegistry; - - private LcmSliClient lcmSliClient; - private LcmProvider lcmProvider; - - public LcmModule(final SvcLogicService svcLogicService, - final DataBroker dataBroker, - final NotificationPublishService publishService, - final RpcProviderRegistry rpcRegistry) { - this.svcLogicService = svcLogicService; - this.dataBroker = dataBroker; - this.publishService = publishService; - this.rpcRegistry = rpcRegistry; - } - - @Override - protected boolean initProcedure() { - this.lcmSliClient = new LcmSliClient(svcLogicService); - this.lcmProvider = new LcmProvider(dataBroker, publishService, rpcRegistry, lcmSliClient); - return true; - } - - @Override - protected boolean stopProcedure() { - return true; - } - -} diff --git a/lcm/pom.xml b/lcm/pom.xml index 3316f3adf..0eb61fe3b 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -21,7 +21,6 @@ features provider installer - lighty diff --git a/pom.xml b/pom.xml index 9b3cc39c1..be4c7923c 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,6 @@ daexim-offsite-backup features artifacts - ccsdk-northbound-lighty ONAP diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index f6a802f14..e68364286 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT ${project.version} -- cgit 1.2.3-korg From 85962cd92a89187b61ca63a597c7f1f172cd98f2 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 11 Sep 2019 10:35:27 -0400 Subject: Roll versions for Frankfurt development Roll master version for Frankfurt development Change-Id: I78f77bff5b9b85076cfa85fee883ca9769f71ffc Issue-ID: CCSDK-1701 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- asdcApi/features/ccsdk-asdcApi/pom.xml | 4 ++-- asdcApi/features/features-asdcApi/pom.xml | 4 ++-- asdcApi/features/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/features/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/features/ccsdk-dataChange/pom.xml | 4 ++-- dataChange/features/features-dataChange/pom.xml | 4 ++-- dataChange/features/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/features/ccsdk-lcm/pom.xml | 4 ++-- lcm/features/features-lcm/pom.xml | 4 ++-- lcm/features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 4 ++-- 37 files changed, 74 insertions(+), 74 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index b047d23c1..9203e5386 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index b112574c9..38a0fee5e 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 9927bce43..85a371c82 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index e1d4bf261..350eaf07f 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 5192bfa3f..4e1d3f6db 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index e0f70a34e..9877e31c3 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 4f2b816f4..916d2da17 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 951368777..d9e6ca17b 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index 8754d11f6..a0de9fd86 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index e3df29494..fbc8b1b19 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-daexim-offsite-backup - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index 1fcf9c486..add8eef50 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 69216cbbe..89f69261d 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 19346c001..5c0f88856 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 6a0e90db8..d684f50bb 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index d813b9082..ca80301ca 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 97bd9a127..df9e73b02 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index c47cecffd..2bcaad903 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index aa5756437..cd0b2d59e 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 822e4016b..cb56a375b 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 123f1a0da..8193faa6d 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 18c9e379d..ae9300f83 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 1f94f774c..b2cc3bf6b 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 97853b22b..f403fc3df 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 78e1ee8ca..b2d698d50 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index cd6359cb9..34717d428 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 327c59c5f..c5c73e7f0 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 6bfc1a1f2..2cbcdd5e8 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 380065bc6..484e974cb 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 06ea67d23..df507e611 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 21ab47fd5..003e1398e 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index c562038af..a51e09179 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 234cb6606..114c7988e 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 0eb61fe3b..ae83e81a5 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index ebf1e7b0a..eb328dd82 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index be4c7923c..280200f29 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT 4.0.0 @@ -104,7 +104,7 @@ ONAP - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index e68364286..00d7ead93 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 54d8edb35..d6537b40b 100644 --- a/version.properties +++ b/version.properties @@ -4,8 +4,8 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=0 -sprint_number=6 -feature_revision=1 +sprint_number=7 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 2e7e531a8d80178410a1c4e78e62443c9d9a7684 Mon Sep 17 00:00:00 2001 From: "lalena.aria" Date: Tue, 8 Oct 2019 20:57:16 +0000 Subject: 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 --- dmaap-listener/pom.xml | 2 +- ueb-listener/pom.xml | 2 +- .../ccsdk/sli/northbound/uebclient/SdncBaseModel.java | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index f403fc3df..4d2395a8e 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT ${project.version} diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 00d7ead93..9e7e41691 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT ${project.version} 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 d3fef173f..7ab431dac 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()) { -- cgit 1.2.3-korg From df4a1a7d79b6d6054949ad7acde5f41f6761d677 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 13 Nov 2019 10:18:56 -0500 Subject: Use 1.5.0 parent pom Use released 1.5.0 version of parent pom Change-Id: I44ccdbd0f064ddbdb3caaf508fc4c164a26afe9a Issue-ID: CCSDK-1920 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- .../features/features-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 7 +++++-- 36 files changed, 40 insertions(+), 37 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 9203e5386..2e0cbc5e5 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 38a0fee5e..e9751132e 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 85a371c82..93563c54c 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index 350eaf07f..b674f4161 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 4e1d3f6db..fce6cfbca 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 9877e31c3..820780b98 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 916d2da17..b31cb3cb2 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index d9e6ca17b..390621318 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index a0de9fd86..f954dd1b7 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index fbc8b1b19..58cd63f80 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index add8eef50..d4c3eefef 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 89f69261d..f298954e7 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 5c0f88856..454b86e88 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index d684f50bb..d4437fa06 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index ca80301ca..d54f28ab3 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index df9e73b02..5674afc98 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 2bcaad903..c92f88139 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index cd0b2d59e..8641baa49 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index cb56a375b..b81f1802a 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 8193faa6d..db673bc03 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index ae9300f83..8e285fa57 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index b2cc3bf6b..12dd03139 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 4d2395a8e..60edc43a0 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index b2d698d50..905d40e92 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 34717d428..1c28a36e7 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index c5c73e7f0..ca4189bf8 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/pom.xml b/features/pom.xml index 2cbcdd5e8..11a6c3e46 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 484e974cb..67258ac99 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index df507e611..9dbc58eba 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 003e1398e..5c48c5f9c 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index a51e09179..d948e9273 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 114c7988e..281976b5a 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/pom.xml b/lcm/pom.xml index ae83e81a5..5c933dbc5 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index eb328dd82..f5e86837d 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/pom.xml b/pom.xml index 280200f29..cf38779fe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 8bd81fee5..7199561c6 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.northbound @@ -24,6 +24,8 @@ ${project.version}-${build.number} 0.7.0-SNAPSHOT ${project.version} + 1.4.1-SNAPSHOT + 1.6.5 @@ -44,12 +46,13 @@ org.onap.sdc.sdc-distribution-client sdc-distribution-client - 1.4.1-SNAPSHOT + ${sdc.client.version} compile org.onap.sdc.sdc-tosca sdc-tosca + ${sdc.tosca.version} compile -- cgit 1.2.3-korg From 083f91d1de09cc087e33c58476ffc301569f7841 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 19 Nov 2019 13:19:44 -0500 Subject: Fix versions of sli core dependencies Fix to override ccsdk sli core version from parent pom with current version Change-Id: Ibde08052ea5fe974e3e864fba5578443cdc1bd0f Issue-ID: CCSDK-1944 Signed-off-by: Timoney, Dan (dt5972) --- asdcApi/features/ccsdk-asdcApi/pom.xml | 1 + asdcApi/provider/pom.xml | 1 + daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++++ dataChange/features/ccsdk-dataChange/pom.xml | 1 + dataChange/provider/pom.xml | 1 + dmaap-listener/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 1 + lcm/provider/pom.xml | 1 + ueb-listener/pom.xml | 2 +- 9 files changed, 12 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index e9751132e..0543fedfa 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 390621318..5ae3a2558 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index f954dd1b7..c0843a322 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -16,6 +16,10 @@ ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} + + ${project.version} + + org.opendaylight.controller diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index 5674afc98..d213797f6 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 12dd03139..dc38b8deb 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: dataChange :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 60edc43a0..fef491db1 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - 0.7.0-SNAPSHOT + ${project.version} ${project.version} diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 67258ac99..ffd8b1af9 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index f5e86837d..418efe97a 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -17,6 +17,7 @@ ccsdk-sli-northbound :: lcm :: ${project.artifactId} + ${project.version} ${project.version} diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 7199561c6..87aea81aa 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -22,7 +22,7 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - 0.7.0-SNAPSHOT + ${project.version} ${project.version} 1.4.1-SNAPSHOT 1.6.5 -- cgit 1.2.3-korg From fc2a8c873189ee8d46e5973176777a4dad1e353f Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Fri, 22 Nov 2019 11:14:57 -0600 Subject: DMAAP Listener for ORAN A1 Adapter Policy Mgmt Support DMAAP listener for A1 Adapter related DMAAP messages for policy management. Also included are JUNIT test files. DMAAP topic is A1-P. Issue-ID: CCSDK-1964 Signed-off-by: SandeepLinux Change-Id: Ied78e8c14538136fede0f420804232770bcbdf3b --- .../dmaapclient/A1AdapterPolicyDmaapConsumer.java | 92 ++++++++++++++ .../TestA1AdapterPolicyDmaapConsumer.java | 136 +++++++++++++++++++++ .../dmaap-consumer-a1Adapter-policy-1.properties | 35 ++++++ 3 files changed, 263 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestA1AdapterPolicyDmaapConsumer.java create mode 100644 dmaap-listener/src/test/resources/dmaap-consumer-a1Adapter-policy-1.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java new file mode 100644 index 000000000..778a77b80 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java @@ -0,0 +1,92 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * Modifications Copyright © 2019 IBM. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class A1AdapterPolicyDmaapConsumer extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(A1AdapterPolicyDmaapConsumer.class); + + private static final String BODY = "body"; + private static final String RPC = "rpc-name"; + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null A1-ADAPTER-DMAAP message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode a1AdapterRootNode; + try { + a1AdapterRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse A1-ADAPTER-DMAAP json input", e); + } + + JsonNode bodyNode = a1AdapterRootNode.get(BODY); + if(bodyNode == null) { + LOG.warn("Missing body in A1-ADAPTER-DMAAP message"); + return; + } + String rpcMsgbody; + try { + ObjectMapper mapper = new ObjectMapper(); + rpcMsgbody = mapper.writeValueAsString(bodyNode); + + } catch (Exception e) { + LOG.error("Unable to parse body in A1-ADAPTER-DMAAP message", e); + return; + } + + JsonNode rpcNode = a1AdapterRootNode.get(RPC); + if(rpcNode == null) { + LOG.warn("Missing node in A1-ADAPTER-DMAAP message- " + RPC); + return; + } + String rpc = rpcNode.textValue(); + String sdncEndpoint = "A1-ADAPTER-API:" + rpc; + + try { + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + LOG.info("POST A1-ADAPTER-API Request " + rpcMsgbody); + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.warn("Unable to POST A1-ADAPTER-API message. SDNC URL not available. body:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestA1AdapterPolicyDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestA1AdapterPolicyDmaapConsumer.java new file mode 100644 index 000000000..8b7044f69 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestA1AdapterPolicyDmaapConsumer.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestA1AdapterPolicyDmaapConsumer { + private static final String a1AdapterInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"getHealthCheck\",\n" + + " \"Payload\": {\n" + + " \"near-rt-ric-id\": \"near-RT-ric1\",\n" + + " \"policy-type-id\": \"20000\",\n" + + " \"description\": \"parameters to control policy \",\n" + + " \"name\": \"admission_control_policy\",\n" + + " \"policy-type\": \"object\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"getHealthCheck\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + " }\n" + + "}"; + + @Test + public void test() throws Exception { + Properties props = new Properties(); + + A1AdapterPolicyDmaapConsumer consumer = new A1AdapterPolicyDmaapConsumer(); + InputStream propStr = TestA1AdapterPolicyDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-a1Adapter-policy-1.properties"); + props.load(propStr); + consumer.init(props, "src/test/resources/dmaap-consumer-1.properties"); + consumer.processMsg(a1AdapterInput); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + A1AdapterPolicyDmaapConsumer consumer = new A1AdapterPolicyDmaapConsumer(); + consumer.processMsg(null); + } + + @Test + public void testProcessMsgMissingBody() throws Exception { + String msg = "{\n" + + " \"body1\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"getHealthCheck\",\n" + + " \"Payload\": {\n" + + " \"near-rt-ric-id\": \"near-RT-ric1\",\n" + + " \"policy-type-id\": \"20000\",\n" + + " \"description\": \"parameters to control policy \",\n" + + " \"name\": \"admission_control_policy\",\n" + + " \"policy-type\": \"object\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"getHealthCheck\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + " }\n" + + "}"; + + A1AdapterPolicyDmaapConsumer consumer = new A1AdapterPolicyDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidRPC() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"getHealthCheck\",\n" + + " \"Payload\": {\n" + + " \"near-rt-ric-id\": \"near-RT-ric1\",\n" + + " \"policy-type-id\": \"20000\",\n" + + " \"description\": \"parameters to control policy \",\n" + + " \"name\": \"admission_control_policy\",\n" + + " \"policy-type\": \"object\"\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name1\": \"getHealthCheck\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + " }\n" + + "}"; + + A1AdapterPolicyDmaapConsumer consumer = new A1AdapterPolicyDmaapConsumer(); + consumer.processMsg(msg); + } + +} diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-a1Adapter-policy-1.properties b/dmaap-listener/src/test/resources/dmaap-consumer-a1Adapter-policy-1.properties new file mode 100644 index 000000000..edb7c453e --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-a1Adapter-policy-1.properties @@ -0,0 +1,35 @@ +TransportType=HTTPNOAUTH +Latitude =50.000000 +Longitude =-100.000000 +Version =1.0 +ServiceName =message-router.onap:3904/events +Environment =TEST +Partner = +routeOffer=MR1 +SubContextPath =/ +Protocol =http +MethodType =GET +username =admin +password =admin +contenttype =application/json +authKey=fs20cKwalJ6ry4kX:7Hqm6BDZK47IKxGRkOPFk33qMYs= +authDate=2019-04-09T04:28:40-05:00 +host=message-router.onap:3904 +topic=A1-P +group=users +id=sdnc1 +timeout=15000 +limit=1000 +filter= +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=15000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +sdnc.odl.url-base=http://sdnc.onap:8282/restconf/operations -- cgit 1.2.3-korg From 32dab99f3a01cedb20b6af8b85343c61fbd7a6fb Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Mon, 2 Dec 2019 12:35:46 -0500 Subject: Use 1.5.1-SNAPSHOT version of parent pom Fixed version of parent pom to use snapshot version Change-Id: Id028def6885e2452c1f1f304d0da62a14e324337 Issue-ID: CCSDK-1935 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 2 +- asdcApi/features/features-asdcApi/pom.xml | 2 +- asdcApi/features/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/features/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/features/ccsdk-dataChange/pom.xml | 2 +- dataChange/features/features-dataChange/pom.xml | 2 +- dataChange/features/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/features/ccsdk-lcm/pom.xml | 2 +- lcm/features/features-lcm/pom.xml | 2 +- lcm/features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 2e0cbc5e5..f4ae85c2f 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index 0543fedfa..35e2a54b6 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 93563c54c..571175b92 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index b674f4161..36d0245b3 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index fce6cfbca..93ddb55f5 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 820780b98..ffaa12a79 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index b31cb3cb2..6dcaf5cc6 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 5ae3a2558..43c51ea32 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml index c0843a322..bdf789fa1 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml index 58cd63f80..3a9d260c7 100644 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml index d4c3eefef..9152cf598 100755 --- a/daexim-offsite-backup/features/pom.xml +++ b/daexim-offsite-backup/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index f298954e7..3e36f56ed 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 454b86e88..fbb96800b 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index d4437fa06..3af575352 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index d54f28ab3..15e742812 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index d213797f6..6621ee9c1 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index c92f88139..9a34429ca 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 8641baa49..f16ed6951 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index b81f1802a..abd4cc8bd 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index db673bc03..a23b81331 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 8e285fa57..617f6b36a 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index dc38b8deb..f2a4ba5a1 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index fef491db1..0436b8ebc 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.0 + 1.5.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 905d40e92..8fd22d15d 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 1c28a36e7..d5f70a0fe 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ca4189bf8..49196e71d 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index 11a6c3e46..560f3a0f4 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index ffd8b1af9..69ea1f2e9 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 9dbc58eba..600ed4305 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 5c48c5f9c..ac0258b71 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT org.onap.ccsdk.sli.northbound diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index d948e9273..b7aa65f79 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 281976b5a..f5c1aec59 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/pom.xml b/lcm/pom.xml index 5c933dbc5..555900372 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 418efe97a..496e81909 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0 + 1.5.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index cf38779fe..b376605e7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0 + 1.5.1-SNAPSHOT 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 87aea81aa..cd39863f6 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.0 + 1.5.1-SNAPSHOT org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From fff922790262500c1cced5e674179bf8873acb83 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Tue, 17 Dec 2019 00:22:14 -0600 Subject: Bug fix in DMAAP listener for A1 Adapter Modification to use the payload node to be sent as an RPC message to stay in alignment with YANG model for A1 adapter Issue-ID: CCSDK-2001 Signed-off-by: SandeepLinux Change-Id: I023cf27ec9ac0305f1bc23bc9762603192c09e27 --- .../dmaapclient/A1AdapterPolicyDmaapConsumer.java | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java index 778a77b80..dd59f5868 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/A1AdapterPolicyDmaapConsumer.java @@ -34,6 +34,9 @@ public class A1AdapterPolicyDmaapConsumer extends SdncDmaapConsumerImpl { private static final String BODY = "body"; private static final String RPC = "rpc-name"; + private static final String INPUT = "input"; + private static final String PAYLOAD = "Payload"; + @Override public void processMsg(String msg) throws InvalidMessageException { @@ -55,13 +58,26 @@ public class A1AdapterPolicyDmaapConsumer extends SdncDmaapConsumerImpl { LOG.warn("Missing body in A1-ADAPTER-DMAAP message"); return; } + + JsonNode input = bodyNode.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode payloadNode = input.get(PAYLOAD); + if(payloadNode == null) { + LOG.info("Missing payload node."); + return; + } + String rpcMsgbody; try { ObjectMapper mapper = new ObjectMapper(); - rpcMsgbody = mapper.writeValueAsString(bodyNode); + rpcMsgbody = mapper.writeValueAsString(payloadNode); } catch (Exception e) { - LOG.error("Unable to parse body in A1-ADAPTER-DMAAP message", e); + LOG.error("Unable to parse payload in A1-ADAPTER-DMAAP message", e); return; } -- cgit 1.2.3-korg From 3f9e606b1bf7e21f6a143e3aab5a03fb2b125a7a Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 23 Jan 2020 14:40:48 -0500 Subject: Use released parent pom Use released version of ccsdk/parent poms Change-Id: If15e626db13cf5a0194a3643fb9174a2b9dc88f7 Issue-ID: CCSDK-1963 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-asdcApi/pom.xml | 2 +- features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- features/ccsdk-dataChange/pom.xml | 2 +- features/ccsdk-lcm/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index f4ae85c2f..518716262 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index cad3fb8b3..84bcc0b40 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index ffaa12a79..77cb4c81d 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index baac617c2..2cbdc71fd 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 43c51ea32..f59649a91 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index dae4a4fd3..2ed2b064d 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index fbb96800b..8d82f66d7 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 65cf987d9..71463e2e8 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 15e742812..0b5a5858d 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 7516f0b56..6cbadc8b1 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index a23b81331..01632f240 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 75637886d..3291a5d28 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index f2a4ba5a1..5c7e21e02 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 0436b8ebc..4018c9610 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.1-SNAPSHOT + 1.5.1 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 35e2a54b6..79496ab09 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index bdf789fa1..59c9ee861 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 6621ee9c1..81571efe1 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 69ea1f2e9..bcbf97ab6 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 8fd22d15d..2c50a4489 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index d5f70a0fe..987071863 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index b9ad99f17..4eefa81a7 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/features/pom.xml b/features/pom.xml index 4f3c2ae17..1eff8e57c 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 38b4f84b0..59c29394a 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index f5c1aec59..98041386c 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/lcm/pom.xml b/lcm/pom.xml index 4f19f8cdd..0206097ea 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 496e81909..438d7573a 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.1-SNAPSHOT + 1.5.1 diff --git a/pom.xml b/pom.xml index c3df62b56..6b7998bc5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1-SNAPSHOT + 1.5.1 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index cd39863f6..881220b82 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.1-SNAPSHOT + 1.5.1 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From f0594b8f4684ddbb81e490c630e5a968abd2170f Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 24 Jan 2020 16:10:06 -0500 Subject: Roll versions to next snapshot Roll CCSDK to next snapshot version Change-Id: I4441d1d1e2ead1912281109dcf7fbb4961198b36 Issue-ID: CCSDK-1963 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-asdcApi/pom.xml | 4 ++-- features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- features/ccsdk-dataChange/pom.xml | 4 ++-- features/ccsdk-lcm/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 29 files changed, 57 insertions(+), 57 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 518716262..1d22a357a 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.1 + 1.5.2-SNAPSHOT diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 84bcc0b40..25234e6ac 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 77cb4c81d..984d468ae 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 2cbdc71fd..8a21a30c6 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index f59649a91..47a11ecde 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 2ed2b064d..4d0e59655 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-daexim-offsite-backup diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 8d82f66d7..c546305bf 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 71463e2e8..8b2c5a9fa 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 0b5a5858d..059c5581f 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 6cbadc8b1..a9db69311 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 01632f240..8e10c1892 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 3291a5d28..03e4f6061 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 5c7e21e02..0104d5f2d 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 4018c9610..4185dee5f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 79496ab09..694b0e848 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index 59c9ee861..cdab873f7 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 81571efe1..493a944f7 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index bcbf97ab6..f9fd204f1 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 2c50a4489..835cf965f 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 987071863..0053bef45 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 4eefa81a7..bd76a4b5d 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 1eff8e57c..bd0d4ea27 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 59c29394a..9884f7603 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 98041386c..b94bdbeff 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 0206097ea..c0dc54d9d 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 438d7573a..52d2e68f7 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 6b7998bc5..b74f9ec26 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.1 + 1.5.2-SNAPSHOT 4.0.0 @@ -146,7 +146,7 @@ ONAP - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 881220b82..30023d782 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.5.1 + 1.5.2-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.7.0-SNAPSHOT + 0.7.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index d6537b40b..c11ada9fe 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=7 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 66ce8b86e11159bc833a64685333f7676055e38d Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Tue, 3 Mar 2020 10:10:48 -0600 Subject: DMAAP Listener for ORAN CMNotify VES events DMAAP listener for VES events originating from ORAN. Will invoke RPC/DG for updating RuntimeDB Issue-ID: CCSDK-2133 Signed-off-by: SandeepLinux Change-Id: Ia17a7b2da1c58f5624c1d331aac56ce566d097bf --- .../dmaapclient/CMNotifyDmaapConsumer.java | 112 +++++++++++++++++ .../dmaapclient/TestCMNotifyDmaapConsumer.java | 140 +++++++++++++++++++++ .../resources/dmaap-consumer-cMNotify-1.properties | 35 ++++++ 3 files changed, 287 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestCMNotifyDmaapConsumer.java create mode 100644 dmaap-listener/src/test/resources/dmaap-consumer-cMNotify-1.properties (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java new file mode 100644 index 000000000..e49e77ea8 --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java @@ -0,0 +1,112 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * Modifications Copyright © 2019 IBM. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.json.JSONObject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CMNotifyDmaapConsumer extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(CMNotifyDmaapConsumer.class); + + private static final String BODY = "body"; + private static final String RPC = "rpc-name"; + private static final String INPUT = "input"; + private static final String PAYLOAD = "Payload"; + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null CMNotify-DMAAP message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode CMNotifyRootNode; + try { + CMNotifyRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse CMNotify-DMAAP json input", e); + } + + JsonNode bodyNode = CMNotifyRootNode.get(BODY); + if(bodyNode == null) { + LOG.warn("Missing body in CMNotify-DMAAP message"); + return; + } + + JsonNode input = bodyNode.get(INPUT); + if(input == null) { + LOG.info("Missing input node."); + return; + } + + JsonNode payloadNode = input.get(PAYLOAD); + if(payloadNode == null) { + LOG.info("Missing payload node."); + return; + } + + JSONObject rpcMsgBodyNode = new JSONObject(); + + rpcMsgBodyNode.put(INPUT,payloadNode); + + String rpcMsgbody; + try { + ObjectMapper mapper = new ObjectMapper(); + rpcMsgbody = mapper.writeValueAsString(rpcMsgBodyNode); + + } catch (Exception e) { + LOG.error("Unable to parse payload in CMNotify-DMAAP message", e); + return; + } + + JsonNode rpcNode = CMNotifyRootNode.get(RPC); + if(rpcNode == null) { + LOG.warn("Missing node in CMNotify-DMAAP message- " + RPC); + return; + } + String rpc = rpcNode.textValue(); + String sdncEndpoint = "CM-NOTIFY-API:" + rpc; + + try { + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + LOG.info("POST CM-NOTIFY-API Request " + rpcMsgbody); + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.warn("Unable to POST CM-NOTIFY-API message. SDNC URL not available. body:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestCMNotifyDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestCMNotifyDmaapConsumer.java new file mode 100644 index 000000000..122a6d40b --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestCMNotifyDmaapConsumer.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + + +public class TestCMNotifyDmaapConsumer { + private static final String cMNotifyInput = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"nbrlist-change-notification\",\n" + + " \"Payload\": {\n" + + " \"fap-service-number-of-entries-changed\": 1,\n" + + " \"fap-service\": [{ \"alias\": \n" + + " \"Chn0001\", \"cid\": \"Chn0001\", \"lte-cell-number-of-entries\": 1,\n" + + " \"lte-ran-neighbor-list-in-use-lte-cell-changed\": \n" + + " [{ \"plmnid\": \"ran-1\", \"cid\": \"Chn0002\", \"phy-cell-id\": 4,\n" + + " \"pnf-name\": \"ncserver1\",\n" + + " \"blacklisted\": false }] }] }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"nbrlist-change-notification\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + + @Test + public void test() throws Exception { + Properties props = new Properties(); + + CMNotifyDmaapConsumer consumer = new CMNotifyDmaapConsumer(); + InputStream propStr = TestCMNotifyDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-cMNotify-1.properties"); + props.load(propStr); + consumer.init(props, "src/test/resources/dmaap-consumer-1.properties"); + consumer.processMsg(cMNotifyInput); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + CMNotifyDmaapConsumer consumer = new CMNotifyDmaapConsumer(); + consumer.processMsg(null); + } + + @Test + public void testProcessMsgMissingBody() throws Exception { + String msg = "{\n" + + " \"bodyTest\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"nbrlist-change-notification\",\n" + + " \"Payload\": {\n" + + " \"fap-service-number-of-entries-changed\": 1,\n" + + " \"fap-service\": [{ \"alias\": \n" + + " \"Chn0001\", \"cid\": \"Chn0001\", \"lte-cell-number-of-entries\": 1,\n" + + " \"lte-ran-neighbor-list-in-use-lte-cell-changed\": \n" + + " [{ \"plmnid\": \"ran-1\", \"cid\": \"Chn0002\", \"phy-cell-id\": 4,\n" + + " \"pnf-name\": \"ncserver1\",\n" + + " \"blacklisted\": false }] }] }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-name\": \"nbrlist-change-notification\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + CMNotifyDmaapConsumer consumer = new CMNotifyDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidRPC() throws Exception { + String msg = "{\n" + + " \"body\": {\n" + + " \"input\": {\n" + + " \"CommonHeader\": {\n" + + " \"TimeStamp\": \"2018-11-30T09:13:37.368Z\",\n" + + " \"APIver\": \"1.0\",\n" + + " \"RequestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + + " \"SubRequestID\": \"1\",\n" + + " \"RequestTrack\": {},\n" + + " \"Flags\": {}\n },\n" + + " \"Action\": \"nbrlist-change-notification\",\n" + + " \"Payload\": {\n" + + " \"fap-service-number-of-entries-changed\": 1,\n" + + " \"fap-service\": [{ \"alias\": \n" + + " \"Chn0001\", \"cid\": \"Chn0001\", \"lte-cell-number-of-entries\": 1,\n" + + " \"lte-ran-neighbor-list-in-use-lte-cell-changed\": \n" + + " [{ \"plmnid\": \"ran-1\", \"cid\": \"Chn0002\", \"phy-cell-id\": 4,\n" + + " \"pnf-name\": \"ncserver1\",\n" + + " \"blacklisted\": false }] }] }\n" + + " }\n" + + " },\n" + + " \"version\": \"1.0\",\n" + + " \"rpc-nameTest\": \"nbrlist-change-notification\",\n" + + " \"correlation-id\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459-1\",\n" + + " \"type\": \"request\"\n" + + "}"; + + CMNotifyDmaapConsumer consumer = new CMNotifyDmaapConsumer(); + consumer.processMsg(msg); + } + +} diff --git a/dmaap-listener/src/test/resources/dmaap-consumer-cMNotify-1.properties b/dmaap-listener/src/test/resources/dmaap-consumer-cMNotify-1.properties new file mode 100644 index 000000000..aae34a26f --- /dev/null +++ b/dmaap-listener/src/test/resources/dmaap-consumer-cMNotify-1.properties @@ -0,0 +1,35 @@ +TransportType=HTTPNOAUTH +Latitude =50.000000 +Longitude =-100.000000 +Version =1.0 +ServiceName =message-router.onap:3904/events +Environment =TEST +Partner = +routeOffer=MR1 +SubContextPath =/ +Protocol =http +MethodType =GET +username =admin +password =admin +contenttype =application/json +authKey=fs20cKwalJ6ry4kX:7Hqm6BDZK47IKxGRkOPFk33qMYs= +authDate=2019-04-09T04:28:40-05:00 +host=message-router.onap:3904 +topic=CM-NOTIFICATION +group=users +id=sdnc1 +timeout=15000 +limit=1000 +filter= +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=15000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +sdnc.odl.url-base=http://sdnc.onap:8282/restconf/operations -- cgit 1.2.3-korg From 44924cf809a463f576ad881bd70e84a0e2d8a026 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 3 Mar 2020 12:56:07 -0500 Subject: Use released 1.5.2 CCSDK parent Update to use released version of CCSDK parent pom Change-Id: I27885e3e08b774fb9f7737111641d7dd585906de Issue-ID: CCSDK-2152 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 2 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/pom.xml | 2 +- asdcApi/pom.xml | 2 +- asdcApi/provider/pom.xml | 2 +- daexim-offsite-backup/installer/pom.xml | 2 +- daexim-offsite-backup/model/pom.xml | 2 +- daexim-offsite-backup/pom.xml | 2 +- daexim-offsite-backup/provider/pom.xml | 2 +- dataChange/installer/pom.xml | 2 +- dataChange/model/pom.xml | 2 +- dataChange/pom.xml | 2 +- dataChange/provider/pom.xml | 2 +- dmaap-listener/pom.xml | 2 +- features/ccsdk-asdcApi/pom.xml | 2 +- features/ccsdk-daexim-offsite-backup/pom.xml | 2 +- features/ccsdk-dataChange/pom.xml | 2 +- features/ccsdk-lcm/pom.xml | 2 +- features/ccsdk-sli-northbound-all/pom.xml | 2 +- features/features-sli-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- lcm/installer/pom.xml | 2 +- lcm/model/pom.xml | 2 +- lcm/pom.xml | 2 +- lcm/provider/pom.xml | 2 +- pom.xml | 2 +- ueb-listener/pom.xml | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 1d22a357a..ecb07c915 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 25234e6ac..df3b544b4 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 984d468ae..c3a3d68af 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 8a21a30c6..e35119cd9 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 47a11ecde..8ed6cee88 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 4d0e59655..3f2e877f1 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index c546305bf..f05ee0cb7 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 8b2c5a9fa..89d4500f7 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 059c5581f..66426dbca 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index a9db69311..e0ef6c177 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 8e10c1892..8613dbd31 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 03e4f6061..18e73c841 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 0104d5f2d..8d1673182 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 4185dee5f..bef0a7024 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.2-SNAPSHOT + 1.5.2 org.onap.ccsdk.sli.northbound diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 694b0e848..e2013c053 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index cdab873f7..0c9fcc447 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 493a944f7..2bf44d23a 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index f9fd204f1..03c0eecbe 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 835cf965f..ee0433d00 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 0053bef45..06374bed2 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index bd76a4b5d..b4d9bb5f7 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/features/pom.xml b/features/pom.xml index bd0d4ea27..5adda28a2 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 9884f7603..ef471fe12 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index b94bdbeff..29f7b0d13 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/lcm/pom.xml b/lcm/pom.xml index c0dc54d9d..a13e2f3a8 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 52d2e68f7..4298dfde6 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2-SNAPSHOT + 1.5.2 diff --git a/pom.xml b/pom.xml index b74f9ec26..896a60f15 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2-SNAPSHOT + 1.5.2 4.0.0 diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 30023d782..f4ff554c1 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent standalone-parent - 1.5.2-SNAPSHOT + 1.5.2 org.onap.ccsdk.sli.northbound -- cgit 1.2.3-korg From 8a620f7b9ab473ec1399137aa05ed65c8b3fe970 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 5 Mar 2020 15:09:19 -0500 Subject: Roll master to Guilin Roll master to new versions for early Guilin development Change-Id: I8b7098b789ba57291c3748ea7d84c547fa8cadd3 Issue-ID: CCSDK-2152 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 17 +++--- asdcApi/installer/pom.xml | 8 +-- asdcApi/model/pom.xml | 6 +-- asdcApi/pom.xml | 12 ++--- asdcApi/provider/pom.xml | 17 +++--- daexim-offsite-backup/installer/pom.xml | 11 ++-- daexim-offsite-backup/model/pom.xml | 8 +-- daexim-offsite-backup/pom.xml | 10 ++-- daexim-offsite-backup/provider/pom.xml | 42 ++++++++------- dataChange/installer/pom.xml | 4 +- dataChange/model/pom.xml | 6 +-- dataChange/pom.xml | 5 +- dataChange/provider/pom.xml | 19 +++---- dmaap-listener/pom.xml | 5 +- features/ccsdk-asdcApi/pom.xml | 6 +-- features/ccsdk-daexim-offsite-backup/pom.xml | 4 +- features/ccsdk-dataChange/pom.xml | 4 +- features/ccsdk-lcm/pom.xml | 6 +-- features/ccsdk-sli-northbound-all/pom.xml | 5 +- features/features-sli-northbound/pom.xml | 4 +- features/installer/pom.xml | 4 +- features/pom.xml | 4 +- lcm/installer/pom.xml | 4 +- lcm/model/pom.xml | 6 +-- lcm/pom.xml | 6 +-- lcm/provider/pom.xml | 18 +++---- pom.xml | 78 +++++++++++++--------------- ueb-listener/pom.xml | 9 ++-- version.properties | 6 +-- 29 files changed, 157 insertions(+), 177 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index ecb07c915..dcbb22d7e 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -2,9 +2,15 @@ 4.0.0 + + org.onap.ccsdk.parent + parent + 2.0.0-SNAPSHOT + + org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -13,17 +19,11 @@ ONAP - - - org.onap.ccsdk.parent - parent - 1.5.2 - ${project.version} - + @@ -94,5 +94,4 @@ - diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index df3b544b4..f68cbeab3 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 - + 2.0.0-SNAPSHOT + - org.onap.ccsdk.sli.northbound + org.onap.ccsdk.sli.northbound asdcApi-installer - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index c3a3d68af..03255e132 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -29,6 +29,4 @@ - - diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index e35119cd9..cf811281c 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,26 +5,24 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi - - ${project.version} - - model provider installer - + + ${project.version} + diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 8ed6cee88..bdf9c5e70 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -24,15 +24,14 @@ - org.onap.ccsdk.sli.core - sli-core-artifacts - ${ccsdk.sli.core.version} - pom - import + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import - org.onap.ccsdk.sli.northbound @@ -94,6 +93,4 @@ test - - diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 3f2e877f1..cd5d5b151 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -1,24 +1,28 @@ 4.0.0 + org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT - ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom + + ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} + ccsdk-daexim-offsite-backup ${application.name} mvn:org.onap.ccsdk.sli.northbound/${features.boot}/${project.version}/xml/features false + org.onap.ccsdk.sli.northbound @@ -31,6 +35,7 @@ ${project.version} + diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index f05ee0cb7..c281e355b 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -1,19 +1,21 @@ 4.0.0 + org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT - ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle + ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} + org.opendaylight.mdsal.binding.model.ietf diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 89d4500f7..0d7f8e0ce 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -1,17 +1,17 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup @@ -28,9 +28,9 @@ org.onap.ccsdk.sli.northbound daexim-offsite-backup-features - features - xml ${project.version} + xml + features org.onap.ccsdk.sli.northbound diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 66426dbca..94ffc4411 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -1,34 +1,20 @@ 4.0.0 + org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT - ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle - - - - org.apache.felix - maven-bundle-plugin - true - - - org.opendaylight.controller.config.yang.config.daexim-offsite-backup_provider - * - - - - - + ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} @@ -45,8 +31,8 @@ sal-common-util - sal-test-model org.opendaylight.controller + sal-test-model test @@ -57,8 +43,8 @@ org.opendaylight.controller sal-binding-broker-impl - tests test-jar + tests test @@ -86,4 +72,20 @@ test + + + + + org.apache.felix + maven-bundle-plugin + true + + + org.opendaylight.controller.config.yang.config.daexim-offsite-backup_provider + * + + + + + diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index e0ef6c177..3bbd645b1 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 8613dbd31..54fdeeb66 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -28,6 +28,4 @@ - - diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 18e73c841..04b4019ef 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange @@ -21,5 +21,4 @@ provider installer - diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 8d1673182..d0010702f 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -20,19 +20,18 @@ ${project.version} ${project.version} - + - org.onap.ccsdk.sli.core - sli-core-artifacts - ${ccsdk.sli.core.version} - pom - import + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import - org.onap.ccsdk.sli.northbound @@ -88,6 +87,4 @@ test - - diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index bef0a7024..a6c4eea5c 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener @@ -46,7 +46,6 @@ - diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index e2013c053..837630272 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,17 +5,17 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - + ${project.version} ${project.version} diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index 0c9fcc447..b5ca937cf 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 2bf44d23a..a4c509e30 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 03c0eecbe..39b1788e5 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -20,7 +20,7 @@ ${project.version} ${project.version} - + diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index ee0433d00..99c5ee499 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} @@ -19,6 +19,7 @@ ${project.version} + ${project.groupId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 06374bed2..f8804b001 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index b4d9bb5f7..4ebbe27d0 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 5adda28a2..e2b59a01e 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index ef471fe12..ac6e7554f 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 29f7b0d13..5fc328cad 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -29,6 +29,4 @@ - - diff --git a/lcm/pom.xml b/lcm/pom.xml index a13e2f3a8..1eec115e6 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm @@ -21,6 +21,4 @@ provider installer - - diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 4298dfde6..b7f9fe837 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -21,19 +21,17 @@ ${project.version} - - org.onap.ccsdk.sli.core - sli-core-artifacts - ${ccsdk.sli.core.version} - pom - import + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import - org.onap.ccsdk.sli.northbound @@ -101,6 +99,4 @@ test - - diff --git a/pom.xml b/pom.xml index 896a60f15..1db4911bc 100644 --- a/pom.xml +++ b/pom.xml @@ -1,27 +1,35 @@ - + + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 2.0.0-SNAPSHOT - 4.0.0 - pom org.onap.ccsdk.sli.northbound ccsdk-sli-northbound + 1.0.0-SNAPSHOT + pom ccsdk-sli-northbound - https://wiki.onap.org The SDN-C Northbound APIs repo contains code for northbound API adaptors, typically MD-SAL applications + https://wiki.onap.org + + ONAP + - - - JIRA - https://jira.onap.org/ - - + + asdcApi + dataChange + lcm + dmaap-listener + ueb-listener + daexim-offsite-backup + features + artifacts + scm:git:ssh://git@${onap.git.host}/sdnc-northbound.git @@ -29,18 +37,33 @@ scm:git:ssh://${onap.git.host}:${onap.git.port}/${onap.git.project}/sdnc-northbound.git ${onap.git.protocol}://${onap.git.host}/projects/${onap.git.project}/repos/sdnc-northbound/browse - + + JIRA + https://jira.onap.org/ + Jenkins https://jenkins.onap.org/ - sdnc-javadoc dav:https://${onap.nexus.host}:${onap.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version} + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + + blackduck @@ -120,33 +143,4 @@ - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - asdcApi - dataChange - lcm - dmaap-listener - ueb-listener - daexim-offsite-backup - features - artifacts - - - ONAP - - 0.7.1-SNAPSHOT - - diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index f4ff554c1..42546fd7b 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 1.5.2 + 2.0.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.7.1-SNAPSHOT + 1.0.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener @@ -27,7 +27,7 @@ 1.4.1-SNAPSHOT 1.6.5 - + @@ -39,7 +39,6 @@ - @@ -52,7 +51,7 @@ org.onap.sdc.sdc-tosca sdc-tosca - ${sdc.tosca.version} + ${sdc.tosca.version} compile diff --git a/version.properties b/version.properties index c11ada9fe..feea7088f 100644 --- a/version.properties +++ b/version.properties @@ -3,9 +3,9 @@ # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) # because they are used in Jenkins, whose plug-in doesn't support -release_name=0 -sprint_number=7 -feature_revision=1 +release_name=1 +sprint_number=0 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From b39dc2b5bc842824b6bc2b85bc4f92eedb6d454b Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 15 May 2020 10:10:57 -0400 Subject: Change log4j2 configuration Changed log4j2 configuration from using properties files to using XML, which corrected the issue we were seeing with log files being created but empty. Also updated sdc.client.version to use released version 1.4.2 instead of 1.4.2-SNAPSHOT, which no longer exists - causing a compile error. Change-Id: I7040453ccbc3b3fd246a07fa3287c7d4d331fb34 Issue-ID: SDNC-1167 Signed-off-by: Dan Timoney --- dmaap-listener/src/main/resources/log4j.properties | 37 ---------------------- dmaap-listener/src/main/resources/log4j2.xml | 26 +++++++++++++++ ueb-listener/pom.xml | 4 +-- ueb-listener/src/main/resources/log4j.properties | 37 ---------------------- ueb-listener/src/main/resources/log4j2.xml | 26 +++++++++++++++ 5 files changed, 54 insertions(+), 76 deletions(-) delete mode 100644 dmaap-listener/src/main/resources/log4j.properties create mode 100644 dmaap-listener/src/main/resources/log4j2.xml delete mode 100644 ueb-listener/src/main/resources/log4j.properties create mode 100644 ueb-listener/src/main/resources/log4j2.xml (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/resources/log4j.properties b/dmaap-listener/src/main/resources/log4j.properties deleted file mode 100644 index 8db00762b..000000000 --- a/dmaap-listener/src/main/resources/log4j.properties +++ /dev/null @@ -1,37 +0,0 @@ -### -# ============LICENSE_START======================================================= -# openECOMP : SDN-C -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights -# reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -### - -log4j.rootLogger=DEBUG,CONSOLE,LOGFILE - -# CONSOLE is set to be a ConsoleAppender using a PatternLayout. -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.Threshold=ERROR -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n - -# LOGFILE is set to be a File appender using a PatternLayout. -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -log4j.appender.LOGFILE.File=/opt/app/dmaap-listener/logs/dmaap-listener.log -log4j.appender.LOGFILE.Append=true -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n -log4j.appender.LOGFILE.MaxFileSize=10MB -log4j.appender.LOGFILE.MaxBackupIndex=10 diff --git a/dmaap-listener/src/main/resources/log4j2.xml b/dmaap-listener/src/main/resources/log4j2.xml new file mode 100644 index 000000000..01ee93714 --- /dev/null +++ b/dmaap-listener/src/main/resources/log4j2.xml @@ -0,0 +1,26 @@ + + + + + $${env:LOGDIR:-logs} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 42546fd7b..1df9f35b2 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -24,8 +24,8 @@ ${project.version}-${build.number} ${project.version} ${project.version} - 1.4.1-SNAPSHOT - 1.6.5 + 1.4.1 + 1.6.5 diff --git a/ueb-listener/src/main/resources/log4j.properties b/ueb-listener/src/main/resources/log4j.properties deleted file mode 100644 index f2f4ed26b..000000000 --- a/ueb-listener/src/main/resources/log4j.properties +++ /dev/null @@ -1,37 +0,0 @@ -### -# ============LICENSE_START======================================================= -# openECOMP : SDN-C -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights -# reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -### - -log4j.rootLogger=DEBUG,CONSOLE,LOGFILE - -# CONSOLE is set to be a ConsoleAppender using a PatternLayout. -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.Threshold=ERROR -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n - -# LOGFILE is set to be a File appender using a PatternLayout. -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -log4j.appender.LOGFILE.File=/opt/app/ueb-listener/logs/ueb-listener.log -log4j.appender.LOGFILE.Append=true -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n -log4j.appender.LOGFILE.MaxFileSize=10MB -log4j.appender.LOGFILE.MaxBackupIndex=10 diff --git a/ueb-listener/src/main/resources/log4j2.xml b/ueb-listener/src/main/resources/log4j2.xml new file mode 100644 index 000000000..23ab908a5 --- /dev/null +++ b/ueb-listener/src/main/resources/log4j2.xml @@ -0,0 +1,26 @@ + + + + + $${env:LOGDIR:-logs} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit 1.2.3-korg From b1f7ad239ed681f473970538d17849281692578c Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Fri, 22 May 2020 23:06:07 -0500 Subject: Bug fix in DMAAP message parsing for CMNotify Minor bug fix in the DMAAP message for CMNotify Issue-ID: CCSDK-2383 Signed-off-by: SandeepLinux Change-Id: Ia080adafecf6d6b3a12682aaab3f244a33a16de5 --- .../ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java index e49e77ea8..fa14fbb24 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java @@ -71,14 +71,10 @@ public class CMNotifyDmaapConsumer extends SdncDmaapConsumerImpl { return; } - JSONObject rpcMsgBodyNode = new JSONObject(); - - rpcMsgBodyNode.put(INPUT,payloadNode); - String rpcMsgbody; try { ObjectMapper mapper = new ObjectMapper(); - rpcMsgbody = mapper.writeValueAsString(rpcMsgBodyNode); + rpcMsgbody = "{\"input\":" + mapper.writeValueAsString(payloadNode) + "}"; } catch (Exception e) { LOG.error("Unable to parse payload in CMNotify-DMAAP message", e); -- cgit 1.2.3-korg From 9bfbca954ba6fe021e1c166990b86ab0d9830d79 Mon Sep 17 00:00:00 2001 From: Franklin Dsilva Date: Tue, 26 May 2020 09:10:33 +0000 Subject: Path-/opt/app/dmaap-listener/lib does not exist in sdnc-dmaap-listener pod Change-Id: I21a1f00adef418d29e68cf7cdd1939761b87750f Issue-ID: CCSDK-2388 Signed-off-by: Franklin Dsilva --- .../org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java index 5cf369403..f35e6f1e3 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java @@ -68,7 +68,7 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumerImpl { rootDir = System.getenv(DMAAPLISTENERROOT); if ((rootDir == null) || (rootDir.length() == 0)) { - rootDir = "/opt/app/dmaap-listener/lib/"; + rootDir = "/opt/onap/sdnc/dmaap-listener/lib/"; } else { rootDir = rootDir + "/lib/"; -- cgit 1.2.3-korg From 1ed8346da11ee15694246c432a8ac3b27bce2468 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Thu, 4 Jun 2020 19:02:10 -0500 Subject: Aiign requestID, subrequestID for DMAAP msgs Updated DMAAP listener to keep track of requestID and subRequestID for DMAAP message publication. These values are sent to DG as part of SLI parms Issue-ID: CCSDK-2413 Signed-off-by: SandeepLinux Change-Id: I207a7d1223416475de0b44ba80944ed2f4f57305 --- .../dmaapclient/OofPciPocDmaapConsumers.java | 65 ++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java index e8dacb959..9ff6fd616 100644 --- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/OofPciPocDmaapConsumers.java @@ -64,6 +64,16 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { private static final String RPC_NAME = "rpc-name"; private static final String BODY = "body"; private static final String INPUT = "input"; + private static final String COMMON_HEADER = "CommonHeader"; + private static final String TIME_STAMP = "TimeStamp"; + private static final String REQUEST_ID = "RequestID"; + private static final String SUB_REQUEST_ID = "SubRequestID"; + + private static final String TIME_STAMP_FOR_SLI = "timeStamp"; + private static final String REQUEST_ID_FOR_SLI = "requestID"; + private static final String SUB_REQUEST_ID_FOR_SLI = "subRequestID"; + + private static final String CONFIGURATION_PHY_CELL_ID_INPUT = "configuration-phy-cell-id-input."; private static final String EMPTY = ""; private static final String ESCAPE_SEQUENCE_QUOTES = "\""; @@ -104,9 +114,9 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { protected String publish(String templatePath, String jsonString, JsonNode configurationsOrDataNode, boolean invokePciChangesPublish, boolean invokeAnrChangesPublish) throws IOException, InvalidMessageException { if (invokePciChangesPublish){ - return publishPciChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode); + return publishPciChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode, jsonString); } else if (invokeAnrChangesPublish){ - return publishANRChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode); + return publishANRChangesFromPolicyToSDNR(templatePath, configurationsOrDataNode, jsonString); } else { return publishFullMessage(templatePath, jsonString); } @@ -138,7 +148,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { return writer.toString(); } - private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode) throws IOException, InvalidMessageException + private String publishANRChangesFromPolicyToSDNR(String templatePath, JsonNode dataNode, String msg) throws IOException, InvalidMessageException { VelocityContext context = new VelocityContext(); @@ -156,6 +166,29 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { JSONObject alias = new JSONObject(); JSONArray sliParametersArray = new JSONArray(); + ObjectMapper oMapper = new ObjectMapper(); + + JsonNode dmaapMessageRootNode; + try { + dmaapMessageRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode commonHeader = dmaapMessageRootNode.get(BODY).get(INPUT).get(COMMON_HEADER); + + JsonNode timeStamp = commonHeader.get(TIME_STAMP); + + JsonNode requestID = commonHeader.get(REQUEST_ID); + + JsonNode subRequestID = commonHeader.get(SUB_REQUEST_ID); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+TIME_STAMP_FOR_SLI).put(STRING_VALUE,timeStamp)); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+REQUEST_ID_FOR_SLI).put(STRING_VALUE,requestID)); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, GENERIC_NEIGHBOR_CONFIGURATION_INPUT+SUB_REQUEST_ID_FOR_SLI).put(STRING_VALUE,subRequestID)); + String aliasValue = dataNode.get(DATA).get(FAP_SERVICE).get(ALIAS_LABEL).textValue(); JsonNode nbrListInUse = dataNode.get(DATA).get(FAP_SERVICE).get(CELL_CONFIG).get(LTE).get(RAN).get(NEIGHBOR_LIST_IN_USE).get(LTE_CELL); @@ -203,7 +236,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { } - private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode) throws IOException, InvalidMessageException + private String publishPciChangesFromPolicyToSDNR(String templatePath, JsonNode configurationsJsonNode, String msg) throws IOException, InvalidMessageException { String RPC_NAME_KEY_IN_VT = "rpc_name"; String RPC_NAME_VALUE_IN_VT = "configuration-phy-cell-id"; @@ -217,6 +250,29 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { JsonNode configurations = configurationsJsonNode.get(CONFIGURATIONS); + ObjectMapper oMapper = new ObjectMapper(); + + JsonNode dmaapMessageRootNode; + try { + dmaapMessageRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse json object", e); + } + + JsonNode commonHeader = dmaapMessageRootNode.get(BODY).get(INPUT).get(COMMON_HEADER); + + JsonNode timeStamp = commonHeader.get(TIME_STAMP); + + JsonNode requestID = commonHeader.get(REQUEST_ID); + + JsonNode subRequestID = commonHeader.get(SUB_REQUEST_ID); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, CONFIGURATION_PHY_CELL_ID_INPUT+TIME_STAMP_FOR_SLI).put(STRING_VALUE,timeStamp)); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, CONFIGURATION_PHY_CELL_ID_INPUT+REQUEST_ID_FOR_SLI).put(STRING_VALUE,requestID)); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, CONFIGURATION_PHY_CELL_ID_INPUT+SUB_REQUEST_ID_FOR_SLI).put(STRING_VALUE,subRequestID)); + int entryCount = 0; if(configurations.isArray()) { @@ -390,6 +446,7 @@ public class OofPciPocDmaapConsumers extends SdncDmaapConsumerImpl { return; } + if(!MODIFY_CONFIG.equals(action.textValue())) { LOG.info("Unknown Action {}", action); return; -- cgit 1.2.3-korg From 6d6539407e4c28aae0c321835bbf754086fb7791 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 6 Aug 2020 15:21:47 -0400 Subject: Roll to next snapshot Roll to snapshot version 1.0.1-SNAPSHOT Change-Id: I1fd08b6b4de998d0bc2e7acb03fcf4c87eeae165 Issue-ID: CCSDK-2635 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-asdcApi/pom.xml | 4 ++-- features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- features/ccsdk-dataChange/pom.xml | 4 ++-- features/ccsdk-lcm/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 2 +- 29 files changed, 57 insertions(+), 57 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index dcbb22d7e..16a147cf8 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index f68cbeab3..cb2a8c8e2 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 03255e132..3e2b46f91 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index cf811281c..3bc7079ca 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index bdf9c5e70..7024ddfe4 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index cd5d5b151..6d00e438a 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index c281e355b..04a361aa9 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 0d7f8e0ce..2a19680dc 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index a9f72b1ce..2095afe21 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 3bbd645b1..b96c29403 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 54fdeeb66..6551501e8 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 04b4019ef..452d80f8b 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index d0010702f..666aeec4b 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index a6c4eea5c..6325baf45 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 837630272..a1a44b6eb 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index b5ca937cf..8df21287b 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index a4c509e30..c281d47d8 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 39b1788e5..5260757a2 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 99c5ee499..e4a7175d6 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index f8804b001..76c5913cb 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 4ebbe27d0..7acb7a660 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index e2b59a01e..32b90e383 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index ac6e7554f..c889970e3 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 5fc328cad..7ca82d4dc 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 1eec115e6..138447bd7 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index b7f9fe837..c9d927034 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 1db4911bc..b5f67110e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT pom ccsdk-sli-northbound diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 1df9f35b2..49084e5dd 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index feea7088f..6e5a89dbc 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=1 sprint_number=0 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From e73281177c4d6069d410a47d152cdaf598d09dac Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Wed, 2 Sep 2020 17:50:30 -0500 Subject: DMAAP Listener for ranSlice Feature support DMAAP listener for ranSlide related DMAAP messages from Policy and other ONAP components Issue-ID: CCSDK-2722 Signed-off-by: SandeepLinux Change-Id: I14267bc5247a383039ab11ada82d67b0f3f3c13c --- .../dmaapclient/SdncRANSliceDmaapConsumer.java | 92 ++++++++++++ .../dmaapclient/TestSdncRANSliceDmaapConsumer.java | 166 +++++++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncRANSliceDmaapConsumer.java create mode 100644 dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncRANSliceDmaapConsumer.java (limited to 'dmaap-listener') diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncRANSliceDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncRANSliceDmaapConsumer.java new file mode 100644 index 000000000..f1749f99b --- /dev/null +++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncRANSliceDmaapConsumer.java @@ -0,0 +1,92 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * Modifications Copyright © 2018 IBM. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SdncRANSliceDmaapConsumer extends SdncDmaapConsumerImpl { + + private static final Logger LOG = LoggerFactory.getLogger(SdncRANSliceDmaapConsumer.class); + + private static final String BODY = "body"; + private static final String RPC = "rpc-name"; + + @Override + public void processMsg(String msg) throws InvalidMessageException { + + if (msg == null) { + throw new InvalidMessageException("Null RANSlice message"); + } + + ObjectMapper oMapper = new ObjectMapper(); + JsonNode ranSliceRootNode; + try { + ranSliceRootNode = oMapper.readTree(msg); + } catch (Exception e) { + throw new InvalidMessageException("Cannot parse RANSlice json input", e); + } + + JsonNode bodyNode = ranSliceRootNode.get(BODY); + if(bodyNode == null) { + LOG.warn("Missing body in RANSlice message"); + return; + } + String rpcMsgbody; + try { + ObjectMapper mapper = new ObjectMapper(); + rpcMsgbody = mapper.writeValueAsString(bodyNode); + + } catch (Exception e) { + LOG.error("Unable to parse body in RANSlice message", e); + return; + } + + JsonNode rpcNode = ranSliceRootNode.get(RPC); + if(rpcNode == null) { + LOG.warn("Missing node in RANSlice message- " + RPC); + return; + } + String rpc = rpcNode.textValue(); + String sdncEndpoint = "ran-slice-api:" + rpc; + + try { + String odlUrlBase = getProperty("sdnc.odl.url-base"); + String odlUser = getProperty("sdnc.odl.user"); + String odlPassword = getProperty("sdnc.odl.password"); + LOG.info("POST RANSlice Request " + rpcMsgbody); + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.warn("Unable to POST RANSlice message. SDNC URL not available. body:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } +} diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncRANSliceDmaapConsumer.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncRANSliceDmaapConsumer.java new file mode 100644 index 000000000..50c427ec1 --- /dev/null +++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncRANSliceDmaapConsumer.java @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. + * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. + * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. + * Vestibulum commodo. Ut rhoncus gravida arcu. + */ + +package org.onap.ccsdk.sli.northbound.dmaapclient; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class TestSdncRANSliceDmaapConsumer { + private static final String ranSliceInput = + "{\r\n" + + " \"version\": \"ranSlice-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"ranSlice-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"ranSlice-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"ranSlice-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"ranSlice-dmaap.flags.mode\",\r\n" + + " \"force\": \"ranSlice-dmaap.flags.force\",\r\n" + + " \"mode\": \"ranSlice-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"ranSlice-dmaap.originator-id\",\r\n" + + " \"request-id\": \"ranSlice-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"ranSlice-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"ranSlice-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"ranSlice-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + + @Test + public void test() throws Exception { + Properties props = new Properties(); + + SdncRANSliceDmaapConsumer consumer = new SdncRANSliceDmaapConsumer(); + InputStream propStr = TestSdncRANSliceDmaapConsumer.class.getResourceAsStream("/dmaap-consumer-1.properties"); + props.load(propStr); + consumer.init(props, "src/test/resources/dmaap-consumer-1.properties"); + consumer.processMsg(ranSliceInput); + } + + @Test(expected = InvalidMessageException.class) + public void testProcessMsgNullMessage() throws Exception { + SdncRANSliceDmaapConsumer consumer = new SdncRANSliceDmaapConsumer(); + consumer.processMsg(null); + } + + @Test + public void testProcessMsgMissingBody() throws Exception { + String msg = "{\r\n" + + " \"version\": \"ranSlice-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"ranSlice-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"ranSlice-dmaap.type\",\r\n" + + " \"body1\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"ranSlice-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"ranSlice-dmaap.flags.mode\",\r\n" + + " \"force\": \"ranSlice-dmaap.flags.force\",\r\n" + + " \"mode\": \"ranSlice-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"ranSlice-dmaap.originator-id\",\r\n" + + " \"request-id\": \"ranSlice-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"ranSlice-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"ranSlice-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"ranSlice-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + SdncRANSliceDmaapConsumer consumer = new SdncRANSliceDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidRPC() throws Exception { + String msg = "{\r\n" + + " \"version\": \"ranSlice-dmaap.version\",\r\n" + + " \"cambria.partition\": \"SDNC\",\r\n" + + " \"correlation-id\": \"ranSlice-dmaap.correlation-id\",\r\n" + + " \"rpc-name1\": \"upgrade-software\",\r\n" + + " \"type\": \"ranSlice-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"ranSlice-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"ranSlice-dmaap.flags.mode\",\r\n" + + " \"force\": \"ranSlice-dmaap.flags.force\",\r\n" + + " \"mode\": \"ranSlice-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"ranSlice-dmaap.originator-id\",\r\n" + + " \"request-id\": \"ranSlice-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"ranSlice-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"ranSlice-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"ranSlice-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + SdncRANSliceDmaapConsumer consumer = new SdncRANSliceDmaapConsumer(); + consumer.processMsg(msg); + } + + @Test + public void testProcessMsgInvalidPartition() throws Exception { + String msg = "{\r\n" + + " \"version\": \"ranSlice-dmaap.version\",\r\n" + + " \"cambria.partition\": \"BAD\",\r\n" + + " \"correlation-id\": \"ranSlice-dmaap.correlation-id\",\r\n" + + " \"rpc-name\": \"upgrade-software\",\r\n" + + " \"type\": \"ranSlice-dmaap.type\",\r\n" + + " \"body\": {\r\n" + + " \"input\": {\r\n" + + " \"common-header\": {\r\n" + + " \"api-ver\": \"ranSlice-dmaap.api-ver\",\r\n" + + " \"flags\": {\r\n" + + " \"ttl\": \"ranSlice-dmaap.flags.mode\",\r\n" + + " \"force\": \"ranSlice-dmaap.flags.force\",\r\n" + + " \"mode\": \"ranSlice-dmaap.flags.mode\"\r\n" + + " },\r\n" + + " \"originator-id\": \"ranSlice-dmaap.originator-id\",\r\n" + + " \"request-id\": \"ranSlice-dmaap.request-id\",\r\n" + + " \"sub-request-id\": \"ranSlice-dmaap.sub-request-id\",\r\n" + + " \"timestamp\": \"ranSlice-dmaap.timestamp\"\r\n" + + " },\r\n" + + " \"payload\": \"ranSlice-dmaap.payload\"\r\n" + + " }\r\n" + + " }\r\n" + + "}"; + + + SdncRANSliceDmaapConsumer consumer = new SdncRANSliceDmaapConsumer(); + consumer.processMsg(msg); + } +} -- cgit 1.2.3-korg From f80e79706a7cd030f7a6185da8ccf920e125b0c5 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 9 Sep 2020 17:38:04 -0400 Subject: Roll to initial Honolulu release version Roll master branch to initial Honolulu release version Change-Id: I9a355141a5234f08fd09d0712b4b9d6166d01f11 Issue-ID: CCSDK-2742 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 4 ++-- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 4 ++-- dmaap-listener/pom.xml | 4 ++-- features/ccsdk-asdcApi/pom.xml | 4 ++-- features/ccsdk-daexim-offsite-backup/pom.xml | 4 ++-- features/ccsdk-dataChange/pom.xml | 4 ++-- features/ccsdk-lcm/pom.xml | 4 ++-- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- ueb-listener/pom.xml | 4 ++-- version.properties | 4 ++-- 29 files changed, 58 insertions(+), 58 deletions(-) (limited to 'dmaap-listener') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 16a147cf8..f18e900df 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index cb2a8c8e2..41150f044 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 3e2b46f91..ac2ee86e1 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 3bc7079ca..0c2abb6e4 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 7024ddfe4..618d463a5 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 6d00e438a..24e3cce7d 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index 04a361aa9..c211c8049 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 2a19680dc..f9bc47407 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 2095afe21..26010c7d2 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index b96c29403..d6fef43b5 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 6551501e8..9e305f634 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 452d80f8b..01e366ac5 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 666aeec4b..7d0065170 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6325baf45..6585f0aae 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index a1a44b6eb..5b265dc3a 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index 8df21287b..bba1dd94b 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index c281d47d8..001dbd3e5 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 5260757a2..101d21eda 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index e4a7175d6..6ad30b881 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 76c5913cb..548605e25 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 7acb7a660..cc681d33a 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 32b90e383..de7679586 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index c889970e3..62e0a122e 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 7ca82d4dc..67d455e05 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 138447bd7..2d9cb6f77 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index c9d927034..f08ca79c7 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index b5f67110e..6ddb50ebe 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT pom ccsdk-sli-northbound diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 49084e5dd..63b2fdf79 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index 6e5a89dbc..60b87d41c 100644 --- a/version.properties +++ b/version.properties @@ -4,8 +4,8 @@ # because they are used in Jenkins, whose plug-in doesn't support release_name=1 -sprint_number=0 -feature_revision=1 +sprint_number=1 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 46c69f518bd200e25d46f28cc32473ba08cdfe3d Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 25 Nov 2020 16:07:46 -0500 Subject: Release version 1.1.0 of sli/northbound Release initial Honolulu version of sli/northbound and roll version to next snapshot Change-Id: I21ee4f2431d6e15573998fd615fc2090aee15810 Issue-ID: CCSDK-3002 Signed-off-by: Dan Timoney --- .gitignore | 1 + artifacts/pom.xml | 4 ++-- asdcApi/installer/pom.xml | 4 ++-- asdcApi/model/pom.xml | 4 ++-- asdcApi/pom.xml | 4 ++-- asdcApi/provider/pom.xml | 5 ++--- daexim-offsite-backup/installer/pom.xml | 4 ++-- daexim-offsite-backup/model/pom.xml | 4 ++-- daexim-offsite-backup/pom.xml | 4 ++-- daexim-offsite-backup/provider/pom.xml | 4 ++-- dataChange/installer/pom.xml | 4 ++-- dataChange/model/pom.xml | 4 ++-- dataChange/pom.xml | 4 ++-- dataChange/provider/pom.xml | 5 ++--- dmaap-listener/pom.xml | 6 +++--- features/ccsdk-asdcApi/pom.xml | 5 ++--- features/ccsdk-daexim-offsite-backup/pom.xml | 8 ++------ features/ccsdk-dataChange/pom.xml | 5 ++--- features/ccsdk-lcm/pom.xml | 5 ++--- features/ccsdk-sli-northbound-all/pom.xml | 4 ++-- features/features-sli-northbound/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- lcm/installer/pom.xml | 4 ++-- lcm/model/pom.xml | 4 ++-- lcm/pom.xml | 4 ++-- lcm/provider/pom.xml | 5 ++--- pom.xml | 4 ++-- releases/1.1.0.yaml | 5 +++++ ueb-listener/pom.xml | 8 ++++---- version.properties | 2 +- 31 files changed, 66 insertions(+), 70 deletions(-) create mode 100644 releases/1.1.0.yaml (limited to 'dmaap-listener') diff --git a/.gitignore b/.gitignore index 7943e8332..6b9838c77 100755 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ org.eclipse.core.resources.prefs .idea .externalToolBuilders .checkstyle +.factorypath maven-eclipse.xml workspace diff --git a/artifacts/pom.xml b/artifacts/pom.xml index f18e900df..c4fca9fb6 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 41150f044..bbdeb0cba 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound asdcApi-installer - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index ac2ee86e1..53fed3587 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound asdcApi-model - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 0c2abb6e4..b5cea9931 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound asdcApi - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 618d463a5..97c4ba9aa 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound asdcApi-provider - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 24e3cce7d..6fbabb426 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound daexim-offsite-backup-installer - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/model/pom.xml b/daexim-offsite-backup/model/pom.xml index c211c8049..4f338c786 100755 --- a/daexim-offsite-backup/model/pom.xml +++ b/daexim-offsite-backup/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound daexim-offsite-backup-model - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index f9bc47407..aa98f5137 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound daexim-offsite-backup - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: daexim-offsite-backup diff --git a/daexim-offsite-backup/provider/pom.xml b/daexim-offsite-backup/provider/pom.xml index 26010c7d2..8d060bb94 100755 --- a/daexim-offsite-backup/provider/pom.xml +++ b/daexim-offsite-backup/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound daexim-offsite-backup-provider - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index d6fef43b5..60217baa6 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound dataChange-installer - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 9e305f634..bce47e949 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound dataChange-model - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 01e366ac5..6110bdf1d 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound dataChange - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 7d0065170..cdefb5437 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound dataChange-provider - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 6585f0aae..65e43886c 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound dmaap-listener - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener @@ -24,7 +24,7 @@ ${maven.build.timestamp} ${project.version}-${build.number} - ${project.version} + 1.1.0 ${project.version} diff --git a/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 5b265dc3a..a744c4a08 100644 --- a/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index bba1dd94b..6f57b66ea 100644 --- a/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml @@ -5,21 +5,17 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-daexim-offsite-backup - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId} - - ${project.version} - - org.opendaylight.controller diff --git a/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 001dbd3e5..ada12eccc 100644 --- a/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-dataChange - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 101d21eda..013786d24 100644 --- a/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-lcm - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 6ad30b881..fc7081fbc 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 548605e25..37f961b9e 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound features-sli-northbound - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index cc681d33a..b87f855b8 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index de7679586..88a4cbbec 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index 62e0a122e..75bc22ac4 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound lcm-installer - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 67d455e05..916345f68 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound lcm-model - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/pom.xml b/lcm/pom.xml index 2d9cb6f77..e210b2451 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound lcm - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index f08ca79c7..03f34e6ba 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,19 +5,18 @@ org.onap.ccsdk.parent binding-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound lcm-provider - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} - ${project.version} ${project.version} diff --git a/pom.xml b/pom.xml index 6ddb50ebe..8943a216b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ccsdk-sli-northbound - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom ccsdk-sli-northbound diff --git a/releases/1.1.0.yaml b/releases/1.1.0.yaml new file mode 100644 index 000000000..5ac19ffcf --- /dev/null +++ b/releases/1.1.0.yaml @@ -0,0 +1,5 @@ +--- +distribution_type: 'maven' +version: '1.1.0' +project: 'ccsdk-sli-northbound' +log_dir: 'ccsdk-sli-northbound-maven-stage-master/305/' diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 63b2fdf79..9e04efb07 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent standalone-parent - 2.1.0-SNAPSHOT + 2.1.0 org.onap.ccsdk.sli.northbound ueb-listener - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener @@ -22,10 +22,10 @@ yyyyMMdd'T'HHmmss'Z' ${maven.build.timestamp} ${project.version}-${build.number} - ${project.version} + 1.1.0 ${project.version} 1.4.1 - 1.6.5 + 1.6.5 diff --git a/version.properties b/version.properties index 60b87d41c..8c043844d 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=1 sprint_number=1 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg