Merge "fixed sonar issues in AAIServiceUtils.java"
authorDan Timoney <dtimoney@att.com>
Wed, 30 Jan 2019 14:59:38 +0000 (14:59 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 30 Jan 2019 14:59:38 +0000 (14:59 +0000)
80 files changed:
aai-service/features/ccsdk-aai-service/pom.xml
aai-service/features/features-aai-service/pom.xml
aai-service/features/pom.xml
aai-service/installer/pom.xml
aai-service/pom.xml
aai-service/provider/pom.xml
aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java
aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java
aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/GenericQueryRequest.java
aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/NamedQueryRequest.java
ansible-adapter/ansible-adapter-bundle/pom.xml
ansible-adapter/ansible-adapter-features/ccsdk-ansible-adapter/pom.xml
ansible-adapter/ansible-adapter-features/features-ansible-adapter/pom.xml
ansible-adapter/ansible-adapter-features/pom.xml
ansible-adapter/ansible-adapter-installer/pom.xml
ansible-adapter/pom.xml
artifacts/pom.xml
features/ccsdk-sli-adaptors-all/pom.xml
features/features-sli-adaptors/pom.xml
features/installer/pom.xml
features/pom.xml
grpc-resource/features/ccsdk-grpc-client/pom.xml [new file with mode: 0644]
grpc-resource/features/features-grpc-client/pom.xml [new file with mode: 0755]
grpc-resource/features/pom.xml [new file with mode: 0755]
grpc-resource/installer/pom.xml [new file with mode: 0755]
grpc-resource/installer/src/assembly/assemble_installer_zip.xml [new file with mode: 0644]
grpc-resource/installer/src/assembly/assemble_mvnrepo_zip.xml [new file with mode: 0644]
grpc-resource/installer/src/main/resources/scripts/install-feature.sh [new file with mode: 0644]
grpc-resource/pom.xml [new file with mode: 0644]
grpc-resource/provider/pom.xml [new file with mode: 0644]
grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClient.java [new file with mode: 0644]
grpc-resource/provider/src/main/resources/org/opendaylight/blueprint/grpc-client.xml [new file with mode: 0644]
grpc-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClientTest.java [new file with mode: 0644]
mdsal-resource/features/ccsdk-mdsal-resource/pom.xml
mdsal-resource/features/features-mdsal-resource/pom.xml
mdsal-resource/features/pom.xml
mdsal-resource/installer/pom.xml
mdsal-resource/pom.xml
mdsal-resource/provider/pom.xml
mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourceActivator.java
netbox-client/features/ccsdk-netbox-client/pom.xml
netbox-client/features/features-netbox-client/pom.xml
netbox-client/features/pom.xml
netbox-client/installer/pom.xml
netbox-client/pom.xml
netbox-client/provider/pom.xml
pom.xml
resource-assignment/features/ccsdk-resource-assignment/pom.xml
resource-assignment/features/features-resource-assignment/pom.xml
resource-assignment/features/pom.xml
resource-assignment/installer/pom.xml
resource-assignment/pom.xml
resource-assignment/provider/pom.xml
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/dao/ResourceLockDao.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/dao/ResourceLockDaoImpl.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/ResourceRequest.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ResourceManager.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ResourceManagerImpl.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceJdbcDaoImpl.java
resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/data/ReleaseRequest.java [new file with mode: 0644]
resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/DataSetup.java
resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestRelease.java
resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestResourceLockNode.java
saltstack-adapter/pom.xml
saltstack-adapter/saltstack-adapter-features/ccsdk-saltstack-adapter/pom.xml
saltstack-adapter/saltstack-adapter-features/features-saltstack-adapter/pom.xml
saltstack-adapter/saltstack-adapter-features/pom.xml
saltstack-adapter/saltstack-adapter-installer/pom.xml
saltstack-adapter/saltstack-adapter-provider/pom.xml
sql-resource/features/ccsdk-sql-resource/pom.xml
sql-resource/features/features-sql-resource/pom.xml
sql-resource/features/pom.xml
sql-resource/installer/pom.xml
sql-resource/pom.xml
sql-resource/provider/pom.xml
version.properties

index e746011..a633b24 100644 (file)
@@ -1,57 +1,42 @@
 <?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-SNAPSHOT</version>
-               <relativePath />
-       </parent>
-
-       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
-       <artifactId>ccsdk-aai-service</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
-       <packaging>feature</packaging>
-
-       <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
-
-
-       <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>ccsdk-sli</artifactId>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>aai-service-provider</artifactId>
-                       <version>${project.version}</version>
-               </dependency>
-
-
-       </dependencies>
+<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.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>ccsdk-aai-service</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
+
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>aai-service-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+
+    </dependencies>
 </project>
index 742e006..3e4748a 100755 (executable)
@@ -1,29 +1,33 @@
 <?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>feature-repo-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
-               <relativePath/>
-       </parent>
+    <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>feature-repo-parent</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
 
-       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
-       <artifactId>features-aai-service</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
-       <packaging>feature</packaging>
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>features-aai-service</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
 
-       <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
+    <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
 
-       <dependencies>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-aai-service</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
 
-       </dependencies>
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-aai-service</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+    </dependencies>
 </project>
index 787c562..1c34eb4 100755 (executable)
@@ -5,13 +5,13 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>aai-service-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
index dbc793f..c480fb3 100755 (executable)
@@ -5,13 +5,13 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>aai-service-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
index 7b1d553..b28dea6 100755 (executable)
@@ -5,13 +5,13 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>aai-service</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: aai-service</name>
index 4411432..cbf161d 100755 (executable)
 <?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.2.0-SNAPSHOT</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.adaptors</groupId>
-       <artifactId>aai-service-provider</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
-       <packaging>bundle</packaging>
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>aai-service-provider</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
 
-       <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name>
-       <url>http://maven.apache.org</url>
+    <name>ccsdk-sli-adaptors :: aai-service :: ${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>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+    
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
 
-       <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.onap.ccsdk.sli.core</groupId>
-                       <artifactId>sli-common</artifactId>
-                       <scope>compile</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.onap.ccsdk.sli.core</groupId>
-                       <artifactId>sli-provider</artifactId>
-                       <scope>compile</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.onap.ccsdk.sli.core</groupId>
-                       <artifactId>utils-provider</artifactId>
-                       <version>${sdnctl.sli.version}</version>
-               </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>com.sun.jersey</groupId>
-                       <artifactId>jersey-client</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.sun.jersey</groupId>
-                       <artifactId>jersey-core</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.apache.httpcomponents</groupId>
-                       <artifactId>httpcore</artifactId>
-                       <version>${apache.httpcomponents.core.version}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.apache.httpcomponents</groupId>
-                       <artifactId>httpclient</artifactId>
-                       <version>${apache.httpcomponents.client.version}</version>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-databind</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.module</groupId>
-                       <artifactId>jackson-module-jaxb-annotations</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-annotations</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-core</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>commons-lang</groupId>
-                       <artifactId>commons-lang</artifactId>
-               </dependency>
+    <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.onap.ccsdk.sli.core</groupId>
+            <artifactId>sli-common</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>sli-provider</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>utils-provider</artifactId>
+            <version>${sdnctl.sli.version}</version>
+        </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>com.sun.jersey</groupId>
+            <artifactId>jersey-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>${apache.httpcomponents.core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${apache.httpcomponents.client.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-jaxb-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
 
-               <dependency>
-                       <groupId>org.jsoup</groupId>
-                       <artifactId>jsoup</artifactId>
-                       <version>1.8.3</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-core</artifactId>
-                       <version>4.3.5.RELEASE</version>
-                       <scope>test</scope>
-               </dependency>
-       </dependencies>
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.8.3</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>4.3.5.RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.jvnet.jaxb2.maven2</groupId>
-                               <artifactId>maven-jaxb2-plugin</artifactId>
-                               <version>0.13.1</version>
-                               <executions>
-                                       <execution>
-                                               <id>gen-xjc</id>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                               <configuration>
-                                       <schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
-                                       <schemaIncludes>
-                                               <value>aai_schema_v14.xsd</value>
-                                       </schemaIncludes>
-                                       <bindingIncludes>
-                                               <include>aai-schema-bindings.xjb</include>
-                                       </bindingIncludes>
-                                       <generateDirectory>${project.build.directory}/generated-sources/main/java</generateDirectory>
-                                       <generatePackage>org.onap.aai.inventory.v14</generatePackage>
-                                       <extension>true</extension>
-                                       <args>
-                                               <arg>-Xannotate</arg>
-                                       </args>
-                                       <plugins>
-                                               <plugin>
-                                                       <groupId>org.jvnet.jaxb2_commons</groupId>
-                                                       <artifactId>jaxb2-basics-annotate</artifactId>
-                                                       <version>0.6.4</version>
-                                               </plugin>
-                                       </plugins>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jvnet.jaxb2.maven2</groupId>
+                <artifactId>maven-jaxb2-plugin</artifactId>
+                <version>0.13.1</version>
+                <executions>
+                    <execution>
+                        <id>gen-xjc</id>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
+                    <schemaIncludes>
+                        <value>aai_schema_v14.xsd</value>
+                    </schemaIncludes>
+                    <bindingIncludes>
+                        <include>aai-schema-bindings.xjb</include>
+                    </bindingIncludes>
+                    <generateDirectory>${project.build.directory}/generated-sources/main/java</generateDirectory>
+                    <generatePackage>org.onap.aai.inventory.v14</generatePackage>
+                    <extension>true</extension>
+                    <args>
+                        <arg>-Xannotate</arg>
+                    </args>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.jvnet.jaxb2_commons</groupId>
+                            <artifactId>jaxb2-basics-annotate</artifactId>
+                            <version>0.6.4</version>
+                        </plugin>
+                    </plugins>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index cf1392f..a3aecda 100755 (executable)
@@ -44,7 +44,6 @@ import java.security.NoSuchAlgorithmException;
 import java.text.SimpleDateFormat;
 import java.util.Properties;
 
-import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
@@ -82,6 +81,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
     private String userPassword;
     private final String applicationId;
     private static final String HTTP_URL_CONNECTION_RESULT="HttpURLConnection result: {} : {}";
+    private static final String ENTRY_DOESNT_EXIST="Entry does not exist.";
 
     /**
      * class Constructor
@@ -281,7 +281,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
                     LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, responseMessage, mapper.writeValueAsString(response));
                 }
             } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
-                LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist.");
+                LOGwriteEndingTrace(responseCode, responseMessage, ENTRY_DOESNT_EXIST);
                 ErrorResponse errorresponse = null;
                 try {
                     errorresponse = mapper.readValue(reader, ErrorResponse.class);
@@ -289,7 +289,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
                     errorresponse = new ErrorResponse();
                     RequestError requestError = new RequestError();
                     ServiceException serviceException = new ServiceException();
-                    serviceException.setText("Entry does not exist.");
+                    serviceException.setText(ENTRY_DOESNT_EXIST);
                     requestError.setServiceException(serviceException);
                     errorresponse.setRequestError(requestError );
                 }
@@ -501,7 +501,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
                 LOGwriteEndingTrace(responseCode, responseMessage, stringBuilder.toString());
                 response = true;
             } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
-                LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist.");
+                LOGwriteEndingTrace(responseCode, responseMessage, ENTRY_DOESNT_EXIST);
                 response = false;
             } else {
                 ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
@@ -574,7 +574,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
                 response = mapper.readValue(reader, clas);
                 LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
             } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
-                LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+                LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", ENTRY_DOESNT_EXIST);
                 return response;
             } else {
                 BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
index 82df698..c66ae06 100755 (executable)
@@ -433,8 +433,7 @@ public abstract class AAIRequest {
         if(clazz == null) {
             return null;
         }
-        GenericRequest request = new GenericRequest(clazz);
-        return request;
+        return new GenericRequest(clazz);
     }
 
     public static Map<String, String> splitQuery(String query) throws UnsupportedEncodingException {
index 5153596..35f190e 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
  *                     reserved.
  * ================================================================================
+ * Modifications Copyright (C) 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
@@ -104,19 +106,19 @@ public class GenericQueryRequest extends AAIRequest {
 
                String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
                request_url = request_url.replace("{identifier}", encoded_vnf) ;
-               aaiService.LOGwriteDateTrace("identifier", requestProperties.getProperty(key));
+               aaiService.LOGwriteDateTrace(IDENTIFIER, requestProperties.getProperty(key));
 
                key = VALUE;
 
                encoded_vnf = encodeQuery(requestProperties.getProperty(key));
                request_url = request_url.replace("{value}", encoded_vnf) ;
-               aaiService.LOGwriteDateTrace("value", requestProperties.getProperty(key));
+               aaiService.LOGwriteDateTrace(VALUE, requestProperties.getProperty(key));
 
                key = START_NODE_TYPE;
 
                encoded_vnf = encodeQuery(requestProperties.getProperty(key));
                request_url = request_url.replace("{start-node-type}", encoded_vnf) ;
-               aaiService.LOGwriteDateTrace("start-node-type", requestProperties.getProperty(key));
+               aaiService.LOGwriteDateTrace(START_NODE_TYPE, requestProperties.getProperty(key));
 
                return request_url;
        }
index 691ae27..d1995f0 100755 (executable)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
  *             reserved.
  * ================================================================================
+ * Modifications Copyright (C) 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
@@ -107,7 +109,7 @@ public class NamedQueryRequest extends AAIRequest {
                         if(innerChild != null) {
                             if(innerChild instanceof ObjectNode) {
                                 ObjectNode on = ObjectNode.class.cast(innerChild);
-                                List<String> namesToDelete = new ArrayList<String>();
+                                List<String> namesToDelete = new ArrayList<>();
                                 Iterator<String> names = on.fieldNames();
                                 while(names.hasNext()) {
                                     String name = names.next();
@@ -125,7 +127,7 @@ public class NamedQueryRequest extends AAIRequest {
                         if(innerChild != null) {
                             if(innerChild instanceof ObjectNode) {
                                 ObjectNode on = ObjectNode.class.cast(innerChild);
-                                List<String> namesToDelete = new ArrayList<String>();
+                                List<String> namesToDelete = new ArrayList<>();
                                 Iterator<String> names = on.fieldNames();
                                 while(names.hasNext()) {
                                     String name = names.next();
@@ -143,7 +145,7 @@ public class NamedQueryRequest extends AAIRequest {
                         if(innerChild != null) {
                             if(innerChild instanceof ObjectNode) {
                                 ObjectNode on = ObjectNode.class.cast(innerChild);
-                                List<String> namesToDelete = new ArrayList<String>();
+                                List<String> namesToDelete = new ArrayList<>();
                                 Iterator<String> names = on.fieldNames();
                                 while(names.hasNext()) {
                                     String name = names.next();
@@ -194,7 +196,7 @@ public class NamedQueryRequest extends AAIRequest {
         if(requestProperties.containsKey(key)) {
             encoded_vnf = encodeQuery(requestProperties.getProperty(key));
             request_url = request_url.replace("{named-query-uuid}", encoded_vnf) ;
-            aaiService.LOGwriteDateTrace("named-query-uuid", requestProperties.getProperty(key));
+            aaiService.LOGwriteDateTrace(NAMED_QUERY_UUID, requestProperties.getProperty(key));
         }
 
         key = PREFIX;
@@ -202,7 +204,7 @@ public class NamedQueryRequest extends AAIRequest {
         if(requestProperties.containsKey(key)) {
             encoded_vnf = encodeQuery(requestProperties.getProperty(key));
             request_url = request_url.replace("{prefix}", encoded_vnf) ;
-            aaiService.LOGwriteDateTrace("prefix", requestProperties.getProperty(key));
+            aaiService.LOGwriteDateTrace(PREFIX, requestProperties.getProperty(key));
         }
 
         return request_url;
index 858d227..5ae79b3 100644 (file)
        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========================================================= -->
-<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>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
-               <relativePath/>
+               <version>1.2.1-SNAPSHOT</version>
+               <relativePath />
        </parent>
 
        <groupId>org.onap.ccsdk.sli.adaptors</groupId>
        <artifactId>ansible-adapter-bundle</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
+       <version>0.4.1-SNAPSHOT</version>
        <packaging>bundle</packaging>
        <name>ccsdk-sli-adaptors :: ansible-adapter :: ${project.artifactId}</name>
 
+
+       <properties>
+               <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+       </properties>
+
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.onap.ccsdk.sli.core</groupId>
+                               <artifactId>sli-core-artifacts</artifactId>
+                               <version>${ccsdk.sli.core.version}</version>
+                               <type>pom</type>
+                               <scope>import</scope>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+
        <dependencies>
                <dependency>
                        <groupId>com.att.eelf</groupId>
index 7f770ac..daceea7 100644 (file)
@@ -5,40 +5,27 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ccsdk-ansible-adapter</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: ansible-adapter:: ${project.artifactId}</name>
 
-       <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>
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
 
         <dependency>
             <groupId>org.onap.ccsdk.sli.core</groupId>
             <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index f073f18..f742f14 100755 (executable)
@@ -5,17 +5,21 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-ansible-adapter</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: ansible-adapter :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index be9e9af..2fd0e8d 100644 (file)
     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========================================================= -->
-<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>
         <artifactId>odlparent-lite</artifactId>
         <groupId>org.onap.ccsdk.parent</groupId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ansible-adapter-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <name>ccsdk-sli-adaptors :: ansible-adapter :: ${project.artifactId}</name>
 
     <packaging>pom</packaging>
index 556f85d..f1cc2a4 100644 (file)
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ansible-adapter-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <name>ccsdk-sli-adaptors :: ansible-adapter :: ${project.artifactId}</name>
     <packaging>pom</packaging>
     <properties>
index ffcead8..083fbb9 100644 (file)
   ECOMP is a trademark and service mark of AT&T Intellectual Property.
   ============LICENSE_END=========================================================
   -->
-
 <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/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.onap.ccsdk.sli.adaptors</groupId>
   <artifactId>ansible-adaptor</artifactId>
-  <version>0.4.0-SNAPSHOT</version>
+  <version>0.4.1-SNAPSHOT</version>
   <name>ccsdk-sli-adaptors :: ansible-adapter</name>
   <description>Abstractions to interact with Ansible server via REST</description>
   <packaging>pom</packaging>
index 701cf3f..5660ff3 100755 (executable)
@@ -1,12 +1,10 @@
 <?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>
 
        <groupId>org.onap.ccsdk.sli.adaptors</groupId>
        <artifactId>sli-adaptors-artifacts</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
+       <version>0.4.1-SNAPSHOT</version>
        <packaging>pom</packaging>
 
        <name>ccsdk-sli-adaptors :: sli-adaptors-artifacts</name>
@@ -19,7 +17,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
 
        <dependencyManagement>
index 367c48f..77ccb4c 100644 (file)
@@ -1,98 +1,77 @@
 <?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>single-feature-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
-               <relativePath />
-       </parent>
+    <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.adaptors</groupId>
-       <artifactId>ccsdk-sli-adaptors-all</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
-       <packaging>feature</packaging>
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>ccsdk-sli-adaptors-all</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
 
-       <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name>
+    <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name>
 
 
-       <dependencyManagement>
-               <dependencies>
-                       <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>
-                       <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.onap.ccsdk.sli.adaptors</groupId>
-                            <artifactId>aai-service-provider</artifactId>
-                            <version>${project.version}</version>
-                        </dependency>
-               </dependencies>
-       </dependencyManagement>
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
 
-       <dependencies>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-aai-service</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-ansible-adapter</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-saltstack-adapter</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-netbox-client</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-mdsal-resource</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-resource-assignment</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>ccsdk-sql-resource</artifactId>
-                       <version>${project.version}</version>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-       
-       </dependencies>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-aai-service</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-ansible-adapter</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-saltstack-adapter</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-netbox-client</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-mdsal-resource</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-resource-assignment</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-sql-resource</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+    
+    </dependencies>
 </project>
index eeffd8b..23905b8 100644 (file)
@@ -5,17 +5,21 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-sli-adaptors</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 06f3063..1e3ea21 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
-               <relativePath />
+               <version>1.2.1-SNAPSHOT</version>
+               <relativePath/>
        </parent>
 
        <groupId>org.onap.ccsdk.sli.adaptors</groupId>
        <artifactId>sliadaptors-features-installer</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
+       <version>0.4.1-SNAPSHOT</version>
        <packaging>pom</packaging>
 
        <name>ccsdk-sli-adaptors :: features :: ${project.artifactId}</name>
index 4a673de..52cda12 100755 (executable)
@@ -5,13 +5,13 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
        <groupId>org.onap.ccsdk.sli.adaptors</groupId>
        <artifactId>sliadaptors-feature-aggregator</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
+       <version>0.4.1-SNAPSHOT</version>
        <packaging>pom</packaging>
 
        <name>ccsdk-sli-adaptors :: features</name>
diff --git a/grpc-resource/features/ccsdk-grpc-client/pom.xml b/grpc-resource/features/ccsdk-grpc-client/pom.xml
new file mode 100644 (file)
index 0000000..d24d1e2
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>ccsdk-grpc-client</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>ccsdk-sli-adaptors :: grpc-client :: ${project.artifactId}</name>
+
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>odl-mdsal-broker</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>grpc-client-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/grpc-resource/features/features-grpc-client/pom.xml b/grpc-resource/features/features-grpc-client/pom.xml
new file mode 100755 (executable)
index 0000000..993fbe1
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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>feature-repo-parent</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>features-grpc-client</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>ccsdk-sli-adaptors :: grpc-client :: ${project.artifactId}</name>
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-grpc-client</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/grpc-resource/features/pom.xml b/grpc-resource/features/pom.xml
new file mode 100755 (executable)
index 0000000..ededb8e
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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>odlparent-lite</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>grpc-client-features</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-sli-adaptors :: grpc-client :: ${project.artifactId}</name>
+
+    <modules>
+        <module>ccsdk-grpc-client</module>
+        <module>features-grpc-client</module>
+    </modules>
+</project>
diff --git a/grpc-resource/installer/pom.xml b/grpc-resource/installer/pom.xml
new file mode 100755 (executable)
index 0000000..3bb4162
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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>odlparent-lite</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>grpc-client-installer</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-sli-adaptors :: grpc-client :: ${project.artifactId}</name>
+
+    <properties>
+        <application.name>ccsdk-grpc-client</application.name>
+        <features.boot>${application.name}</features.boot>
+        <features.repositories>mvn:org.onap.ccsdk.sli.adaptors/${features.boot}/${project.version}/xml/features
+        </features.repositories>
+        <include.transitive.dependencies>false</include.transitive.dependencies>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+            <artifactId>ccsdk-grpc-client</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+            <artifactId>grpc-client-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>maven-repo-zip</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <attach>true</attach>
+                            <finalName>stage/${application.name}-${project.version}</finalName>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+                            </descriptors>
+                            <appendAssemblyId>true</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>installer-zip</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <attach>true</attach>
+                            <finalName>${application.name}-${project.version}-installer</finalName>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+                            </descriptors>
+                            <appendAssemblyId>false</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <transitive>false</transitive>
+                            <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <addParentPoms>false</addParentPoms>
+                            <copyPom>false</copyPom>
+                            <includeGroupIds>org.onap.ccsdk.sli.adaptors</includeGroupIds>
+                            <scope>provided</scope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-version</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/stage</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources/scripts</directory>
+                                    <includes>
+                                        <include>install-feature.sh</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+</project>
diff --git a/grpc-resource/installer/src/assembly/assemble_installer_zip.xml b/grpc-resource/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644 (file)
index 0000000..1a05df9
--- /dev/null
@@ -0,0 +1,53 @@
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+    <id>installer_zip</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+
+    <!--  we want "system" and related files right at the root level
+          as this file is suppose to be unzip on top of a karaf
+          distro. -->
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <fileSets>
+        <fileSet>
+            <directory>target/stage/</directory>
+            <outputDirectory>${application.name}</outputDirectory>
+            <fileMode>755</fileMode>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>target/stage/</directory>
+            <outputDirectory>${application.name}</outputDirectory>
+            <fileMode>644</fileMode>
+            <excludes>
+                <exclude>*.sh</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
+
+
+</assembly>
diff --git a/grpc-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/grpc-resource/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644 (file)
index 0000000..ae6765f
--- /dev/null
@@ -0,0 +1,43 @@
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+    <id>repo</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+
+    <!--  we want "system" and related files right at the root level
+          as this file is suppose to be unzip on top of a karaf
+          distro. -->
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <fileSets>
+        <fileSet>
+            <directory>target/assembly/</directory>
+            <outputDirectory>.</outputDirectory>
+            <excludes>
+            </excludes>
+        </fileSet>
+    </fileSets>
+
+
+</assembly>
diff --git a/grpc-resource/installer/src/main/resources/scripts/install-feature.sh b/grpc-resource/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644 (file)
index 0000000..7e022e8
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#
+#  Copyright (C) 2019 Bell Canada
+#
+#  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.
+#
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+    unzip -nd ${ODL_HOME} ${REPOZIP}
+else
+    echo "ERROR : repo zip ($REPOZIP) not found"
+    exit 1
+fi
+
+${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} feature:install ${features.boot}
diff --git a/grpc-resource/pom.xml b/grpc-resource/pom.xml
new file mode 100644 (file)
index 0000000..7b80f9b
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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>odlparent-lite</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>grpc-client</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-sli-adaptors :: grpc-client</name>
+    <description>The CCSDK Adaptors for gRPC as an OSGi service</description>
+
+    <modules>
+        <module>provider</module>
+        <module>features</module>
+        <module>installer</module>
+    </modules>
+</project>
diff --git a/grpc-resource/provider/pom.xml b/grpc-resource/provider/pom.xml
new file mode 100644 (file)
index 0000000..20f83c1
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<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">
+
+    <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>grpc-client-provider</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>ccsdk-sli-adaptors :: grpc-client :: ${project.artifactId}</name>
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+        <grpc.version>1.16.1</grpc.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.onap.ccsdk.sli.core</groupId>
+                <artifactId>sli-core-artifacts</artifactId>
+                <version>${ccsdk.sli.core.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>sliPluginUtils-provider</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- GRPC Dependencies -->
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-core</artifactId>
+            <version>${grpc.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty</artifactId>
+            <version>${grpc.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-protobuf</artifactId>
+            <version>${grpc.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+            <version>${grpc.version}</version>
+        </dependency>
+
+        <!--Testing-->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>${mockito.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.onap.ccsdk.sli.adaptors.grpc
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClient.java b/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClient.java
new file mode 100644 (file)
index 0000000..c70bcec
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2019 Bell Canada.
+ *
+ * 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.
+ */
+package org.onap.ccsdk.sli.adaptors.grpc;
+
+public class GrpcClient {
+
+//    ManagedChannel channel = ManagedChannelBuilder
+//        .forAddress("localhost", 8080)
+//        .executor(Executors.newSingleThreadExecutor())
+//        .intercept()
+//        .userAgent("CCSDK gRPC Client")
+//        .usePlaintext()
+//        //.useTransportSecurity()
+//        .build();
+
+}
diff --git a/grpc-resource/provider/src/main/resources/org/opendaylight/blueprint/grpc-client.xml b/grpc-resource/provider/src/main/resources/org/opendaylight/blueprint/grpc-client.xml
new file mode 100644 (file)
index 0000000..5e9d5c8
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (C) 2019 Bell Canada
+
+  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.
+  -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+  odl:use-default-for-reference-types="true">
+
+    <bean id="grpcClient" class="org.onap.ccsdk.sli.adaptors.grpc.GrpcClient"/>
+
+</blueprint>
diff --git a/grpc-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClientTest.java b/grpc-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcClientTest.java
new file mode 100644 (file)
index 0000000..f56736a
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2019 Bell Canada.
+ *
+ * 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.
+ */
+package org.onap.ccsdk.sli.adaptors.grpc;
+
+public class GrpcClientTest {
+
+}
\ No newline at end of file
index 12779d2..c9bf1a3 100644 (file)
@@ -1,55 +1,41 @@
 <?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-SNAPSHOT</version>
-               <relativePath />
-       </parent>
-
-       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
-       <artifactId>ccsdk-mdsal-resource</artifactId>
-       <version>0.4.0-SNAPSHOT</version>
-       <packaging>feature</packaging>
-
-       <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
-
-       <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>ccsdk-sli</artifactId>
-                       <type>xml</type>
-                       <classifier>features</classifier>
-               </dependency>
-
-               <dependency>
-                       <groupId>${project.groupId}</groupId>
-                       <artifactId>mdsal-resource-provider</artifactId>
-                       <version>${project.version}</version>
-               </dependency>
-
-       </dependencies>
+<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.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+    <artifactId>ccsdk-mdsal-resource</artifactId>
+    <version>0.4.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
+
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onap.ccsdk.sli.core</groupId>
+            <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>mdsal-resource-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
 </project>
index 9d4c8bb..72db305 100755 (executable)
@@ -1,22 +1,25 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-mdsal-resource</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 6f18387..7e23f96 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>mdsal-resource-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
index 77cb421..d4e4f67 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>mdsal-resource-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
index bc9ea8f..700e475 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>mdsal-resource</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: mdsal-resource</name>
index f6f65bd..dc73c60 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>mdsal-resource-provider</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>ccsdk-sli-adaptors :: mdsal-resource :: ${project.artifactId}</name>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
     </properties>
+    
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
 
     <dependencies>
 
index 004e682..53ed657 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
  *                     reserved.
  * ================================================================================
+ * Modifications Copyright (C) 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
@@ -20,7 +22,7 @@
  */
 
 package org.onap.ccsdk.sli.adaptors.resource.mdsal;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.util.LinkedList;
@@ -40,7 +42,7 @@ public class MdsalResourceActivator implements BundleActivator {
 
     private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR";
 
-    public LinkedList<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
+    public LinkedList<ServiceRegistration> registrations = new LinkedList<>();
 
     private static final Logger LOG = LoggerFactory
             .getLogger(MdsalResourceActivator.class);
index 85e5045..3612272 100644 (file)
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ccsdk-netbox-client</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId}</name>
 
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
@@ -44,6 +47,7 @@
         <dependency>
             <groupId>org.onap.ccsdk.sli.core</groupId>
             <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 93711e0..2f5144b 100755 (executable)
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-netbox-client</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index cc602b3..ef3e436 100755 (executable)
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>netbox-client-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId}</name>
index ed63472..221e418 100755 (executable)
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>netbox-client-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId}</name>
index efbc637..1dd15ed 100644 (file)
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>netbox-client</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: netbox-client</name>
@@ -38,4 +38,3 @@
         <module>installer</module>
     </modules>
 </project>
-
index d1de7ab..3af22ed 100644 (file)
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<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">
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>netbox-client-provider</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <modelVersion>4.0.0</modelVersion>
 
     <name>ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
+
     <dependencies>
 
         <dependency>
             <version>1.2.3</version>
             <scope>test</scope>
         </dependency>
-
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.core</artifactId>
+                       <scope>test</scope>
+               </dependency>
     </dependencies>
 
     <build>
diff --git a/pom.xml b/pom.xml
index f6a937d..2d1ea15 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,10 @@
 <?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/maven-v4_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/maven-v4_0_0.xsd">
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <organization>
         <name>ONAP</name>
     </organization>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
 
 
 </project>
index 23c252b..afe0ca4 100644 (file)
@@ -1,41 +1,26 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ccsdk-resource-assignment</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment :: ${project.artifactId}</name>
 
 
-       <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>
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
 
         <dependency>
index b830c06..5438d59 100755 (executable)
@@ -1,22 +1,25 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-resource-assignment</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 5c51b26..074f1eb 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>resource-assignment-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment :: ${project.artifactId}</name>
index 1aee969..16c62d5 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>resource-assignment-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment :: ${project.artifactId}</name>
index 5ed3df9..35b5b88 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>resource-assignment</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment</name>
index a431968..e517799 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>resource-assignment-provider</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>ccsdk-sli-adaptors :: resource-assignment :: ${project.artifactId}</name>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
     </properties>
+    
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
+    
 
     <dependencies>
         <dependency>
index 0efd897..735d240 100644 (file)
@@ -45,7 +45,8 @@ public class LockHelperImpl implements LockHelper {
     }
 
     @Override
-    public void lock(String resourceName, String lockRequester, int lockTimeout /* Seconds */, int lockWait /* Seconds */, int retryCount) {
+    public void lock(String resourceName, String lockRequester, int lockTimeout /* Seconds */,
+            int lockWait /* Seconds */, int retryCount) {
         lock(Collections.singleton(resourceName), lockRequester, lockTimeout, lockWait, retryCount);
     }
 
@@ -60,7 +61,8 @@ public class LockHelperImpl implements LockHelper {
     }
 
     @Override
-    public void lock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */, int lockWait /* Seconds */, int retryCount) {
+    public void lock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */,
+            int lockWait /* Seconds */, int retryCount) {
         for (int i = 0; true; i++) {
             try {
                 tryLock(resourceNameList, lockRequester, lockTimeout);
@@ -129,6 +131,9 @@ public class LockHelperImpl implements LockHelper {
                 }
 
                 if (l != null) {
+                    if (now.getTime() > l.expirationTime.getTime() || l.lockCount <= 0) {
+                        l.lockCount = 0;
+                    }
                     dbLockList.add(l);
                 } else {
                     insertLockNameList.add(name);
@@ -137,7 +142,7 @@ public class LockHelperImpl implements LockHelper {
 
             // Update the lock info in DB
             for (ResourceLock l : dbLockList) {
-                resourceLockDao.update(l.id, now, new Date(now.getTime() + lockTimeout * 1000), l.lockCount + 1);
+                resourceLockDao.update(l.id, lockRequester, now, new Date(now.getTime() + lockTimeout * 1000), l.lockCount + 1);
             }
 
             // Insert records for those that are not yet there
@@ -159,7 +164,9 @@ public class LockHelperImpl implements LockHelper {
 
             resourceLockDao.commit();
 
-        } finally {
+        }finally
+
+        {
             resourceLockDao.rollback();
         }
     }
index f9d4113..dc86f70 100644 (file)
@@ -28,7 +28,7 @@ public interface ResourceLockDao {
 
     void add(ResourceLock l);
 
-    void update(long id, Date lockTime, Date expirationTime, int lockCount);
+    void update(long id, String lockHolder, Date lockTime, Date expirationTime, int lockCount);
 
     ResourceLock getByResourceName(String resourceName);
 
index 4854192..b8b3a66 100644 (file)
@@ -21,8 +21,6 @@
 
 package org.onap.ccsdk.sli.adaptors.lock.dao;
 
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.Date;
 import java.util.List;
 import org.onap.ccsdk.sli.adaptors.lock.data.ResourceLock;
@@ -44,32 +42,28 @@ public class ResourceLockDaoImpl implements ResourceLockDao {
         jdbcTemplate.update(
                 "INSERT INTO RESOURCE_LOCK (resource_name, lock_holder, lock_count, lock_time, expiration_time)\n" +
                         "VALUES (?, ?, ?, ?, ?)",
-                new Object[] { l.resourceName, l.lockHolder, l.lockCount, l.lockTime, l.expirationTime });
+                        new Object[] { l.resourceName, l.lockHolder, l.lockCount, l.lockTime, l.expirationTime });
     }
 
     @Override
-    public void update(long id, Date lockTime, Date expirationTime, int lockCount) {
+    public void update(long id, String lockHolder, Date lockTime, Date expirationTime, int lockCount) {
         jdbcTemplate.update(
-                "UPDATE RESOURCE_LOCK SET lock_time = ?, expiration_time = ?, lock_count = ? WHERE resource_lock_id = ?",
-                new Object[] { lockTime, expirationTime, lockCount, id });
+                "UPDATE RESOURCE_LOCK SET lock_holder = ?, lock_time = ?, expiration_time = ?, lock_count = ? WHERE resource_lock_id = ?",
+                new Object[] { lockHolder, lockTime, expirationTime, lockCount, id });
     }
 
     @Override
     public ResourceLock getByResourceName(String resourceName) {
         List<ResourceLock> ll = jdbcTemplate.query("SELECT * FROM RESOURCE_LOCK WHERE resource_name = ?",
-                new Object[] { resourceName }, new RowMapper<ResourceLock>() {
-
-                    @Override
-                    public ResourceLock mapRow(ResultSet rs, int rowNum) throws SQLException {
-                        ResourceLock rl = new ResourceLock();
-                        rl.id = rs.getLong("resource_lock_id");
-                        rl.resourceName = rs.getString("resource_name");
-                        rl.lockHolder = rs.getString("lock_holder");
-                        rl.lockCount = rs.getInt("lock_count");
-                        rl.lockTime = rs.getTimestamp("lock_time");
-                        rl.expirationTime = rs.getTimestamp("expiration_time");
-                        return rl;
-                    }
+                new Object[] { resourceName }, (RowMapper<ResourceLock>) (rs, rowNum) -> {
+                    ResourceLock rl = new ResourceLock();
+                    rl.id = rs.getLong("resource_lock_id");
+                    rl.resourceName = rs.getString("resource_name");
+                    rl.lockHolder = rs.getString("lock_holder");
+                    rl.lockCount = rs.getInt("lock_count");
+                    rl.lockTime = rs.getTimestamp("lock_time");
+                    rl.expirationTime = rs.getTimestamp("expiration_time");
+                    return rl;
                 });
         return ll != null && !ll.isEmpty() ? ll.get(0) : null;
     }
index c0cf774..944429a 100644 (file)
@@ -36,6 +36,7 @@ import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceResponse;
 import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceTarget;
 import org.onap.ccsdk.sli.adaptors.rm.comp.ResourceManager;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationStatus;
+import org.onap.ccsdk.sli.adaptors.rm.data.ReleaseRequest;
 import org.onap.ccsdk.sli.adaptors.util.speed.SpeedUtil;
 import org.onap.ccsdk.sli.adaptors.util.str.StrUtil;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
@@ -49,8 +50,6 @@ public class ResourceAllocator implements SvcLogicResource {
     private static final Logger log = LoggerFactory.getLogger(ResourceAllocator.class);
 
     private static final String[] INPUT_PREFIX = {"ra-input.", "tmp.resource-allocator."};
-    private static final String START_RELEASE = "Starting release for: {}";
-    private static final String START_RELEASE_FOR_TARGET = "Starting release for: {} on target: {}";
 
     private ResourceManager resourceManager;
     private EndPointAllocator endPointAllocator;
@@ -101,7 +100,7 @@ public class ResourceAllocator implements SvcLogicResource {
             String orderBy, SvcLogicContext ctx) throws SvcLogicException {
 
         String resourceEntityId = getParam(ctx,
-                new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, false, null);
+                new String[] {"service-instance-id", "resource-entity-id", "reservation-entity-id"}, false, null);
         String resourceEntityType =
                 getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, false, null);
         String resourceEntityVersion =
@@ -147,7 +146,7 @@ public class ResourceAllocator implements SvcLogicResource {
             ResourceData rd = endPointAllocator.getResource(rt.resourceTargetType, rt.resourceTargetId, rr.resourceName,
                     rr.resourceEntityTypeFilter, rr.resourceEntityIdFilter, rr.resourceShareGroupFilter);
             setResourceDataInResponse(Collections.singletonList(rd), rsList);
-        } else if ((rr!=null && (rr.resourceTargetTypeFilter != null || rr.resourceTargetIdFilter != null))
+        } else if (rr != null && (rr.resourceTargetTypeFilter != null || rr.resourceTargetIdFilter != null)
                 && rr.resourceName != null) {
             List<ResourceData> rdlist = endPointAllocator.getResourcesForTarget(rr.resourceTargetTypeFilter,
                     rr.resourceTargetIdFilter, rr.resourceName);
@@ -198,7 +197,7 @@ public class ResourceAllocator implements SvcLogicResource {
     @Override
     public QueryStatus release(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
         String resourceEntityId = getParam(ctx,
-                new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, true, null);
+                new String[] {"service-instance-id", "resource-entity-id", "reservation-entity-id"}, true, null);
         String resourceEntityType =
                 getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, true, null);
         String resourceEntityVersion =
@@ -207,6 +206,11 @@ public class ResourceAllocator implements SvcLogicResource {
                 getParam(ctx, new String[] {"reservation-target-id", "resource-target-id"}, false, null);
         String resourceTargetType =
                 getParam(ctx, new String[] {"reservation-target-type", "resource-target-type"}, false, null);
+        String resourceName = getParam(ctx, new String[] {"resource-name"}, false, null);
+        String limitReleaseAmountStr = getParam(ctx, new String[] {"limit-release-amount"}, false, "-1");
+        int limitReleaseAmount = Integer.parseInt(limitReleaseAmountStr);
+        String rangeReleaseNumbers = getParam(ctx, new String[] {"range-release-numbers"}, false, null);
+
 
         String endPointPosition = getParam(ctx, "endpoint-position", false, null);
 
@@ -217,6 +221,9 @@ public class ResourceAllocator implements SvcLogicResource {
 
         ResourceRequest rr = new ResourceRequest();
         rr.endPointPosition = endPointPosition;
+        rr.resourceName = resourceName;
+        rr.rangeReleaseNumbers = rangeReleaseNumbers;
+        rr.limitReleaseAmount = limitReleaseAmount;
 
         ResourceTarget rt = new ResourceTarget();
         rt.resourceTargetType = resourceTargetType;
@@ -240,44 +247,46 @@ public class ResourceAllocator implements SvcLogicResource {
 
     public AllocationStatus release(ResourceEntity sd, ResourceRequest rr, ResourceTarget rt) throws Exception {
 
+        ReleaseRequest releaseRequest = new ReleaseRequest();
+
         if (sd != null && sd.resourceEntityVersion != null) {
-            String resourceSet = null;
+            releaseRequest.resourceSetId = null;
 
             if (rr != null && rr.endPointPosition != null && !rr.endPointPosition.isEmpty()) {
-                resourceSet = sd.resourceEntityType + "::" + sd.resourceEntityId + "::" + rr.endPointPosition + "::"
-                        + sd.resourceEntityVersion;
-            } else {
-                resourceSet = sd.resourceEntityType + "::" + sd.resourceEntityId + "::" + sd.resourceEntityVersion;
-            }
-
-            if (rt != null && rt.resourceTargetId != null && rt.resourceTargetType != null) {
-                String assetId = rt.resourceTargetType + "::" + rt.resourceTargetId;
-                log.info(START_RELEASE_FOR_TARGET, resourceSet, assetId);
-                resourceManager.releaseResourceSet(resourceSet, assetId);
+                releaseRequest.resourceSetId = sd.resourceEntityType + "::" + sd.resourceEntityId + "::"
+                        + rr.endPointPosition + "::" + sd.resourceEntityVersion;
             } else {
-                log.info(START_RELEASE, resourceSet);
-                resourceManager.releaseResourceSet(resourceSet);
+                releaseRequest.resourceSetId =
+                        sd.resourceEntityType + "::" + sd.resourceEntityId + "::" + sd.resourceEntityVersion;
             }
 
         } else if (sd != null && (sd.resourceEntityVersion == null || sd.resourceEntityVersion.isEmpty())) {
-            String resourceUnion = null;
+            releaseRequest.resourceUnionId = null;
 
             if (rr != null && rr.endPointPosition != null && !rr.endPointPosition.isEmpty()) {
-                resourceUnion = sd.resourceEntityType + "::" + sd.resourceEntityId + "::" + rr.endPointPosition;
+                releaseRequest.resourceUnionId =
+                        sd.resourceEntityType + "::" + sd.resourceEntityId + "::" + rr.endPointPosition;
             } else {
-                resourceUnion = sd.resourceEntityType + "::" + sd.resourceEntityId;
+                releaseRequest.resourceUnionId = sd.resourceEntityType + "::" + sd.resourceEntityId;
             }
+        }
 
-            if (rt != null && rt.resourceTargetId != null && rt.resourceTargetType != null) {
-                String assetId = rt.resourceTargetType + "::" + rt.resourceTargetId;
-                log.info(START_RELEASE_FOR_TARGET, resourceUnion, assetId);
-                resourceManager.releaseResourceUnion(resourceUnion, assetId);
-            } else {
-                log.info(START_RELEASE, resourceUnion);
-                resourceManager.releaseResourceUnion(resourceUnion);
-            }
+        if (rt != null && rt.resourceTargetId != null && rt.resourceTargetType != null) {
+            releaseRequest.assetId = rt.resourceTargetType + "::" + rt.resourceTargetId;
+        }
+
+        if (rr != null) {
+            releaseRequest.resourceName = rr.resourceName;
+            releaseRequest.releaseNumbers =
+                    StrUtil.listInt(rr.rangeReleaseNumbers, "Invalid value for range-release-numbers");
+            releaseRequest.releaseAmount = rr.limitReleaseAmount;
         }
 
+        log.info("Releasing resources:");
+        StrUtil.info(log, releaseRequest);
+
+        resourceManager.releaseResources(releaseRequest);
+
         return AllocationStatus.Success;
     }
 
@@ -386,7 +395,7 @@ public class ResourceAllocator implements SvcLogicResource {
     private ResourceEntity getResourceEntityData(SvcLogicContext ctx) throws SvcLogicException {
         ResourceEntity sd = new ResourceEntity();
         sd.resourceEntityId = getParam(ctx,
-                new String[] {"service-instance-id", "reservation-entity-id", "resource-entity-id"}, true, null);
+                new String[] {"service-instance-id", "resource-entity-id", "reservation-entity-id"}, true, null);
         sd.resourceEntityType =
                 getParam(ctx, new String[] {"reservation-entity-type", "resource-entity-type"}, true, null);
         sd.resourceEntityVersion =
index f4109a1..d188429 100644 (file)
@@ -39,6 +39,7 @@ import org.onap.ccsdk.sli.adaptors.rm.data.MultiResourceAllocationOutcome;
 import org.onap.ccsdk.sli.adaptors.rm.data.RangeAllocationItem;
 import org.onap.ccsdk.sli.adaptors.rm.data.RangeAllocationOutcome;
 import org.onap.ccsdk.sli.adaptors.rm.data.RangeResource;
+import org.onap.ccsdk.sli.adaptors.rm.data.ReleaseRequest;
 import org.onap.ccsdk.sli.adaptors.rm.data.Resource;
 import org.onap.ccsdk.sli.adaptors.util.str.StrUtil;
 import org.slf4j.Logger;
@@ -83,7 +84,7 @@ public class EndPointAllocatorImpl implements EndPointAllocator {
                 if (!allgood) {
                     String resourceSetId = resourceEntity.resourceEntityType + "::" + resourceEntity.resourceEntityId
                             + "::" + resourceEntity.resourceEntityVersion;
-                    resourceManager.releaseResourceSet(resourceSetId);
+                    resourceManager.releaseResources(ReleaseRequest.resourceSet(resourceSetId));
                 }
             }
         }
index c870bc4..bc05af6 100644 (file)
@@ -48,4 +48,6 @@ public class ResourceRequest {
     public String resourceShareGroupFilter;
     public String resourceTargetTypeFilter;
     public String resourceTargetIdFilter;
+    public String rangeReleaseNumbers;
+    public int limitReleaseAmount;
 }
index b26c54c..b466b16 100644 (file)
@@ -9,9 +9,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.
@@ -22,6 +22,7 @@
 
 package org.onap.ccsdk.sli.adaptors.rm.comp;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -30,7 +31,11 @@ import org.onap.ccsdk.sli.adaptors.lock.comp.ResourceLockedException;
 import org.onap.ccsdk.sli.adaptors.lock.comp.SynchronizedFunction;
 import org.onap.ccsdk.sli.adaptors.rm.dao.ResourceDao;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationItem;
+import org.onap.ccsdk.sli.adaptors.rm.data.LimitAllocationItem;
+import org.onap.ccsdk.sli.adaptors.rm.data.RangeAllocationItem;
+import org.onap.ccsdk.sli.adaptors.rm.data.ReleaseRequest;
 import org.onap.ccsdk.sli.adaptors.rm.data.Resource;
+import org.onap.ccsdk.sli.adaptors.rm.data.ResourceType;
 import org.onap.ccsdk.sli.adaptors.rm.util.ResourceUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,42 +47,93 @@ class ReleaseFunction extends SynchronizedFunction {
 
     private ResourceDao resourceDao;
 
-    private String resourceSetId;
-    private String resourceUnionId;
-    private String assetId;
+    private ReleaseRequest releaseRequest;
 
-    public ReleaseFunction(LockHelper lockHelper, ResourceDao resourceDao, String resourceSetId, String resourceUnionId,
-            String assetId, Collection<String> lockNames, int lockTimeout) {
+    public ReleaseFunction(LockHelper lockHelper, ResourceDao resourceDao, ReleaseRequest releaseRequest,
+            Collection<String> lockNames, int lockTimeout) {
         super(lockHelper, lockNames, lockTimeout);
         this.resourceDao = resourceDao;
-        this.resourceSetId = resourceSetId;
-        this.resourceUnionId = resourceUnionId;
-        this.assetId = assetId;
+        this.releaseRequest = releaseRequest;
     }
 
     @Override
     public void _exec() throws ResourceLockedException {
-        List<Resource> resourceList = assetId != null
-                ? (resourceSetId != null ? resourceDao.getResourceSetForAsset(resourceSetId, assetId)
-                        : resourceDao.getResourceUnionForAsset(resourceUnionId, assetId))
-                : (resourceSetId != null ? resourceDao.getResourceSet(resourceSetId)
-                        : resourceDao.getResourceUnion(resourceUnionId));
+        List<Resource> resourceList = new ArrayList<>();
+        if (releaseRequest.assetId != null && releaseRequest.resourceName != null) {
+            Resource r = resourceDao.getResource(releaseRequest.assetId, releaseRequest.resourceName);
+            if (r != null) {
+                resourceList.add(r);
+            }
+        } else if (releaseRequest.assetId != null) {
+            if (releaseRequest.resourceSetId != null) {
+                resourceList = resourceDao.getResourceSetForAsset(releaseRequest.resourceSetId, releaseRequest.assetId);
+            } else {
+                resourceList =
+                        resourceDao.getResourceUnionForAsset(releaseRequest.resourceUnionId, releaseRequest.assetId);
+            }
+        } else {
+            if (releaseRequest.resourceSetId != null) {
+                resourceList = resourceDao.getResourceSet(releaseRequest.resourceSetId);
+            } else {
+                resourceList = resourceDao.getResourceUnion(releaseRequest.resourceUnionId);
+            }
+        }
+
         for (Resource r : resourceList) {
             boolean updated = false;
             if (r.allocationItems != null) {
                 Iterator<AllocationItem> i = r.allocationItems.iterator();
                 while (i.hasNext()) {
                     AllocationItem ai = i.next();
-                    if (resourceSetId != null) {
-                        if (resourceSetId.equals(ai.resourceSetId)) {
-                            i.remove();
+                    if (releaseRequest.resourceSetId != null) {
+
+                        if (releaseRequest.resourceSetId.equals(ai.resourceSetId)) {
+                            if (r.resourceType == ResourceType.Limit) {
+                                LimitAllocationItem lai = (LimitAllocationItem) ai;
+                                if (releaseRequest.releaseAmount > 0 && releaseRequest.releaseAmount < lai.used) {
+                                    lai.used -= releaseRequest.releaseAmount;
+                                } else {
+                                    i.remove();
+                                }
+                            } else if (r.resourceType == ResourceType.Range) {
+                                RangeAllocationItem rai = (RangeAllocationItem) ai;
+                                if (releaseRequest.releaseNumbers != null && !releaseRequest.releaseNumbers.isEmpty()) {
+                                    rai.used.removeAll(releaseRequest.releaseNumbers);
+                                    if (rai.used.isEmpty()) {
+                                        i.remove();
+                                    }
+                                } else {
+                                    i.remove();
+                                }
+                            } else {
+                                i.remove();
+                            }
                             updated = true;
                         }
 
-                    } else if (resourceUnionId != null) {
+                    } else if (releaseRequest.resourceUnionId != null) {
 
-                        if (resourceUnionId.equals(ai.resourceUnionId)) {
-                            i.remove();
+                        if (releaseRequest.resourceUnionId.equals(ai.resourceUnionId)) {
+                            if (r.resourceType == ResourceType.Limit) {
+                                LimitAllocationItem lai = (LimitAllocationItem) ai;
+                                if (releaseRequest.releaseAmount > 0 && releaseRequest.releaseAmount < lai.used) {
+                                    lai.used -= releaseRequest.releaseAmount;
+                                } else {
+                                    i.remove();
+                                }
+                            } else if (r.resourceType == ResourceType.Range) {
+                                RangeAllocationItem rai = (RangeAllocationItem) ai;
+                                if (releaseRequest.releaseNumbers != null && !releaseRequest.releaseNumbers.isEmpty()) {
+                                    rai.used.removeAll(releaseRequest.releaseNumbers);
+                                    if (rai.used.isEmpty()) {
+                                        i.remove();
+                                    }
+                                } else {
+                                    i.remove();
+                                }
+                            } else {
+                                i.remove();
+                            }
                             updated = true;
                         }
 
index 68d2515..9dd54cc 100644 (file)
@@ -24,6 +24,7 @@ package org.onap.ccsdk.sli.adaptors.rm.comp;
 import java.util.List;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationOutcome;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationRequest;
+import org.onap.ccsdk.sli.adaptors.rm.data.ReleaseRequest;
 import org.onap.ccsdk.sli.adaptors.rm.data.Resource;
 
 public interface ResourceManager {
@@ -34,13 +35,7 @@ public interface ResourceManager {
 
     AllocationOutcome allocateResources(AllocationRequest allocationRequest);
 
-    void releaseResourceSet(String resourceSetId);
-
-    void releaseResourceUnion(String resourceUnionId);
-
-    void releaseResourceSet(String resourceSetId, String assetId);
-
-    void releaseResourceUnion(String resourceUnionId, String assetId);
+    void releaseResources(ReleaseRequest releaseRequest);
 
     Resource queryResource(String resourceName, String assetId, String resourceUnionFilter,
             String resourceShareGroupFilter);
index c4d53ce..83da270 100644 (file)
@@ -28,6 +28,7 @@ import org.onap.ccsdk.sli.adaptors.lock.comp.LockHelper;
 import org.onap.ccsdk.sli.adaptors.rm.dao.ResourceDao;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationOutcome;
 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationRequest;
+import org.onap.ccsdk.sli.adaptors.rm.data.ReleaseRequest;
 import org.onap.ccsdk.sli.adaptors.rm.data.Resource;
 import org.onap.ccsdk.sli.adaptors.rm.util.ResourceUtil;
 import org.onap.ccsdk.sli.adaptors.util.str.StrUtil;
@@ -80,54 +81,31 @@ public class ResourceManagerImpl implements ResourceManager {
     }
 
     @Override
-    public void releaseResourceSet(String resourceSetId) {
-        List<Resource> resourceList = resourceDao.getResourceSet(resourceSetId);
-        if (resourceList == null || resourceList.isEmpty()) {
+    public void releaseResources(ReleaseRequest releaseRequest) {
+        if (releaseRequest.resourceSetId == null && releaseRequest.resourceUnionId == null) {
             return;
         }
 
-        Set<String> lockNames = getLockNames(resourceList);
-        ReleaseFunction releaseFunction =
-                new ReleaseFunction(lockHelper, resourceDao, resourceSetId, null, null, lockNames, lockTimeout);
-        releaseFunction.exec();
-    }
-
-    @Override
-    public void releaseResourceUnion(String resourceUnionId) {
-        List<Resource> resourceList = resourceDao.getResourceUnion(resourceUnionId);
-        if (resourceList == null || resourceList.isEmpty()) {
-            return;
-        }
-
-        Set<String> lockNames = getLockNames(resourceList);
-        ReleaseFunction releaseFunction =
-                new ReleaseFunction(lockHelper, resourceDao, null, resourceUnionId, null, lockNames, lockTimeout);
-        releaseFunction.exec();
-    }
-
-    @Override
-    public void releaseResourceSet(String resourceSetId, String assetId) {
-        List<Resource> resourceList = resourceDao.getResourceSetForAsset(resourceSetId, assetId);
-        if (resourceList == null || resourceList.isEmpty()) {
-            return;
-        }
-
-        Set<String> lockNames = getLockNames(resourceList);
-        ReleaseFunction releaseFunction =
-                new ReleaseFunction(lockHelper, resourceDao, resourceSetId, null, assetId, lockNames, lockTimeout);
-        releaseFunction.exec();
-    }
-
-    @Override
-    public void releaseResourceUnion(String resourceUnionId, String assetId) {
-        List<Resource> resourceList = resourceDao.getResourceUnionForAsset(resourceUnionId, assetId);
-        if (resourceList == null || resourceList.isEmpty()) {
-            return;
+        Set<String> lockNames = new HashSet<>();
+        if (releaseRequest.assetId != null) {
+            lockNames.add(releaseRequest.assetId);
+        } else {
+            List<Resource> resourceList = null;
+            if (releaseRequest.resourceSetId != null) {
+                resourceList = resourceDao.getResourceSet(releaseRequest.resourceSetId);
+            } else {
+                resourceList = resourceDao.getResourceUnion(releaseRequest.resourceUnionId);
+            }
+
+            if (resourceList == null || resourceList.isEmpty()) {
+                return;
+            }
+
+            lockNames = getLockNames(resourceList);
         }
 
-        Set<String> lockNames = getLockNames(resourceList);
         ReleaseFunction releaseFunction =
-                new ReleaseFunction(lockHelper, resourceDao, null, resourceUnionId, assetId, lockNames, lockTimeout);
+                new ReleaseFunction(lockHelper, resourceDao, releaseRequest, lockNames, lockTimeout);
         releaseFunction.exec();
     }
 
index c94a5d8..f9de428 100644 (file)
@@ -4,6 +4,7 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
  *                         reserved.
+ *  Modifications Copyright (C) 2018 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,6 +37,8 @@ import org.springframework.jdbc.support.KeyHolder;
 
 public class ResourceJdbcDaoImpl implements ResourceJdbcDao {
 
+    private static final String baseSelectResourceQuery = "SELECT * FROM RESOURCE WHERE resource_id IN (\n";
+
     @SuppressWarnings("unused")
     private static final Logger log = LoggerFactory.getLogger(ResourceJdbcDaoImpl.class);
 
@@ -44,16 +47,16 @@ public class ResourceJdbcDaoImpl implements ResourceJdbcDao {
     private static final String RESOURCE_QUERY_1_SQL =
             "SELECT * FROM RESOURCE WHERE asset_id LIKE ? AND resource_name = ?";
 
-    private static final String RESOURCE_SET_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+    private static final String RESOURCE_SET_SQL = baseSelectResourceQuery
             + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_set_id = ?)";
 
-    private static final String RESOURCE_UNION_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+    private static final String RESOURCE_UNION_SQL = baseSelectResourceQuery
             + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_union_id = ?)";
 
-    private static final String RESOURCE_SET_FOR_ASSET_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+    private static final String RESOURCE_SET_FOR_ASSET_SQL = baseSelectResourceQuery
             + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_set_id = ?) AND asset_id = ?";
 
-    private static final String RESOURCE_UNION_FOR_ASSET_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+    private static final String RESOURCE_UNION_FOR_ASSET_SQL = baseSelectResourceQuery
             + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_union_id = ?) AND asset_id = ?";
 
     private static final String INSERT_SQL = "INSERT INTO RESOURCE (\n"
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/data/ReleaseRequest.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/data/ReleaseRequest.java
new file mode 100644 (file)
index 0000000..dba6a17
--- /dev/null
@@ -0,0 +1,46 @@
+/*-
+ * ============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.adaptors.rm.data;
+
+import java.util.Set;
+
+public class ReleaseRequest {
+
+    public String resourceUnionId = null;
+    public String resourceSetId = null;
+    public String assetId = null;
+    public String resourceName = null;
+    public int releaseAmount = 0;
+    public Set<Integer> releaseNumbers = null;
+
+    public static ReleaseRequest resourceSet(String resourceSetId) {
+        ReleaseRequest rr = new ReleaseRequest();
+        rr.resourceSetId = resourceSetId;
+        return rr;
+    }
+
+    public static ReleaseRequest resourceUnion(String resourceUnionId) {
+        ReleaseRequest rr = new ReleaseRequest();
+        rr.resourceUnionId = resourceUnionId;
+        return rr;
+    }
+}
index 5dcf599..9aa3f26 100644 (file)
@@ -96,6 +96,12 @@ public class DataSetup {
         return allocationItem.exists(where);
     }
 
+    public boolean checkItemNotThere(String resourceName, String assetId, String resourceSetId) {
+        String where = "resource_id = (SELECT resource_id FROM RESOURCE WHERE resource_name = '" + resourceName
+                + "' AND asset_id = '" + assetId + "') AND resource_set_id = '" + resourceSetId + "'";
+        return !allocationItem.exists(where);
+    }
+
     public void setTestDb(TestDb testDb) {
         this.testDb = testDb;
     }
index a936786..88ec586 100644 (file)
@@ -49,6 +49,8 @@ public class TestRelease {
 
         dataSetup.setupRangeItem("test-range-1", "Port::TESTPORT-2", "EVC::TEST-5::1", "EVC::TEST-5", "5");
 
+        dataSetup.setupRangeItem("test-range-1", "Port::TESTPORT-2", "EVC::TEST-6::1", "EVC::TEST-6", "6-20");
+
         dataSetup.setupLimitItem("test-limit-1", "Port::TESTPORT-1", "EVC::TEST-1::1", "EVC::TEST-1", 100);
 
         dataSetup.setupLimitItem("test-limit-1", "Port::TESTPORT-1", "EVC::TEST-2::1", "EVC::TEST-2", 200);
@@ -67,6 +69,8 @@ public class TestRelease {
         dataSetup.setupLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-3::2", "EVC::TEST-3", 400);
 
         dataSetup.setupLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-5::1", "EVC::TEST-5", 500);
+
+        dataSetup.setupLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-6::1", "EVC::TEST-6", 1000);
     }
 
     @Test
@@ -297,4 +301,120 @@ public class TestRelease {
         Assert.assertTrue(dataSetup.checkLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-3::1", 300));
         Assert.assertTrue(dataSetup.checkLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-3::2", 400));
     }
+
+    @Test
+    public void test007() throws Exception {
+
+        String t = "007";
+        log.info("============== release node " + t + " ================================");
+        log.info("=== Test release - partial release of range");
+
+        setupResourceData();
+
+        Assert.assertTrue(dataSetup.checkRangeItem("test-range-1", "Port::TESTPORT-2", "EVC::TEST-6::1", "6-20"));
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("ra-input.resource-entity-type", "EVC");
+        ctx.setAttribute("ra-input.resource-entity-id", "TEST-6");
+        ctx.setAttribute("ra-input.resource-entity-version", "1");
+
+        ctx.setAttribute("ra-input.resource-target-type", "Port");
+        ctx.setAttribute("ra-input.resource-target-id", "TESTPORT-2");
+
+        ctx.setAttribute("ra-input.resource-name", "test-range-1");
+        ctx.setAttribute("ra-input.range-release-numbers", "7,9,15-17");
+
+        QueryStatus st = resourceAllocator.release("NETWORK-CAPACITY", null, ctx);
+
+        Assert.assertTrue(st == QueryStatus.SUCCESS);
+
+        Assert.assertTrue(dataSetup.checkRangeItem("test-range-1", "Port::TESTPORT-2", "EVC::TEST-6::1", "6,8,10-14,18-20"));
+    }
+
+    @Test
+    public void test008() throws Exception {
+
+        String t = "008";
+        log.info("============== release node " + t + " ================================");
+        log.info("=== Test release - partial release of range, but release all numbers");
+
+        setupResourceData();
+
+        Assert.assertTrue(dataSetup.checkRangeItem("test-range-1", "Port::TESTPORT-2", "EVC::TEST-6::1", "6-20"));
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("ra-input.resource-entity-type", "EVC");
+        ctx.setAttribute("ra-input.resource-entity-id", "TEST-6");
+        ctx.setAttribute("ra-input.resource-entity-version", "1");
+
+        ctx.setAttribute("ra-input.resource-target-type", "Port");
+        ctx.setAttribute("ra-input.resource-target-id", "TESTPORT-2");
+
+        ctx.setAttribute("ra-input.resource-name", "test-range-1");
+        ctx.setAttribute("ra-input.range-release-numbers", "6-25");
+
+        QueryStatus st = resourceAllocator.release("NETWORK-CAPACITY", null, ctx);
+
+        Assert.assertTrue(st == QueryStatus.SUCCESS);
+
+        Assert.assertTrue(dataSetup.checkItemNotThere("test-range-1", "Port::TESTPORT-2", "EVC::TEST-6::1"));
+    }
+
+    @Test
+    public void test009() throws Exception {
+
+        String t = "009";
+        log.info("============== release node " + t + " ================================");
+        log.info("=== Test release - partial release of limit");
+
+        setupResourceData();
+
+        Assert.assertTrue(dataSetup.checkLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-6::1", 1000));
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("ra-input.resource-entity-type", "EVC");
+        ctx.setAttribute("ra-input.resource-entity-id", "TEST-6");
+        ctx.setAttribute("ra-input.resource-entity-version", "1");
+
+        ctx.setAttribute("ra-input.resource-target-type", "Port");
+        ctx.setAttribute("ra-input.resource-target-id", "TESTPORT-2");
+
+        ctx.setAttribute("ra-input.resource-name", "test-limit-1");
+        ctx.setAttribute("ra-input.limit-release-amount", "200");
+
+        QueryStatus st = resourceAllocator.release("NETWORK-CAPACITY", null, ctx);
+
+        Assert.assertTrue(st == QueryStatus.SUCCESS);
+
+        Assert.assertTrue(dataSetup.checkLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-6::1", 800));
+    }
+
+    @Test
+    public void test010() throws Exception {
+
+        String t = "010";
+        log.info("============== release node " + t + " ================================");
+        log.info("=== Test release - partial release of limit, but release big number");
+
+        setupResourceData();
+
+        Assert.assertTrue(dataSetup.checkLimitItem("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-6::1", 1000));
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("ra-input.resource-entity-type", "EVC");
+        ctx.setAttribute("ra-input.resource-entity-id", "TEST-6");
+        ctx.setAttribute("ra-input.resource-entity-version", "1");
+
+        ctx.setAttribute("ra-input.resource-target-type", "Port");
+        ctx.setAttribute("ra-input.resource-target-id", "TESTPORT-2");
+
+        ctx.setAttribute("ra-input.resource-name", "test-limit-1");
+        ctx.setAttribute("ra-input.limit-release-amount", "2000");
+
+        QueryStatus st = resourceAllocator.release("NETWORK-CAPACITY", null, ctx);
+
+        Assert.assertTrue(st == QueryStatus.SUCCESS);
+
+        Assert.assertTrue(dataSetup.checkItemNotThere("test-limit-1", "Port::TESTPORT-2", "EVC::TEST-6::1"));
+    }
 }
index 377257c..bfb9ad7 100644 (file)
@@ -28,6 +28,7 @@ public class TestResourceLockNode {
     public void test1() throws Exception {
         Map<String, String> paramMap = new HashMap<>();
         paramMap.put("resource-name", "test-resource-1");
+        paramMap.put("lock-requester", "SDNA");
 
         resourceLockNode.lockResource(paramMap, null);
         resourceLockNode.unlockResource(paramMap, null);
index 8f58b89..1947a17 100644 (file)
 
   ============LICENSE_END=========================================================
   -->
-
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>saltstack-adaptor</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <name>ccsdk-sli-adaptors :: saltstack-adapter</name>
     <description>Abstractions to interact with Saltstack server via REST
     </description>
index 67bc40f..09ed8db 100644 (file)
@@ -1,52 +1,40 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         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>
+       xmlns="http://maven.apache.org/POM/4.0.0"
+       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-SNAPSHOT</version>
-        <relativePath/>
-    </parent>
+       <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.adaptors</groupId>
-    <artifactId>ccsdk-saltstack-adapter</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-    <packaging>feature</packaging>
+       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+       <artifactId>ccsdk-saltstack-adapter</artifactId>
+       <version>0.4.1-SNAPSHOT</version>
+       <packaging>feature</packaging>
+
+       <name>ccsdk-sli-adaptors :: saltstack-adapter:: ${project.artifactId}</name>
+
+       <properties>
+               <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+       </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>ccsdk-sli</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>xml</type>
+                       <classifier>features</classifier>
+               </dependency>
+               <dependency>
+                       <groupId>${project.groupId}</groupId>
+                       <artifactId>saltstack-adapter-provider</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
 
-    <name>ccsdk-sli-adaptors :: saltstack-adapter:: ${project.artifactId}</name>
-    <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>ccsdk-sli</artifactId>
-               <type>xml</type>
-               <classifier>features</classifier>
-           </dependency>
-           <dependency>
-               <groupId>${project.groupId}</groupId>
-               <artifactId>saltstack-adapter-provider</artifactId>
-               <version>${project.version}</version>
-           </dependency>
-       </dependencies>
-  -->
 </project>
index 44f156f..9c4693e 100755 (executable)
@@ -1,24 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-saltstack-adapter</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: saltstack-adapter :: ${project.artifactId}
     </name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 1ed6bb8..674dc14 100644 (file)
     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========================================================= -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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>
         <artifactId>odlparent-lite</artifactId>
         <groupId>org.onap.ccsdk.parent</groupId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>saltstack-adapter-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <name>ccsdk-sli-adaptors :: saltstack-adapter :: ${project.artifactId}
     </name>
 
index 5a7d582..da2f620 100644 (file)
 
   ============LICENSE_END=========================================================
   -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>saltstack-adapter-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <name>ccsdk-sli-adaptors :: saltstack-adapter :: ${project.artifactId}
     </name>
     <packaging>pom</packaging>
index 5308dc1..5fee5cd 100644 (file)
        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========================================================= -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>saltstack-adapter-provider</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>ccsdk-sli-adaptors :: saltstack-adapter :: ${project.artifactId}
     </name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
+
     <dependencies>
         <dependency>
             <groupId>com.att.eelf</groupId>
index 39138b3..cc72027 100644 (file)
@@ -1,45 +1,32 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>ccsdk-sql-resource</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource :: ${project.artifactId}</name>
 
-       <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>
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
 
         <dependency>
             <groupId>org.onap.ccsdk.sli.core</groupId>
             <artifactId>ccsdk-sli</artifactId>
+            <version>${ccsdk.sli.core.version}</version>
             <type>xml</type>
             <classifier>features</classifier>
             <scope>provided</scope>
index e2dad22..8c23b28 100755 (executable)
@@ -1,22 +1,25 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>features-sql-resource</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource :: ${project.artifactId}</name>
 
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 4aed70a..12e2761 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.1.1</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>sql-resource-features</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource :: ${project.artifactId}</name>
index 0a074e3..d1d9dda 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>sql-resource-installer</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource :: ${project.artifactId}</name>
index 8b16377..5146a92 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>sql-resource</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource</name>
index dc562da..23b4414 100755 (executable)
@@ -1,18 +1,17 @@
 <?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>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <version>1.2.1-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.sli.adaptors</groupId>
     <artifactId>sql-resource-provider</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <version>0.4.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>ccsdk-sli-adaptors :: sql-resource :: ${project.artifactId}</name>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
     </properties>
 
+    <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.core</groupId>
+                       <artifactId>sli-core-artifacts</artifactId>
+                       <version>${ccsdk.sli.core.version}</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+    </dependencyManagement>
+
     <dependencies>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>dblib-provider</artifactId>
             <scope>provided</scope>
         </dependency>
-
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.core</artifactId>
+                       <scope>provided</scope>
+               </dependency>
     </dependencies>
 
 
index 7439a50..2a56aed 100644 (file)
@@ -5,10 +5,10 @@
 
 release_name=0
 sprint_number=4
-feature_revision=0
+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