Merge "Fix artifact deployment to nexus"
authorYan Yang <yangyanyj@chinamobile.com>
Thu, 1 Mar 2018 09:24:43 +0000 (09:24 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 1 Mar 2018 09:24:43 +0000 (09:24 +0000)
nokiav2/driver/pom.xml
nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/core/MsbApiProvider.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/onap/vfc/TestVfcExternalSystemInfoProvider.java
nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestBase.java
nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar
nokiav2/driverwar/pom.xml

index e770f3e..46dfe93 100644 (file)
     <dependency>
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
-      <version>20.0</version>
-      <!-- parsing VNFDs -->
+      <version>24.0-jre</version>
     </dependency>
     <dependency>
+      <!-- parsing VNFDs -->
       <groupId>org.yaml</groupId>
       <artifactId>snakeyaml</artifactId>
       <version>1.19</version>
@@ -96,9 +96,9 @@
       <version>1.2.0</version>
     </dependency>
     <dependency>
-  <groupId>org.onap.aai</groupId>
-        <artifactId>rest-client</artifactId>
-        <version>1.2.0</version>
+      <groupId>org.onap.aai</groupId>
+      <artifactId>rest-client</artifactId>
+      <version>1.2.0</version>
     </dependency>
   </dependencies>
   <build>
index b6f4644..b652b59 100644 (file)
@@ -59,8 +59,9 @@ public class MsbApiProvider extends IpMappingProvider {
      */
     public String getMicroServiceUrl(String name, String version) {
         MicroServiceFullInfo microServiceFullInfo = getMicroServiceInfo(name, version);
-        String protocol = "http://"; //FIXME the enable_ssl field should be used, but it is not available in SDK
         String ipAnPort = getNodeIpAnPort(microServiceFullInfo);
+        //FIXME the enable_ssl field should be used, but it is not available in SDK depends on MSB-151 jira issue
+        String protocol = (ipAnPort.endsWith(":8443") || ipAnPort.endsWith(":443")) ? "https://" : "http://";
         //the field name in A&AI is misleading the URL is relative path postfixed to http(s)://ip:port
         String fullUrl = protocol + ipAnPort + microServiceFullInfo.getUrl();
         return fullUrl;
index 1081b93..aec53e1 100644 (file)
@@ -63,8 +63,8 @@ public class TestVfcExternalSystemInfoProvider extends TestBase {
             vfcExternalSystemInfoProvider.getVimInfo(VIM_ID);
             fail();
         } catch (Exception e) {
-            assertEquals("Unable to query VIM from VF-C with myVimId identifier", e.getMessage());
-            verify(logger).error("Unable to query VIM from VF-C with myVimId identifier", expectedException);
+            assertEquals("Unable to query VIM from VF-C with " + VIM_ID +" identifier", e.getMessage());
+            verify(logger).error("Unable to query VIM from VF-C with " + VIM_ID+" identifier", expectedException);
         }
     }
 
index be3ea0e..99e95b4 100644 (file)
@@ -66,7 +66,7 @@ public class TestBase {
     public static final String VNF_ID = "myVnfId";
     public static final String VNFM_ID = "myVnfmId";
     public static final String ONAP_CSAR_ID = "myOnapCsarId";
-    public static final String VIM_ID = "myVimId";
+    public static final String VIM_ID = "myCloudOwnerId_myRegionName";
     public static final String JOB_ID = "myJobId";
     public static final String CBAM_VNFD_ID = "cbamVnfdId";
     @Mock
index 94f476f..1a17916 100644 (file)
Binary files a/nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar and b/nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar differ
index cb43467..a9a5c13 100644 (file)
   <name>vfc/nfvo/driver/vnfm/svnfm/nokiav2/driverwar</name>
   <description>svnfm vnfm driver</description>
   <parent>
-    <groupId>org.springframework.boot</groupId>
-    <artifactId>spring-boot-starter-parent</artifactId>
-    <version>1.5.9.RELEASE</version>
-    <relativePath/>
-    <!-- lookup parent from repository -->
+    <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2</groupId>
+    <artifactId>vfc-nfvo-driver-vnfm-svnfm-nokiav2</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-web</artifactId>
-      <version>1.5.9.RELEASE</version>
+      <version>1.5.10.RELEASE</version>
     </dependency>
   </dependencies>
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+          <archive>
+            <manifest>
+              <mainClass>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.NokiaSvnfmApplication</mainClass>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
-        <version>1.5.7.RELEASE</version>
+        <version>1.5.10.RELEASE</version>
         <configuration>
           <mainClass>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.NokiaSvnfmApplication</mainClass>
           <layout>ZIP</layout>