diff options
author | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-06-15 16:13:55 -0400 |
---|---|---|
committer | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-06-15 16:13:55 -0400 |
commit | a7d1da3308031c3cce5e2e09b1f2727f1fceef02 (patch) | |
tree | 2a507f625b889293f11ab01e642104a34b6bbb3a | |
parent | 1a71779b7b1104ba6d5e289e6dc839bb4b9493d5 (diff) |
Update sli/core to ODL Oxygen
Update sli/core artifacts to compile cleanly against ODL Oxygen
version of CCSDK parent poms.
Change-Id: I9f3b4c40b1ae62cdda1c35836466f8faf7da3b39
Issue-ID: CCSDK-280
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
-rw-r--r-- | dblib/features/ccsdk-dblib/pom.xml | 33 | ||||
-rw-r--r-- | dblib/features/ccsdk-dblib/src/main/feature/feature.xml | 9 | ||||
-rwxr-xr-x | dblib/provider/pom.xml | 162 | ||||
-rw-r--r-- | filters/features/ccsdk-filters/pom.xml | 25 | ||||
-rwxr-xr-x | filters/provider/pom.xml | 14 | ||||
-rw-r--r-- | filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseDbLoggingFilter.java | 299 | ||||
-rw-r--r-- | filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java | 28 | ||||
-rw-r--r-- | filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java | 36 | ||||
-rwxr-xr-x | sli/common/pom.xml | 29 | ||||
-rw-r--r-- | sli/features/odl-sli/pom.xml | 31 | ||||
-rwxr-xr-x | sli/provider/pom.xml | 176 | ||||
-rwxr-xr-x | sli/recording/pom.xml | 93 | ||||
-rw-r--r-- | sliPluginUtils/features/ccsdk-sliPluginUtils/pom.xml | 17 | ||||
-rwxr-xr-x | sliPluginUtils/provider/pom.xml | 5 | ||||
-rw-r--r-- | sliapi/features/ccsdk-sliapi/pom.xml | 21 | ||||
-rwxr-xr-x | sliapi/provider/pom.xml | 18 | ||||
-rw-r--r-- | utils/provider/pom.xml | 11 |
17 files changed, 320 insertions, 687 deletions
diff --git a/dblib/features/ccsdk-dblib/pom.xml b/dblib/features/ccsdk-dblib/pom.xml index 3a2f7a1bc..5d05f84b3 100644 --- a/dblib/features/ccsdk-dblib/pom.xml +++ b/dblib/features/ccsdk-dblib/pom.xml @@ -17,31 +17,8 @@ <name>ccsdk-sli-core :: dblib :: ${project.artifactId}</name> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>mdsal-model-artifacts</artifactId> - <version>0.11.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> + <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>odl-mdsal-broker</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> <dependency> <groupId>${project.groupId}</groupId> @@ -64,16 +41,10 @@ <artifactId>utils-provider</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - <scope>provided</scope> - </dependency> + <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> - <version>10.11.1.1</version> </dependency> </dependencies> diff --git a/dblib/features/ccsdk-dblib/src/main/feature/feature.xml b/dblib/features/ccsdk-dblib/src/main/feature/feature.xml index 514ce8de4..771c37455 100644 --- a/dblib/features/ccsdk-dblib/src/main/feature/feature.xml +++ b/dblib/features/ccsdk-dblib/src/main/feature/feature.xml @@ -1,14 +1,13 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="ccsdk-dblib"> - <repository>mvn:org.opendaylight.controller/odl-mdsal-broker/1.6.1/xml/features</repository> + <feature name="ccsdk-dblib" description="ccsdk-sli-core :: dblib :: ccsdk-dblib" version="${project.version}"> <details>Root POM to be used in place of odlparent for CCSDK based projects</details> - <feature version="1.6.1" prerequisite="false" dependency="false">odl-mdsal-broker</feature> <feature prerequisite="true" dependency="false">wrap</feature> <bundle>mvn:org.onap.ccsdk.sli.core/dblib-provider/${project.version}</bundle> - <bundle>mvn:org.mariadb.jdbc/mariadb-java-client/2.1.1</bundle> - <bundle>wrap:mvn:org.apache.tomcat/tomcat-jdbc/8.5.14/$DynamicImport-Package=org.mariadb.*,org.apache.derby.*&overwrite=merge</bundle> - <bundle>wrap:mvn:org.apache.tomcat/tomcat-juli/8.5.14/$DynamicImport-Package=org.mariadb.*,org.apache.derby.*&overwrite=merge</bundle> + <bundle>mvn:org.mariadb.jdbc/mariadb-java-client/${mariadb.connector.version}</bundle> + <bundle>wrap:mvn:org.apache.tomcat/tomcat-jdbc/${tomcat-jdbc.version}/$DynamicImport-Package=org.mariadb.*,org.apache.derby.*&overwrite=merge</bundle> + <bundle>wrap:mvn:org.apache.tomcat/tomcat-juli/${tomcat-jdbc.version}/$DynamicImport-Package=org.mariadb.*,org.apache.derby.*&overwrite=merge</bundle> <bundle>mvn:org.onap.ccsdk.sli.core/utils-provider/${project.version}</bundle> </feature> </features> diff --git a/dblib/provider/pom.xml b/dblib/provider/pom.xml index e263374a9..78e701654 100755 --- a/dblib/provider/pom.xml +++ b/dblib/provider/pom.xml @@ -1,91 +1,87 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> - <relativePath /> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath /> + </parent> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>bundle</packaging> - <name>ccsdk-sli-core :: dblib :: ${project.artifactId}</name> - <url>http://maven.apache.org</url> + <name>ccsdk-sli-core :: dblib :: ${project.artifactId}</name> + <url>http://maven.apache.org</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl-over-slf4j</artifactId> - <version>${slf4j.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>${slf4j.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${mariadb.connector.version}</version> - </dependency> - <dependency> - <groupId>org.apache.tomcat</groupId> - <artifactId>tomcat-jdbc</artifactId> - <version>${tomcat-jdbc.version}</version> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>utils-provider</artifactId> - <version>${project.version}</version> - </dependency> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${mariadb.connector.version}</version> + </dependency> + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jdbc</artifactId> + <version>${tomcat-jdbc.version}</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>utils-provider</artifactId> + <version>${project.version}</version> + </dependency> - <!-- Testing related dependencies --> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.karaf.shell</groupId> - <artifactId>org.apache.karaf.shell.console</artifactId> - <version>${karaf.plugin.version}</version> - </dependency> - </dependencies> + <!-- Testing related dependencies --> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.karaf.shell</groupId> + <artifactId>org.apache.karaf.shell.console</artifactId> + </dependency> + </dependencies> </project> diff --git a/filters/features/ccsdk-filters/pom.xml b/filters/features/ccsdk-filters/pom.xml index b35f5ec9e..a995790d5 100644 --- a/filters/features/ccsdk-filters/pom.xml +++ b/filters/features/ccsdk-filters/pom.xml @@ -17,31 +17,8 @@ <name>ccsdk-sli-core :: filters :: ${project.artifactId}</name> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>mdsal-model-artifacts</artifactId> - <version>0.11.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> + <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>odl-mdsal-broker</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> <dependency> <groupId>${project.groupId}</groupId> diff --git a/filters/provider/pom.xml b/filters/provider/pom.xml index dd78b2a64..c7d356ba3 100755 --- a/filters/provider/pom.xml +++ b/filters/provider/pom.xml @@ -42,27 +42,23 @@ </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> - <version>${slf4j.version}</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>${commons.codec.version}</version> </dependency> <dependency> <groupId>org.onap.ccsdk.sli.core</groupId> diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseDbLoggingFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseDbLoggingFilter.java deleted file mode 100644 index 359136565..000000000 --- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseDbLoggingFilter.java +++ /dev/null @@ -1,299 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : CCSDK - * ================================================================================ - * 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.core.filters; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.util.zip.GZIPInputStream; - -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletInputStream; -import javax.servlet.ServletOutputStream; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; - -import org.onap.ccsdk.sli.core.sli.MessageWriter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Deprecated -public class RequestResponseDbLoggingFilter implements Filter { - - private static Logger log = LoggerFactory.getLogger(RequestResponseDbLoggingFilter.class); - - public static final String REQUEST_ID = "X-ECOMP-RequestID"; - - private static class ByteArrayServletStream extends ServletOutputStream { - - ByteArrayOutputStream baos; - - ByteArrayServletStream(ByteArrayOutputStream baos) { - this.baos = baos; - } - - @Override - public void write(int param) throws IOException { - baos.write(param); - } - } - - private static class ByteArrayPrintWriter { - - private ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - private PrintWriter pw = new PrintWriter(baos); - - private ServletOutputStream sos = new ByteArrayServletStream(baos); - - public PrintWriter getWriter() { - return pw; - } - - public ServletOutputStream getStream() { - return sos; - } - - byte[] toByteArray() { - return baos.toByteArray(); - } - } - - private class BufferedServletInputStream extends ServletInputStream { - - ByteArrayInputStream bais; - - public BufferedServletInputStream(ByteArrayInputStream bais) { - this.bais = bais; - } - - @Override - public int available() { - return bais.available(); - } - - @Override - public int read() { - return bais.read(); - } - - @Override - public int read(byte[] buf, int off, int len) { - return bais.read(buf, off, len); - } - - } - - private class BufferedRequestWrapper extends HttpServletRequestWrapper { - - ByteArrayInputStream bais; - - ByteArrayOutputStream baos; - - BufferedServletInputStream bsis; - - byte[] buffer; - - public BufferedRequestWrapper(HttpServletRequest req) throws IOException { - super(req); - - InputStream is = req.getInputStream(); - baos = new ByteArrayOutputStream(); - byte buf[] = new byte[1024]; - int letti; - while ((letti = is.read(buf)) > 0) { - baos.write(buf, 0, letti); - } - buffer = baos.toByteArray(); - - } - - @Override - public ServletInputStream getInputStream() { - try { - bais = new ByteArrayInputStream(buffer); - bsis = new BufferedServletInputStream(bais); - } catch (Exception ex) { - ex.printStackTrace(); - } - - return bsis; - } - - public byte[] getBuffer() { - return buffer; - } - - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } - - @Override - public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain filterChain) - throws IOException, ServletException { - - if (request == null || !(request instanceof HttpServletRequest)) { - filterChain.doFilter(request, response); - return; - } - - long t1 = System.currentTimeMillis(); - - final HttpServletRequest httpRequest = (HttpServletRequest) request; - BufferedRequestWrapper bufferedRequest = new BufferedRequestWrapper(httpRequest); - - String requestId = httpRequest.getHeader(REQUEST_ID); - if (requestId == null || requestId.trim().length() == 0) { - log.warn("Could not write request in DB: " + REQUEST_ID + " is missing in the HTTP headers."); - return; - } - - String requestHost = request.getRemoteHost(); - if (requestHost == null) - requestHost = request.getRemoteAddr(); - - String requestStr = new String(bufferedRequest.getBuffer()); - - MessageWriter.saveIncomingRequest(requestId, null, requestHost, requestStr); - - long t2 = System.currentTimeMillis(); - - log.info("Request saved in DB for request-id: " + requestId + ". TIme: " + (t2 - t1)); - - final HttpServletResponse httpResponse = (HttpServletResponse) response; - - final ByteArrayPrintWriter pw = new ByteArrayPrintWriter(); - HttpServletResponse wrappedResp = new HttpServletResponseWrapper(httpResponse) { - - @Override - public PrintWriter getWriter() { - return pw.getWriter(); - } - - @Override - public ServletOutputStream getOutputStream() { - return pw.getStream(); - } - }; - - try { - - filterChain.doFilter(bufferedRequest, wrappedResp); - - } finally { - - if (request != null && request instanceof HttpServletRequest) { - - t1 = System.currentTimeMillis(); - - byte[] bytes = pw.toByteArray(); - response.getOutputStream().write(bytes); - response.getOutputStream().flush(); - - String responseStr = null; - if ("gzip".equals(httpResponse.getHeader("Content-Encoding"))) { - responseStr = decompressGZIPByteArray(bytes); - } else { - responseStr = new String(bytes); - } - - MessageWriter.saveIncomingResponse(requestId, httpResponse.getStatus(), responseStr); - - t2 = System.currentTimeMillis(); - - log.info("Response saved in DB for request-id: " + requestId + ". TIme: " + (t2 - t1)); - } - } - - } - - @Override - public void destroy() { - } - - private String decompressGZIPByteArray(byte[] bytes) { - - BufferedReader in = null; - InputStreamReader inR = null; - ByteArrayInputStream byteS = null; - GZIPInputStream gzS = null; - StringBuilder str = new StringBuilder(); - try { - byteS = new ByteArrayInputStream(bytes); - gzS = new GZIPInputStream(byteS); - inR = new InputStreamReader(gzS); - in = new BufferedReader(inR); - - if (in != null) { - - String content; - - while ((content = in.readLine()) != null) { - str.append(content); - } - } - - } catch (Exception e) { - log.error("Failed get read GZIPInputStream", e); - } finally { - - if (byteS != null) - try { - byteS.close(); - } catch (IOException e1) { - log.error("Failed to close ByteStream", e1); - } - if (gzS != null) - try { - gzS.close(); - } catch (IOException e2) { - log.error("Failed to close GZStream", e2); - } - if (inR != null) - try { - inR.close(); - } catch (IOException e3) { - log.error("Failed to close InputReader", e3); - } - if (in != null) - try { - in.close(); - } catch (IOException e) { - log.error("Failed to close BufferedReader", e); - } - } - return str.toString(); - } -} diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java index 440aa41bd..ffe6d71d6 100644 --- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java +++ b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java @@ -34,11 +34,13 @@ import java.util.zip.GZIPInputStream; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; +import javax.servlet.ReadListener; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; @@ -60,6 +62,17 @@ public class RequestResponseLoggingFilter implements Filter { public void write(int param) throws IOException { baos.write(param); } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener arg0) { + + + } } private static class ByteArrayPrintWriter { @@ -106,6 +119,21 @@ public class RequestResponseLoggingFilter implements Filter { return bais.read(buf, off, len); } + @Override + public boolean isFinished() { + return available() < 1; + } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setReadListener(ReadListener arg0) { + + } + } private class BufferedRequestWrapper extends HttpServletRequestWrapper { diff --git a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java index 9f36fe11e..7ce856e68 100644 --- a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java +++ b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java @@ -18,9 +18,11 @@ import java.util.LinkedList; import java.util.UUID; import java.util.Vector; import javax.servlet.FilterChain; +import javax.servlet.ReadListener; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.codec.binary.Base64; @@ -58,6 +60,30 @@ public class TestRequestResponseLoggingFilter { } + @Override + public boolean isFinished() { + try { + return stream.available() < 1; + } catch (IOException e) { + return true; + } + } + + + @Override + public boolean isReady() { + // TODO Auto-generated method stub + return true; + } + + + @Override + public void setReadListener(ReadListener arg0) { + // TODO Auto-generated method stub + + } + + } @@ -74,6 +100,16 @@ public class TestRequestResponseLoggingFilter { ostr.write(b); } + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener arg0) { + + } + } /** diff --git a/sli/common/pom.xml b/sli/common/pom.xml index 7f5ac8074..ebb4f0953 100755 --- a/sli/common/pom.xml +++ b/sli/common/pom.xml @@ -24,50 +24,36 @@ </properties> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> + <dependencies> <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> - <version>10.11.1.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> - <version>${antlr.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> - <version>1.7.5</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>${commons.lang3.version}</version> - </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <version>${osgi.core.version}</version> + <scope>provided</scope> + </dependency> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> @@ -128,7 +114,6 @@ <plugin> <groupId>org.antlr</groupId> <artifactId>antlr4-maven-plugin</artifactId> - <version>${antlr.version}</version> <executions> <execution> <configuration> diff --git a/sli/features/odl-sli/pom.xml b/sli/features/odl-sli/pom.xml index 4d0143664..f108726da 100644 --- a/sli/features/odl-sli/pom.xml +++ b/sli/features/odl-sli/pom.xml @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -19,19 +21,20 @@ <dependencyManagement> <dependencies> <dependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>mdsal-model-artifacts</artifactId> - <version>0.11.1</version> + <groupId>org.opendaylight.controller</groupId> + <artifactId>mdsal-artifacts</artifactId> + <version>${odl.mdsal.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>mdsal-model-artifacts</artifactId> + <version>${odl.mdsal.model.version}</version> <type>pom</type> <scope>import</scope> </dependency> + </dependencies> </dependencyManagement> <dependencies> @@ -73,17 +76,7 @@ <type>xml</type> <classifier>features</classifier> </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>odl-mdsal-broker</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - <scope>provided</scope> - </dependency> + + </dependencies> </project> diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml index ebba283d2..aed348303 100755 --- a/sli/provider/pom.xml +++ b/sli/provider/pom.xml @@ -1,109 +1,97 @@ <?xml version="1.0"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> - <relativePath /> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath /> + </parent> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>bundle</packaging> - <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> - <description>SLI Provider is the OSGi bundle that exposes the service logic interpreter as a service.</description> + <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> + <description>SLI Provider is the OSGi bundle that exposes the service logic interpreter as a service.</description> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-model</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-common</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons.lang.version}</version> - <scope>compile</scope> - </dependency> + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-model</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-binding-api</artifactId> - </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <scope>compile</scope> + </dependency> - <!-- Testing Dependencies --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.controller</groupId> + <artifactId>sal-binding-api</artifactId> + </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>10.11.1.1</version> - <scope>test</scope> - </dependency> - </dependencies> + <!-- Testing Dependencies --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> - <configuration> - <instructions> - <DynamicImport-Package>*</DynamicImport-Package> - </instructions> - </configuration> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <scope>test</scope> + </dependency> + </dependencies> - </plugin> - </plugins> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <DynamicImport-Package>*</DynamicImport-Package> + </instructions> + </configuration> - </build> + </plugin> + </plugins> + + </build> </project> diff --git a/sli/recording/pom.xml b/sli/recording/pom.xml index a13ed13ea..038381d58 100755 --- a/sli/recording/pom.xml +++ b/sli/recording/pom.xml @@ -1,84 +1,73 @@ <?xml version="1.0"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> - <relativePath/> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath /> + </parent> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-recording</artifactId> - <version>0.3.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-recording</artifactId> + <version>0.3.0-SNAPSHOT</version> + <packaging>bundle</packaging> - <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> - <description>SLI Recording is an OSGi bundle that implements recording service for the service logic record node.</description> + <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> + <description>SLI Recording is an OSGi bundle that implements recording service for the service logic record node.</description> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> + + <dependencies> + <dependency> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-common</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> - <version>${slf4j.version}</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - <version>${commons.lang.version}</version> <scope>compile</scope> </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-binding-api</artifactId> - </dependency> + <dependency> + <groupId>org.opendaylight.controller</groupId> + <artifactId>sal-binding-api</artifactId> + </dependency> - <!-- Testing Dependencies --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> + <!-- Testing Dependencies --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> - </dependencies> + </dependencies> </project> diff --git a/sliPluginUtils/features/ccsdk-sliPluginUtils/pom.xml b/sliPluginUtils/features/ccsdk-sliPluginUtils/pom.xml index 3737f9e73..78f5f1e1c 100644 --- a/sliPluginUtils/features/ccsdk-sliPluginUtils/pom.xml +++ b/sliPluginUtils/features/ccsdk-sliPluginUtils/pom.xml @@ -21,26 +21,20 @@ <dependency> <groupId>org.opendaylight.mdsal.model</groupId> <artifactId>mdsal-model-artifacts</artifactId> - <version>0.11.1</version> + <version>${odl.mdsal.model.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> + <version>${odl.mdsal.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>odl-mdsal-broker</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> <dependency> <groupId>${project.groupId}</groupId> @@ -55,11 +49,6 @@ <artifactId>sliPluginUtils-provider</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - <scope>provided</scope> - </dependency> + </dependencies> </project> diff --git a/sliPluginUtils/provider/pom.xml b/sliPluginUtils/provider/pom.xml index ae7506361..411c1453c 100755 --- a/sliPluginUtils/provider/pom.xml +++ b/sliPluginUtils/provider/pom.xml @@ -33,10 +33,7 @@ <version>${project.version}</version> <scope>compile</scope> </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> diff --git a/sliapi/features/ccsdk-sliapi/pom.xml b/sliapi/features/ccsdk-sliapi/pom.xml index f868f3453..f4f63948d 100644 --- a/sliapi/features/ccsdk-sliapi/pom.xml +++ b/sliapi/features/ccsdk-sliapi/pom.xml @@ -16,31 +16,26 @@ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name> - <dependencyManagement> - <dependencies> - <dependency> + <dependencyManagement> + <dependencies> + <dependency> <groupId>org.opendaylight.mdsal.model</groupId> <artifactId>mdsal-model-artifacts</artifactId> - <version>0.11.1</version> + <version>${odl.mdsal.model.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> + <version>${odl.mdsal.version}</version> <type>pom</type> <scope>import</scope> </dependency> - </dependencies> - </dependencyManagement> + </dependencies> + </dependencyManagement> + <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>odl-mdsal-broker</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> <dependency> <groupId>${project.groupId}</groupId> diff --git a/sliapi/provider/pom.xml b/sliapi/provider/pom.xml index 3be16f42d..994557a5a 100755 --- a/sliapi/provider/pom.xml +++ b/sliapi/provider/pom.xml @@ -17,17 +17,7 @@ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> + <dependencies> <dependency> <groupId>org.onap.ccsdk.sli.core</groupId> @@ -39,16 +29,19 @@ <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-binding-config</artifactId> + <version>${odl.mdsal.version}</version> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-binding-api</artifactId> + <version>${odl.mdsal.version}</version> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-common-util</artifactId> + <version>${odl.mdsal.version}</version> </dependency> @@ -65,10 +58,12 @@ <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-core-api</artifactId> + <version>${odl.mdsal.version}</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-data-impl</artifactId> + <version>2.0.3</version> </dependency> <dependency> @@ -87,7 +82,6 @@ <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> - <version>10.11.1.1</version> <scope>test</scope> </dependency> </dependencies> diff --git a/utils/provider/pom.xml b/utils/provider/pom.xml index 2ecea40e8..2698b39c9 100644 --- a/utils/provider/pom.xml +++ b/utils/provider/pom.xml @@ -27,12 +27,11 @@ <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> - <dependency> - <groupId>equinoxSDK381</groupId> - <artifactId>org.eclipse.osgi</artifactId> - <version>${equinox.osgi.version}</version> - <scope>provided</scope> - </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> <!-- Testing Dependencies --> <dependency> |