diff options
Diffstat (limited to 'sli')
-rwxr-xr-x | sli/common/pom.xml | 14 | ||||
-rw-r--r-- | sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/PrintYangToProp.java | 16 | ||||
-rw-r--r-- | sli/common/src/test/java/org/onap/ccsdk/sli/core/sli/PrintYangToPropTest.java | 7 | ||||
-rw-r--r-- | sli/features/features-sli/pom.xml | 8 | ||||
-rw-r--r-- | sli/features/odl-sli/pom.xml | 140 | ||||
-rw-r--r-- | sli/features/pom.xml | 4 | ||||
-rwxr-xr-x | sli/installer/pom.xml | 4 | ||||
-rwxr-xr-x | sli/model/pom.xml | 12 | ||||
-rwxr-xr-x | sli/model/src/main/yang/sliapi.yang | 2 | ||||
-rwxr-xr-x | sli/pom.xml | 4 | ||||
-rw-r--r-- | sli/provider-base/pom.xml | 114 | ||||
-rwxr-xr-x | sli/provider/pom.xml | 189 | ||||
-rwxr-xr-x | sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java | 34 | ||||
-rwxr-xr-x | sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java | 24 | ||||
-rwxr-xr-x | sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java | 6 | ||||
-rwxr-xr-x | sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java | 6 | ||||
-rwxr-xr-x | sli/recording/pom.xml | 135 |
17 files changed, 345 insertions, 374 deletions
diff --git a/sli/common/pom.xml b/sli/common/pom.xml index 17ee4751..4d144006 100755 --- a/sli/common/pom.xml +++ b/sli/common/pom.xml @@ -5,22 +5,22 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-common</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> <description>The SLI Common package includes common classes used by the various SLI subcomponents, as well as classes used by clients to interface with the service logic interpreter</description> <properties> - <!-- Ignore deprecated classes in coverage counts --> - <sonar.coverage.exclusions>**/MessageWriter.java</sonar.coverage.exclusions> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> + <!-- Ignore deprecated classes in coverage counts --> + <sonar.coverage.exclusions>**/MessageWriter.java</sonar.coverage.exclusions> + </properties> @@ -73,11 +73,11 @@ </dependency> <dependency> <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-inet-types</artifactId> + <artifactId>ietf-inet-types-2013-07-15</artifactId> </dependency> <dependency> <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-yang-types</artifactId> + <artifactId>ietf-yang-types-20130715</artifactId> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/PrintYangToProp.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/PrintYangToProp.java index 3e8983bb..5df136fd 100644 --- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/PrintYangToProp.java +++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/PrintYangToProp.java @@ -37,14 +37,14 @@ import java.util.Arrays; import java.util.ArrayList; import java.io.*; import org.opendaylight.yangtools.yang.binding.Identifier; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/sli/common/src/test/java/org/onap/ccsdk/sli/core/sli/PrintYangToPropTest.java b/sli/common/src/test/java/org/onap/ccsdk/sli/core/sli/PrintYangToPropTest.java index fb6eaf70..d639c28d 100644 --- a/sli/common/src/test/java/org/onap/ccsdk/sli/core/sli/PrintYangToPropTest.java +++ b/sli/common/src/test/java/org/onap/ccsdk/sli/core/sli/PrintYangToPropTest.java @@ -3,8 +3,6 @@ */ package org.onap.ccsdk.sli.core.sli; -import static org.junit.Assert.*; - import java.util.Enumeration; import java.util.LinkedList; import java.util.List; @@ -15,9 +13,8 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.Exe import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.ExecuteGraphInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.execute.graph.input.SliParameter; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.execute.graph.input.SliParameterBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/sli/features/features-sli/pom.xml b/sli/features/features-sli/pom.xml index 9bb3612d..85860a77 100644 --- a/sli/features/features-sli/pom.xml +++ b/sli/features/features-sli/pom.xml @@ -5,21 +5,17 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>features-sli</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> - <properties> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> - <dependencies> <dependency> <groupId>${project.groupId}</groupId> diff --git a/sli/features/odl-sli/pom.xml b/sli/features/odl-sli/pom.xml index 9e88969c..31ef0dde 100644 --- a/sli/features/odl-sli/pom.xml +++ b/sli/features/odl-sli/pom.xml @@ -1,84 +1,62 @@ <?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> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>single-feature-parent</artifactId> - <version>1.2.0</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>ccsdk-sli</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> - - <properties> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <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.mdsal.model</groupId> - <artifactId>mdsal-model-artifacts</artifactId> - <version>${odl.mdsal.model.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-common</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-recording</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${mariadb.connector.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>ccsdk-dblib</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> - - - </dependencies> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>single-feature-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>ccsdk-sli</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>feature</packaging> + + <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> + + + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-recording</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${mariadb.connector.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>ccsdk-dblib</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + + + </dependencies> </project> diff --git a/sli/features/pom.xml b/sli/features/pom.xml index 9c0451d5..f19d363b 100644 --- a/sli/features/pom.xml +++ b/sli/features/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-feature-aggregator</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> diff --git a/sli/installer/pom.xml b/sli/installer/pom.xml index 77f46031..d8b62a3f 100755 --- a/sli/installer/pom.xml +++ b/sli/installer/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-installer</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> diff --git a/sli/model/pom.xml b/sli/model/pom.xml index fab849e8..cae0a483 100755 --- a/sli/model/pom.xml +++ b/sli/model/pom.xml @@ -5,29 +5,25 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-model</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>ccsdk-sli-core :: sli :: ${project.artifactId}</name> - - <properties> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> <dependencies> <dependency> <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-inet-types</artifactId> + <artifactId>ietf-inet-types-2013-07-15</artifactId> </dependency> <dependency> <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-yang-types</artifactId> + <artifactId>ietf-yang-types-20130715</artifactId> </dependency> </dependencies> </project> diff --git a/sli/model/src/main/yang/sliapi.yang b/sli/model/src/main/yang/sliapi.yang index 5d91ba2d..19adecca 100755 --- a/sli/model/src/main/yang/sliapi.yang +++ b/sli/model/src/main/yang/sliapi.yang @@ -6,7 +6,7 @@ module SLI-API { prefix sample; - import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } organization "ONAP"; diff --git a/sli/pom.xml b/sli/pom.xml index 54fd5cff..db20f565 100755 --- a/sli/pom.xml +++ b/sli/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0</version> + <version>1.2.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-core :: sli</name> diff --git a/sli/provider-base/pom.xml b/sli/provider-base/pom.xml index 6680fce6..0b6dfff4 100644 --- a/sli/provider-base/pom.xml +++ b/sli/provider-base/pom.xml @@ -1,63 +1,59 @@ <?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> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.2.0</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider-base</artifactId> - <version>0.4.0-SNAPSHOT</version> - - <properties> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-common</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </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.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - - </dependencies> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider-base</artifactId> + <version>0.4.1-SNAPSHOT</version> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </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.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + </dependencies> </project> diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml index f3d36897..f367cd83 100755 --- a/sli/provider/pom.xml +++ b/sli/provider/pom.xml @@ -1,110 +1,109 @@ <?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> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.2.0</version> - <relativePath/> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider</artifactId> + <version>0.4.1-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> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>${project.version}</version> - </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>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider-base</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <scope>compile</scope> - </dependency> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>${project.version}</version> + </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>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider-base</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <scope>compile</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.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </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.apache.derby</groupId> - <artifactId>derby</artifactId> - <scope>test</scope> - </dependency> - </dependencies> + <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> - <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> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <DynamicImport-Package>*</DynamicImport-Package> + </instructions> + </configuration> - </plugin> - </plugins> + </plugin> + </plugins> - </build> + </build> </project> diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java index eb4e15e9..818077fb 100755 --- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java +++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java @@ -35,14 +35,14 @@ import java.lang.reflect.Type; import java.util.LinkedList; import java.util.List; import java.util.Properties; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Dscp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; import org.opendaylight.yangtools.yang.binding.Identifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -129,9 +129,11 @@ public class MdsalHelper { String simpleTypeName = fromObj.getClass().getTypeName(); simpleTypeName = simpleTypeName.substring(simpleTypeName.lastIndexOf(".") + 1); LOG.trace("Extracting properties from " + fromClass.getName() + " class"); + if (classHasSpecialHandling(simpleTypeName)) { try { - Method m = fromClass.getMethod("getValue", null); + + Method m = fromClass.getMethod(getStringValueMethod(simpleTypeName), null); boolean isAccessible = m.isAccessible(); if (!isAccessible) { m.setAccessible(true); @@ -139,9 +141,8 @@ public class MdsalHelper { Object retValue = m.invoke(fromObj); if (retValue != null) { String propVal = null; - if (IP_ADDRESS.equals(simpleTypeName) || IP_PREFIX.equals(simpleTypeName)) { - propVal = String.valueOf((char[]) retValue); - } else if (IPV4_ADDRESS.equals(simpleTypeName) || IPV6_ADDRESS.equals(simpleTypeName)) { + if (IP_ADDRESS.equals(simpleTypeName) || IP_PREFIX.equals(simpleTypeName) + || IPV4_ADDRESS.equals(simpleTypeName) || IPV6_ADDRESS.equals(simpleTypeName)) { propVal = (String) retValue; } else if ("Dscp".equals(simpleTypeName)) { propVal = String.valueOf((short) retValue); @@ -641,6 +642,7 @@ public class MdsalHelper { if (IPV4_ADDRESS.equals(simpleName) || IPV6_ADDRESS.equals(simpleName) || IP_ADDRESS.equals(simpleName)) { + if ((paramValue != null) && (paramValue.length() > 0)) { try { @@ -1007,6 +1009,14 @@ public class MdsalHelper { } return false; } + + private static String getStringValueMethod(String simpleName){ + if (IP_ADDRESS.equals(simpleName) || IP_PREFIX.equals(simpleName)) { + return("stringValue"); + } else { + return("getValue"); + } + } public static void printPropertyList(PrintStream pstr, String pfx, Class toClass) { boolean foundValue = false; diff --git a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java index cf27f9b9..93977759 100755 --- a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java +++ b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java @@ -35,14 +35,14 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.exe import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.rev161110.execute.graph.input.SliParameterBuilder; import org.opendaylight.yang.gen.v1.test.TestObjectBuilder; import org.opendaylight.yang.gen.v1.test.WrapperObj; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IetfInetUtil; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Dscp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IetfInetUtil; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -187,13 +187,13 @@ public class MdsalHelperTest extends TestCase { TestObjectBuilder b = new TestObjectBuilder(); MdsalHelper.toBuilder(props, b); - assertEquals(ipAddress,String.valueOf(b.getSingleIp().getValue())); + assertEquals(ipAddress,String.valueOf(b.getSingleIp().stringValue())); ipAddress = "cafe::8888"; props.setProperty("test-object.single-ip", ipAddress); b = new TestObjectBuilder(); MdsalHelper.toBuilder(props, b); - assertEquals(ipAddress,String.valueOf(b.getSingleIp().getValue())); + assertEquals(ipAddress,String.valueOf(b.getSingleIp().stringValue())); } public void testIpAddressListToProperties() throws Exception { @@ -215,7 +215,7 @@ public class MdsalHelperTest extends TestCase { props.setProperty("test-object.floating-ip[0]", ipaddress); TestObjectBuilder b = new TestObjectBuilder(); MdsalHelper.toBuilder(props, b); - assertEquals(ipaddress,String.valueOf(b.getFloatingIp().get(0).getValue())); + assertEquals(ipaddress,String.valueOf(b.getFloatingIp().get(0).stringValue())); props = new Properties(); ipaddress = "cafe::8888"; @@ -223,7 +223,7 @@ public class MdsalHelperTest extends TestCase { props.setProperty("test-object.floating-ip[0]", ipaddress); b = new TestObjectBuilder(); MdsalHelper.toBuilder(props, b); - assertEquals(ipaddress,String.valueOf(b.getFloatingIp().get(0).getValue())); + assertEquals(ipaddress,String.valueOf(b.getFloatingIp().get(0).stringValue())); } diff --git a/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java b/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java index d9feaf63..eacfc9f6 100755 --- a/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java +++ b/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java @@ -2,9 +2,9 @@ package org.opendaylight.yang.gen.v1.test; import java.util.List;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
public interface TestObject {
List<IpAddress> getFloatingIp();
diff --git a/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java b/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java index c1561551..8301a0f0 100755 --- a/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java +++ b/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java @@ -2,9 +2,9 @@ package org.opendaylight.yang.gen.v1.test; import java.util.List;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
import org.opendaylight.yangtools.concepts.Builder;
public class TestObjectBuilder implements Builder<TestObject> {
diff --git a/sli/recording/pom.xml b/sli/recording/pom.xml index 27acbbce..e8fc29f0 100755 --- a/sli/recording/pom.xml +++ b/sli/recording/pom.xml @@ -1,81 +1,80 @@ <?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> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.2.0</version> - <relativePath/> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-recording</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-recording</artifactId> + <version>0.4.1-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> - <ccsdk.sli.core.version>${project.version}</ccsdk.sli.core.version> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-common</artifactId> - <version>${project.version}</version> - <scope>compile</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> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <version>${project.version}</version> + <scope>compile</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>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <scope>compile</scope> - </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <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> |