summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json76
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java7
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml52
-rw-r--r--nokiav2/deployment/pom.xml58
-rwxr-xr-xnokiav2/deployment/src/main/resources/Dockerfile9
-rwxr-xr-xnokiav2/deployment/src/main/resources/build_image.sh19
-rwxr-xr-xnokiav2/deployment/src/main/resources/test_xmlstarlet.sh7
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml20
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.md51
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.sha11
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom36
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.md51
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.sha11
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml11
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.md51
-rw-r--r--nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.sha11
19 files changed, 95 insertions, 209 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json b/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
index 432889d0..82fcb480 100644
--- a/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
+++ b/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
@@ -1,40 +1,42 @@
{
- "1": {
- "template": {
- "name": "vCPE",
- "ftp_server_ip": "192.168.237.179",
- "ftp_server_port": "21",
- "ftp_username": "ftpsuser",
- "ftp_password": "ftpsuser",
- "csar_file_path": "/home/ftpsuser/files/",
- "csar_file_name": "VCPE_VNF.csar",
- "vnfd_file_path": "/files/SoftwareImages/",
- "vnfd_file_name": "vCPE.zip",
- "image_file_path": "/files/SoftwareImages/",
- "image_file_name": "ar_img.zip",
- "software_file_path": "",
- "software_file_name": "",
- "catalog": "",
- "vim_id": "NE=34603199"
- }
- },
- "2": {
- "template": {
- "name": "vCPE",
- "ftp_server_ip": "192.168.237.179",
- "ftp_server_port": "21",
- "ftp_username": "ftpsuser",
- "ftp_password": "ftpsuser",
- "csar_file_path": "/home/ftpsuser/files/",
- "csar_file_name": "VCPE_VNF.csar",
- "vnfd_file_path": "/files/SoftwareImages/",
- "vnfd_file_name": "vCPE.zip",
- "image_file_path": "/files/SoftwareImages/",
- "image_file_name": "ar_img.zip",
- "software_file_path": "",
- "software_file_name": "",
- "catalog": "",
- "vim_id": "NE=34603199"
- }
+ "1": {
+ "template": {
+ "name": "vCPE",
+ "ftp_server_ip": "192.168.237.179",
+ "ftp_server_port": "21",
+ "ftp_username": "ftpsuser",
+ "ftp_password": "ftpsuser",
+ "csar_file_path": "/home/ftpsuser/files/",
+ "csar_file_name": "VCPE_VNF.csar",
+ "vnfd_file_path": "/files/SoftwareImages/",
+ "vnfd_file_name": "vCPE.zip",
+ "image_file_path": "/files/SoftwareImages/",
+ "image_file_name": "ar_img.zip",
+ "software_file_path": "",
+ "software_file_name": "",
+ "catalog": "",
+ "vim_id": "NE=34603199"
}
+ },
+ "2": {
+ "template": {
+ "name": "vCPE",
+ "ftp_server_ip": "192.168.237.179",
+ "ftp_server_port": "21",
+ "ftp_username": "ftpsuser",
+ "ftp_password": "ftpsuser",
+ "csar_file_path": "/home/ftpsuser/files/",
+ "csar_file_name": "VCPE_VNF.csar",
+ "vnfd_file_path": "/files/SoftwareImages/",
+ "vnfd_file_name": "vCPE.zip",
+ "image_file_path": "/files/SoftwareImages/",
+ "image_file_name": "ar_img.zip",
+ "software_file_path": "",
+ "software_file_name": "",
+ "catalog": "",
+ "vim_id": "NE=34603199"
+ }
+ },
+ "vnfmid": "",
+ "vimid": ""
} \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
index d0a06a25..1a93f281 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
@@ -47,7 +47,6 @@ public class AuthMgr {
restJson.put(Constant.RETCODE, Constant.REST_FAIL);
try {
String userName = params.getString(Constant.USERNAME);
-
restJson = getStatusResult(userName);
} catch(JSONException e) {
LOG.error("function=login, msg=Params error occurs, e={}.", e);
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
index 2e7e28ca..f90126c8 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
@@ -46,7 +46,7 @@ import net.sf.json.JSONObject;
* auth tokens interface is provided by platform
* not in nfvo for vnfm
* differences from other interface
- * </p>
+ * </p>
*
* @author
* @version VFC 1.0 Aug 24, 2016
@@ -91,16 +91,13 @@ public class AuthRoa {
LOG.warn("authResult: {}", authResult);
if(authResult.getInt(Constant.RETCODE) == Constant.REST_SUCCESS) {
JSONObject data = authResult.getJSONObject("data");
-
resp.setStatus(Constant.HTTP_OK);
return data.toString();
} else if(authResult.getInt(Constant.RETCODE) == Constant.HTTP_INNERERROR) {
Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(authResult.getString("data")).build();
-
return String.format(ParamConstants.GET_TOKEN_FAIL_RESP, authResult.getString("data"));
} else {
Response.status(Response.Status.UNAUTHORIZED).entity(authResult.getString("data")).build();
-
return String.format(ParamConstants.GET_TOKEN_FAIL_RESP, authResult.getString("data"));
}
}
@@ -109,7 +106,6 @@ public class AuthRoa {
* Provide interface for delete authInfo
* <br/>
*
- * @param context
* @param userName
* @param roarand
* @return
@@ -132,7 +128,6 @@ public class AuthRoa {
* Provide interface for handshake authInfo
* <br/>
*
- * @param context
* @param roattr
* @return
* @since VFC 1.0
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
index 27a5ae3e..f0934c91 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
@@ -38,7 +38,6 @@ public class SwaggerRoa {
/**
* API doc.
*
- * @param filename
* @return
* @throws IOException
*/
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
index fe9f9530..6ad35f6a 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
@@ -46,7 +46,6 @@ public class VnfAdapterResourceRoa {
* Provide function of grant resource.
* <br/>
*
- * @param context
* @return
* @since VFC 1.0
*/
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
index 972d2210..e14a37f4 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
@@ -16,11 +16,12 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
- xmlns:ctx="http://www.springframework.org/schema/context"
- xmlns:jaxrs="http://cxf.apache.org/jaxrs"
- xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
- xsi:schemaLocation="
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
@@ -37,37 +38,38 @@
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">
<!-- these are included in the dependency jar -->
- <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
- <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
+ <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
- <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<!-- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/> -->
+ <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/>
+ Change mysql-connector to mariadb -->
<property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
<property name="url" value="jdbc:mariadb://localhost:3306/vnfmdb"/>
<property name="username" value="root"/>
<property name="password" value="rootpass"/>
</bean>
- <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="source" />
- <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml" />
+ <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+ <property name="dataSource" ref="source"/>
+ <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml"/>
<!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
</bean>
<bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
- <constructor-arg index="0" ref="sessionFactory" />
+ <constructor-arg index="0" ref="sessionFactory"/>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="source" />
+ <property name="dataSource" ref="source"/>
</bean>
<bean id="vnfmDao"
- class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
+ class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
<property name="session" ref="session"></property>
</bean>
@@ -80,14 +82,14 @@
</bean>
<bean id="vnfResourceMgr"
- class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
+ class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
</bean>
<bean id="VnfResourceRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfResourceRoa">
<property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
</bean>
- <bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr" />
+ <bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr"/>
<bean id="AuthRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.AuthRoa">
<property name="authMgr" ref="authMgr"></property>
@@ -104,16 +106,16 @@
<jaxrs:server id="restContainer" address="/">
<jaxrs:serviceBeans>
- <ref bean="AuthRoa" />
- <ref bean="VnfResourceRoa" />
- <ref bean="VnfRoa" />
- <ref bean="VnfAdaResRoa" />
- <ref bean="SwaggerRoa" />
+ <ref bean="AuthRoa"/>
+ <ref bean="VnfResourceRoa"/>
+ <ref bean="VnfRoa"/>
+ <ref bean="VnfAdaResRoa"/>
+ <ref bean="SwaggerRoa"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
- <ref bean="jsonProvider" />
- <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper" />
- <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper" />
+ <ref bean="jsonProvider"/>
+ <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper"/>
+ <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper"/>
</jaxrs:providers>
</jaxrs:server>
</beans>
diff --git a/nokiav2/deployment/pom.xml b/nokiav2/deployment/pom.xml
index c58bc0ea..ff9bc505 100644
--- a/nokiav2/deployment/pom.xml
+++ b/nokiav2/deployment/pom.xml
@@ -26,72 +26,20 @@
<artifactId>vfc-nfvo-driver-vnfm-svnfm-nokiav2</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <repositories>
- <repository>
- <id>project.local</id>
- <name>project</name>
- <url>file:${project.basedir}/src/repo</url>
- </repository>
- </repositories>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <id>copy</id>
- <phase>install</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <excludeTypes>pom</excludeTypes>
- <artifactItems>
- <artifactItem>
- <artifactId>driverwar</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2</groupId>
- <type>war</type>
- <overWrite>true</overWrite>
- <outputDirectory>${project.basedir}/src/main/resources</outputDirectory>
- <destFileName>driver.war</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <descriptors>
- <descriptor>src/assembly/assembly.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>create-archive</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <!-- fail the bulid if xmlstarlet is not present in Jenkins env -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
- <executable>${project.basedir}/src/main/resources/build_image.sh</executable>
+ <executable>${project.basedir}/src/main/resources/test_xmlstarlet.sh</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
</configuration>
<executions>
<execution>
- <phase>package</phase>
+ <phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
diff --git a/nokiav2/deployment/src/main/resources/Dockerfile b/nokiav2/deployment/src/main/resources/Dockerfile
index e42f7b94..2ad7209c 100755
--- a/nokiav2/deployment/src/main/resources/Dockerfile
+++ b/nokiav2/deployment/src/main/resources/Dockerfile
@@ -1,17 +1,16 @@
FROM centos:7
WORKDIR /service
+ARG VERSION
COPY docker-entrypoint.sh .
COPY LICENSE ./ONAP_LICENSE
COPY application.properties .
-COPY driver.war .
-
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo
RUN yum -y update
-RUN yum -y install java-1.8.0-openjdk-headless
+RUN yum -y install java-1.8.0-openjdk-headless wget
# Debugging tools withing the container
-RUN yum -y install mc vim tcpdump wget net-tools nc strace telnet unzip
-#RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/jre/lib/security/java.security
+RUN yum -y install mc vim tcpdump net-tools nc strace telnet unzip xmlstarlet
+RUN wget -q -O driver.war "https://nexus.onap.org/service/local/artifact/maven/redirect?r=staging&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2&a=driverwar&v=${VERSION}&e=war"
ENV JAVA_HOME /usr/lib/jvm/jre
RUN yum clean all
EXPOSE 8089
diff --git a/nokiav2/deployment/src/main/resources/build_image.sh b/nokiav2/deployment/src/main/resources/build_image.sh
index 24706f86..358048d8 100755
--- a/nokiav2/deployment/src/main/resources/build_image.sh
+++ b/nokiav2/deployment/src/main/resources/build_image.sh
@@ -17,34 +17,43 @@
if [ "a$1" != "abuildDocker" ] ; then
echo "Skipping building Docker image"
+ echo "If you would like to build the docker image by script execute $0 buildDocker"
+ echo "If you would like to build and push the docker image by script execute $0 buildDocker pushImage"
echo "If you would like to build the docker image by maven execute mvn package -Dexec.args=\"buildDocker\""
+ echo "If you would like to push the docker image by maven execute mvn package -Dexec.args=\"buildDocker pushImage\""
exit
fi
DIRNAME=`dirname $0`
DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
-echo "DOCKER_BUILD_DIR=${DOCKER_BUILD_DIR}"
+echo "----- Build directory ${DOCKER_BUILD_DIR}"
cd ${DOCKER_BUILD_DIR}
-BUILD_ARGS="--no-cache --squash"
-ORG="onap"
-VERSION="1.1.0"
+VERSION=`xmlstarlet sel -t -v "/_:project/_:version" ../../../pom.xml | sed 's/-SNAPSHOT//g'`
+echo "------ Detected version: $VERSION"
+
PROJECT="vfc"
IMAGE="nfvo/svnfm/nokiav2"
DOCKER_REPOSITORY="nexus3.onap.org:10003"
+ORG="onap"
+BUILD_ARGS="--no-cache --squash"
IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
TIMESTAMP=$(date +"%Y%m%dT%H%M%S")
if [ $HTTP_PROXY ]; then
+ echo "----- Using HTTP proxy ${HTTP_PROXY}"
BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
fi
+
if [ $HTTPS_PROXY ]; then
+ echo "----- Using HTTPS proxy ${HTTPS_PROXY}"
BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
fi
function build_image {
echo "Start build docker image: ${IMAGE_NAME}"
- docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:latest .
+ echo "docker build --build-arg VERSION=${VERSION} ${BUILD_ARGS} -t ${IMAGE_NAME}:latest ."
+ docker build --build-arg VERSION=${VERSION} ${BUILD_ARGS} -t ${IMAGE_NAME}:latest .
}
function push_image_tag {
diff --git a/nokiav2/deployment/src/main/resources/test_xmlstarlet.sh b/nokiav2/deployment/src/main/resources/test_xmlstarlet.sh
new file mode 100755
index 00000000..f5ee03d3
--- /dev/null
+++ b/nokiav2/deployment/src/main/resources/test_xmlstarlet.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+DIRNAME=`dirname $0`
+BUILD_DIR=`cd $DIRNAME/; pwd`
+
+#If xmlstarlet is not present build will fail
+xmlstarlet ed ${BUILD_DIR}/../../../pom.xml
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml
deleted file mode 100644
index d0c75b95..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata modelVersion="1.1.0">
- <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId>
- <artifactId>vfc-nfvo-driver-vnfm-svnfm</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <versioning>
- <snapshot>
- <timestamp>20180308.094402</timestamp>
- <buildNumber>1</buildNumber>
- </snapshot>
- <lastUpdated>20180308094402</lastUpdated>
- <snapshotVersions>
- <snapshotVersion>
- <extension>pom</extension>
- <value>1.1.0-20180308.094402-1</value>
- <updated>20180308094402</updated>
- </snapshotVersion>
- </snapshotVersions>
- </versioning>
-</metadata>
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.md5 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.md5
deleted file mode 100644
index 472b3e80..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.md5
+++ /dev/null
@@ -1 +0,0 @@
-60b7495445e0beefa15d6d99e1a6e414 \ No newline at end of file
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.sha1 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.sha1
deleted file mode 100644
index ed4fb1f0..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/maven-metadata.xml.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a459cd0bb4960a3484035c0d3c8f877f467be5a5 \ No newline at end of file
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom
deleted file mode 100644
index ffe5bc6a..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright 2017 ZTE Corporation.
-
- 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.oparent</groupId>
- <artifactId>oparent</artifactId>
- <version>0.1.1</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId>
- <artifactId>vfc-nfvo-driver-vnfm-svnfm</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>vfc-nfvo-driver-vnfm-svnfm</name>
- <description>vfc-nfvo-driver-vnfm-svnfm</description>
- <modules>
- <module>zte</module>
- <module>huawei</module>
- <module>nokia</module>
- <module>nokiav2</module>
- </modules>
-</project>
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.md5 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.md5
deleted file mode 100644
index 48473a22..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.md5
+++ /dev/null
@@ -1 +0,0 @@
-e8f2e2ef2633830bbe80a3b78391e1b2 \ No newline at end of file
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.sha1 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.sha1
deleted file mode 100644
index f4fe3764..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/1.1.0-SNAPSHOT/vfc-nfvo-driver-vnfm-svnfm-1.1.0-20180308.094402-1.pom.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8f3224dcebfb83ec7dfd637f013728d55e701f5c \ No newline at end of file
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml
deleted file mode 100644
index 5bd2a7c0..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata>
- <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId>
- <artifactId>vfc-nfvo-driver-vnfm-svnfm</artifactId>
- <versioning>
- <versions>
- <version>1.1.0-SNAPSHOT</version>
- </versions>
- <lastUpdated>20180308094402</lastUpdated>
- </versioning>
-</metadata>
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.md5 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.md5
deleted file mode 100644
index 6fe29e47..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.md5
+++ /dev/null
@@ -1 +0,0 @@
-33379de33c0323f40765da74d9c89c23 \ No newline at end of file
diff --git a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.sha1 b/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.sha1
deleted file mode 100644
index 6a3c1f7b..00000000
--- a/nokiav2/deployment/src/repo/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfc-nfvo-driver-vnfm-svnfm/maven-metadata.xml.sha1
+++ /dev/null
@@ -1 +0,0 @@
-170dc16b9adbbbac54cc418990ae9ac03ee7ce9e \ No newline at end of file