summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nokia/pom.xml2
-rw-r--r--nokia/vnfmdriver/pom.xml2
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt4
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapter2drivermgr.json18
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapterinfo.json14
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/restclient.json11
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/server.p12bin0 -> 2661 bytes
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/sslconf.json9
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/trust.jksbin0 -> 1321 bytes
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfd_ids.json7
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json40
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile59
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/docker/LICENSE473
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh34
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh68
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/init-mysql.sh22
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/instance-config.sh25
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh23
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/instance-run.sh23
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/instance-workaround.sh16
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java13
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java5
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/impl/MsbMgmrImpl.java168
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/inf/IMsbMgmr.java22
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/service/MsgServiceRegister.java40
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java2
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties5
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/register.properties23
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/swagger.json608
29 files changed, 1730 insertions, 6 deletions
diff --git a/nokia/pom.xml b/nokia/pom.xml
index 7428da3a..80923c97 100644
--- a/nokia/pom.xml
+++ b/nokia/pom.xml
@@ -25,7 +25,7 @@
<artifactId>vfc-nfvo-driver-vnfm-svnfm-nokia</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>vfc/nfvo/driver/vnfm/svnfm/nokia</name>
+ <name>vfc-nfvo-driver-vnfm-svnfm-nokia</name>
<description>vfc-nfvo-driver-vnfm-svnfm-nokia</description>
<modules>
<module>vnfmdriver</module>
diff --git a/nokia/vnfmdriver/pom.xml b/nokia/vnfmdriver/pom.xml
index d39781bb..4506f99b 100644
--- a/nokia/vnfmdriver/pom.xml
+++ b/nokia/vnfmdriver/pom.xml
@@ -26,7 +26,7 @@
<artifactId>vnfmdriver</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver</name>
+ <name>vfc-nfvo-driver-vnfm-svnfm-nokia-vnfmdriver</name>
<description>nfvo vnfmdriver</description>
<modules>
<module>vfcadaptorservice</module>
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt
index fa97d7e6..6681c16a 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt
@@ -31,6 +31,8 @@ Configuration steps:
- Update the VNFM address in 'application.properties' under webapps directory.
- Update the Catalog address in 'application.properties' under webapps directory.
- Update the NSLCM address in 'application.properties' under webapps directory.
+ - Update the MSB address in $PATH/etc/conf/restclient.json
+ - Update the vnfmadapter service ip address in $PATH/etc/adapterInfo/vnfmadapterinfo.json
How to run?
@@ -43,7 +45,7 @@ How to run?
'conf/server.xml'
- Verify that 'Tomcat started.' is reported on the console.
- Once service is started, please verify below details:
- - from MSB service, verify that "nokiavnfm" is reported from GET request on "/openoapi/microservices/v1/services"
+ - from MSB service, verify that "nokia-vnfm-driver" is reported from GET request on "/openoapi/microservices/v1/services"
- from this service, run one of the supported REST API mentioned in open-o NFVO wiki and verify that the
expected response is returned.
How to stop?
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapter2drivermgr.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapter2drivermgr.json
new file mode 100644
index 00000000..f3d5440f
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapter2drivermgr.json
@@ -0,0 +1,18 @@
+{
+ "driverInfo": {
+ "driverName": "nokiavnfmdriver",
+ "instanceID": "nokiavnfm-0-1",
+ "ip": "127.0.0.1",
+ "port": "8485",
+ "protocol": "http",
+ "services": [{
+ "service_url": "/api/nokiavnfmdriver/v1",
+ "support_sys": [{
+ "type": "vnfm",
+ "version": "V100R001"
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapterinfo.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapterinfo.json
new file mode 100644
index 00000000..27d395d2
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/adapterInfo/vnfmadapterinfo.json
@@ -0,0 +1,14 @@
+{
+ "serviceName": "nokia-vnfm-driver",
+ "version": "v1",
+ "url": "/api/nokiavnfmdriver/v1",
+ "protocol": "REST",
+ "visualRange": "1",
+ "nodes": [
+ {
+ "ip": "127.0.0.1",
+ "port": "8485",
+ "ttl": 0
+ }
+ ]
+} \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/restclient.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/restclient.json
new file mode 100644
index 00000000..17679fea
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/restclient.json
@@ -0,0 +1,11 @@
+{
+ "defaultServer":
+ {
+ "host":"127.0.0.1",
+ "port":"80"
+ },
+"ConnectTimeout":"300000",
+"thread":"10",
+"idletimeout":"500000",
+"timeout":"300000"
+} \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/server.p12 b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/server.p12
new file mode 100644
index 00000000..5bc1b7a9
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/server.p12
Binary files differ
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/sslconf.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/sslconf.json
new file mode 100644
index 00000000..d4c53239
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/sslconf.json
@@ -0,0 +1,9 @@
+{
+ "trustStore":"etc/conf/trust.jks",
+ "trustStoreType":"jks",
+ "trustStorePass":"Changeme_123",
+ "keyStore":"etc/conf/server.p12",
+ "keyStoreType":"PKCS12",
+ "keyStorePass":"Changeme_123"
+
+} \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/trust.jks b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/trust.jks
new file mode 100644
index 00000000..30b62ce8
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/conf/trust.jks
Binary files differ
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfd_ids.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfd_ids.json
new file mode 100644
index 00000000..d56e85be
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfd_ids.json
@@ -0,0 +1,7 @@
+{
+ "vnfdIds":{
+ "vHSS_HW":"1",
+ "vSPGW_HW":"1",
+ "vSBC_vP-CSCF":"1"
+ }
+}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
new file mode 100644
index 00000000..432889d0
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
@@ -0,0 +1,40 @@
+{
+ "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"
+ }
+ }
+} \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile
new file mode 100755
index 00000000..5534a26d
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile
@@ -0,0 +1,59 @@
+#
+# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
+#
+# nfvo-driver-vnfm-huawei/target/Dockerfile
+#
+
+# 10-basebuild.txt
+
+FROM centos:7
+
+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 update -y
+
+RUN yum install -y wget unzip socat java-1.8.0-openjdk-headless
+RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/jre/lib/security/java.security
+ENV JAVA_HOME /usr/lib/jvm/jre
+
+WORKDIR /service
+
+# 20-mysq.txt
+
+# Set up mysql
+RUN wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm && rm -f mysql-community-release-el7-5.noarch.rpm
+RUN yum -y update
+RUN yum -y install -y mysql-server
+RUN mysql_install_db --user=mysql --datadir=/var/lib/mysql
+COPY init-mysql.sh .
+
+# 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
+# Set up tomcat
+RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.20.tar.gz && rm -f apache-tomcat-8.5.20.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT
+RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
+ENV CATALINA_HOME /service
+
+# 50-microservice.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
+
+# Set up microservice
+# https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm&a=vfcadaptor-deployment&v=LATEST&e=zip
+RUN wget -q -O nfvo-driver-vnfm-nokia-1.0.0-SNAPSHOT.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm&a=vfcadaptor-deployment&v=LATEST&e=zip" && unzip -q -o -B nfvo-driver-vnfm-nokia-1.0.0-SNAPSHOT.zip && rm -f nfvo-driver-vnfm-nokia-1.0.0-SNAPSHOT.zip
+# Set permissions
+RUN find . -type d -exec chmod o-w {} \;
+RUN find . -name "*.sh" -exec chmod +x {} \;
+EXPOSE 8485
+RUN echo ONAP nfvo-driver-vnfm-nokia 1.0.0-SNAPSHOT "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm&a=vfcadaptor-deployment&v=LATEST&e=zip" > ONAP_VERSION
+
+
+# 90-entrypoint.txt
+
+RUN yum clean all
+
+COPY instance-config.sh .
+COPY instance-init.sh .
+COPY instance-run.sh .
+COPY instance-workaround.sh .
+COPY docker-entrypoint.sh .
+ENTRYPOINT /service/docker-entrypoint.sh
+
+COPY LICENSE ./ONAP_LICENSE
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/LICENSE b/nokia/vnfmdriver/vfcadaptorservice/docker/LICENSE
new file mode 100644
index 00000000..dd08487b
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/LICENSE
@@ -0,0 +1,473 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+---------------------------------------------------------------------------------------
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the "Licensor." The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh
new file mode 100755
index 00000000..b83cf6cd
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/build_image.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+DIRNAME=`dirname $0`
+DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
+echo "DOCKER_BUILD_DIR=${DOCKER_BUILD_DIR}"
+cd ${DOCKER_BUILD_DIR}
+
+BUILD_ARGS="--no-cache"
+ORG="onap"
+VERSION="1.0.0-SNAPSHOT"
+PROJECT="vfc"
+IMAGE="nfvo/svnfm/huawei"
+DOCKER_REPOSITORY="nexus3.onap.org:10003"
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
+
+if [ $HTTP_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
+fi
+if [ $HTTPS_PROXY ]; then
+ 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}:${VERSION} -t ${IMAGE_NAME}:latest .
+}
+
+function push_image {
+ echo "Start push docker image: ${IMAGE_NAME}"
+ docker push ${IMAGE_NAME}:${VERSION}
+ docker push ${IMAGE_NAME}:latest
+}
+
+build_image
+push_image
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh
new file mode 100755
index 00000000..1d235f61
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Copyright 2017 Huawei Technologies Co., Ltd.
+#
+# 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.
+#
+#
+# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
+#
+# nfvo-driver-vnfm-huawei/target/docker-entrypoint.sh
+#
+
+if [ -z "$SERVICE_IP" ]; then
+ export SERVICE_IP=`hostname -i`
+fi
+echo
+echo Environment Variables:
+echo "SERVICE_IP=$SERVICE_IP"
+
+if [ -z "$MSB_ADDR" ]; then
+ echo "Missing required variable MSB_ADDR: Microservices Service Bus address <ip>:<port>"
+ exit 1
+fi
+echo "MSB_ADDR=$MSB_ADDR"
+echo
+
+# Wait for MSB initialization
+echo Wait for MSB initialization
+for i in {1..10}; do
+ curl -sS -m 1 $MSB_ADDR > /dev/null && break
+ sleep $i
+done
+
+echo
+
+# Configure service based on docker environment variables
+./instance-config.sh
+
+# Start mysql
+su mysql -c /usr/bin/mysqld_safe &
+
+# Perform one-time config
+if [ ! -e init.log ]; then
+ # Perform workarounds due to defects in release binary
+ ./instance-workaround.sh
+
+ # Init mysql; set root password
+ ./init-mysql.sh
+
+ # microservice-specific one-time initialization
+ ./instance-init.sh
+
+ date > init.log
+fi
+
+# Start the microservice
+./instance-run.sh
+
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/init-mysql.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/init-mysql.sh
new file mode 100755
index 00000000..50fc17f5
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/init-mysql.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 CMCC Technologies Co., Ltd.
+#
+# 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.
+#
+# Wait for mysql to initialize; Set mysql root password
+echo Initializing mysql
+for i in {1..10}; do
+ /usr/bin/mysqladmin -u root password 'rootpass' &> /dev/null && break
+ sleep $i
+done
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-config.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-config.sh
new file mode 100755
index 00000000..ce9d31db
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-config.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Copyright 2017 Huawei Technologies Co., Ltd.
+#
+# 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.
+#
+# Config MSB address
+MSB_IP=`echo $MSB_ADDR | cut -d: -f 1`
+sed -i "s|127\.0\.0\.1|${MSB_IP}|" etc/conf/restclient.json
+cat etc/conf/restclient.json
+
+# Set self IP
+sed -i "s|127\.0\.0\.1|$SERVICE_IP|" etc/adapterInfo/vnfmadapterinfo.json
+cat etc/adapterInfo/vnfmadapterinfo.json
+
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh
new file mode 100755
index 00000000..3975b5ad
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Copyright 2017 Huawei Technologies Co., Ltd.
+#
+# 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.
+#
+# Config mysql credentials
+
+#sed -i "s|rootpass|rootpass|" webapps/ROOT/WEB-INF/classes/spring/Vnfmadapter/services.xml
+
+# Initialize MySQL schema
+cd bin
+./init_db.sh root rootpass 127.0.0.1 3306
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-run.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-run.sh
new file mode 100755
index 00000000..5078e636
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-run.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# 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.
+#
+# Start microservice
+cd bin
+./startup.sh
+while [ ! -e ../logs/vnfmadapterservice.log ]; do
+ sleep 1
+done
+tail -F ../logs/vnfmadapterservice.log
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-workaround.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-workaround.sh
new file mode 100755
index 00000000..d9637aea
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-workaround.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# Copyright 2017 CMCC Technologies Co., Ltd.
+#
+# 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.
+#
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java
index 93454329..343e517e 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java
@@ -23,16 +23,23 @@ import org.springframework.stereotype.Component;
public class AdaptorEnv {
@Value("${nslcmApiUriFront}")
private String nslcmApiUriFront;
+
@Value("${catalogApiUriFront}")
private String catalogApiUriFront;
+
@Value("${cbamApiUriFront}")
private String cbamApiUriFront;
+ @Value("${msbApiUriFront}")
+ private String msbApiUriFront;
+
//for retrieving token from CBAM
@Value("${grantType}")
private String grantType;
+
@Value("${clientId}")
private String clientId;
+
@Value("${clientSecret}")
private String clientSecret;
@@ -72,5 +79,11 @@ public class AdaptorEnv {
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
+ public String getMsbApiUriFront() {
+ return msbApiUriFront;
+ }
+ public void setMsbApiUriFront(String msbApiUriFront) {
+ this.msbApiUriFront = msbApiUriFront;
+ }
}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java
index c145e28c..22c06ef0 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java
@@ -57,4 +57,9 @@ public class CommonConstants {
public static final String CBAM_OPERATION_STATUS_START = "start";
public static final String CBAM_OPERATION_STATUS_FINISH = "finished";
+
+ //MSB
+ public static final String MSB_REGISTER_SERVICE_PATH = "/api/microservices/v1/services";
+// public static final String MSB_REGISTER_SERVICE_PATH = "/api/microservices/v1/services/{serviceName}/version/{version}/nodes/{ip}/{port}";
+ public static final String MSB_UNREGISTER_SERVICE_PATH = "/api/microservices/v1/services/%s/version/%s/nodes/%s/%s";
}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/impl/MsbMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/impl/MsbMgmrImpl.java
new file mode 100644
index 00000000..ed85fcfc
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/impl/MsbMgmrImpl.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2016-2017, Nokia 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.
+ */
+
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.impl;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.inf.IMsbMgmr;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ResourceUtils;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@Component
+public class MsbMgmrImpl implements IMsbMgmr {
+ private static final Logger logger = LogManager.getLogger("MsbMgmrImpl");
+ @Autowired
+ private HttpClientBuilder httpClientBuilder;
+
+ @Autowired
+ private AdaptorEnv adaptorEnv;
+
+ @Value("${serviceName}")
+ private String serviceName;
+
+ @Value("${version}")
+ private String version;
+
+ @Value("${url}")
+ private String url;
+
+ @Value("${protocol}")
+ private String protocol;
+
+ @Value("${visualRange}")
+ private String visualRange;
+
+ @Value("${ip}")
+ private String ip;
+
+ @Value("${port}")
+ private String port;
+
+ @Value("${ttl}")
+ private String ttl;
+
+ @Override
+ public void register() {
+ String httpPath = CommonConstants.MSB_REGISTER_SERVICE_PATH;
+ RequestMethod method = RequestMethod.POST;
+
+ try {
+ String jsonStr = readVfcAdaptorInfoFromJsonFile();
+ String registerResponse = operateHttpTask(jsonStr, httpPath, method);
+ logger.info("registerResponse is ", registerResponse);
+ } catch (IOException e) {
+ logger.error("Failed to read vfcadaptor info! ", e);
+ }
+
+ }
+
+ public String readVfcAdaptorInfoFromJsonFile() throws IOException {
+ InputStream ins = null;
+ BufferedInputStream bins = null;
+ String fileContent = "";
+ String fileName = getAppRoot() + "/etc/adapterInfo/vnfmadapterinfo.json";
+
+ try {
+ ins = new FileInputStream(fileName);
+ bins = new BufferedInputStream(ins);
+
+ byte[] contentByte = new byte[ins.available()];
+ int num = bins.read(contentByte);
+
+ if(num > 0) {
+ fileContent = new String(contentByte);
+ }
+ } catch(FileNotFoundException e) {
+ logger.error(fileName + "is not found!", e);
+ } finally {
+ if(ins != null) {
+ ins.close();
+ }
+ if(bins != null) {
+ bins.close();
+ }
+ }
+
+ return fileContent;
+ }
+
+ @Override
+ public void unregister() {
+ String httpPath = String.format(CommonConstants.MSB_UNREGISTER_SERVICE_PATH, serviceName, version, ip, port);
+ RequestMethod method = RequestMethod.DELETE;
+
+ try {
+ String jsonStr = readVfcAdaptorInfoFromJsonFile();
+ String registerResponse = operateHttpTask(jsonStr, httpPath, method);
+ logger.info("unregisterResponse is ", registerResponse);
+ } catch (IOException e) {
+ logger.error("Failed to unregister! ", e);
+ }
+
+ }
+
+ public String operateHttpTask(String httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException {
+ String url=adaptorEnv.getMsbApiUriFront() + httpPath;
+ HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method);
+ processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
+
+ processor.addPostEntity(httpBodyObj);
+
+ String responseStr = processor.process(url);
+
+ return responseStr;
+ }
+
+ public String getAppRoot() {
+ String appRoot = null;
+ appRoot = System.getProperty("catalina.base");
+ if(appRoot != null) {
+ appRoot = getCanonicalPath(appRoot);
+ }
+ return appRoot;
+ }
+
+ private String getCanonicalPath(final String inPath) {
+ String path = null;
+ try {
+ if(inPath != null) {
+ final File file = new File(inPath);
+ path = file.getCanonicalPath();
+ }
+ } catch(final IOException e) {
+ logger.error("file.getCanonicalPath() IOException:", e);
+ }
+ return path;
+ }
+
+}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/inf/IMsbMgmr.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/inf/IMsbMgmr.java
new file mode 100644
index 00000000..aaabc3f2
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/inf/IMsbMgmr.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2016-2017, Nokia 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.
+ */
+
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.inf;
+
+public interface IMsbMgmr {
+ public void register();
+ public void unregister();
+}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/service/MsgServiceRegister.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/service/MsgServiceRegister.java
new file mode 100644
index 00000000..5f52297d
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/msb/service/MsgServiceRegister.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2016-2017, Nokia 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.
+ */
+
+package org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.service;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.msb.inf.IMsbMgmr;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
+
+@Component
+public class MsgServiceRegister implements ApplicationRunner{
+ private static final Logger logger = LogManager.getLogger("MsgServiceRegister");
+
+ @Autowired
+ private IMsbMgmr msbMgmr;
+
+ @Override
+ public void run(ApplicationArguments arg0) {
+ msbMgmr.register();
+ logger.info("nokia vnfm driver successfully registered on the MSB");
+ }
+
+}
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java
index a3aee38e..39b6b3f6 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java
@@ -47,7 +47,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.google.gson.Gson;
@Controller
-@RequestMapping(value = "/nokiavnfm/v1")
+@RequestMapping(value = "/api/nokiavnfmdriver/v1")
public class VnfmDriverController {
private static final Logger logger = LogManager.getLogger("VnfmDriverController");
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties
index 0ae1288c..225b04ad 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties
@@ -35,8 +35,9 @@ logging.level.org.hibernate=ERROR
## common configuration for connections begin ##
nslcmApiHttpFront=http://1.2.3.4:88
-catalogApiUriFront=http://1.2.6.7:88
-cbamApiUriFront=https://1.2.5.4:88
+catalogApiUriFront=http://2.2.3.4:88
+cbamApiUriFront=https://3.2.3.4:88
+msbApiUriFront=http://4.2.3.4:88
## for retrieving token from CBAM ##
grantType=grantType1
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/register.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/register.properties
new file mode 100644
index 00000000..04929955
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/register.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright 2016, Nokia 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.
+###############################################################################
+serviceName=nokia-vnfm-driver
+version=v1
+url=/api/nokiavnfmdriver/v1
+protocol=HTTP
+visualRange=1
+ip=135.251.208.57
+port=8988
+ttl=0 \ No newline at end of file
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/swagger.json b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/swagger.json
new file mode 100644
index 00000000..aeb6621c
--- /dev/null
+++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/swagger.json
@@ -0,0 +1,608 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Nokia VNFM Driver API",
+ "description": "VNF service provider.",
+ "version": "1.0.0"
+ },
+ "tags": [
+ {
+ "name": "Nokia VNFM Driver services"
+ }
+ ],
+ "basePath": "/api",
+ "paths": {
+ "/{vnfmtype}/v1/{vnfmid}/vnfs": {
+ "post": {
+ "summary": "Instantiate VNF",
+ "description": "Add VNF",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "vnfmtype",
+ "in": "path",
+ "description": "vnfm type",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "vnfmid",
+ "in": "path",
+ "description": "vnfm id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "vnf",
+ "description": "Provide required properties of VNF.",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Vnf"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "VNF Response",
+ "schema": {
+ "$ref": "#/definitions/VnfResponse"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "VNF Not Found"
+ },
+ "500": {
+ "description": "VNF service failed to process the request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/{vnfmtype}/v1/{vnfmid}/vnfs/{vnfInstanceId}/terminate": {
+ "post": {
+ "summary": "Terminate VNF",
+ "description": "Delete VNF",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "vnfmtype",
+ "in": "path",
+ "description": "vnfm type",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "vnfmid",
+ "in": "path",
+ "description": "vnfm id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "vnfInstanceId",
+ "in": "path",
+ "description": "vnfm instance id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "vnfTerminate",
+ "description": "Provide required properties of VNF.",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/VnfTerminate"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "VNF Response",
+ "schema": {
+ "$ref": "#/definitions/VnfTerminateResponse"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "VNF Not Found"
+ },
+ "500": {
+ "description": "VNF service failed to process the request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/{vnfmtype}/v1/{vnfmid}/vnfs/{vnfInstanceId}": {
+ "get": {
+ "summary": "Query VNF",
+ "description": "Get VNF Details",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "vnfmtype",
+ "in": "path",
+ "description": "vnfm type",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "vnfmid",
+ "in": "path",
+ "description": "vnfm id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "vnfInstanceId",
+ "in": "path",
+ "description": "vnfm instance id",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "VNF Response",
+ "schema": {
+ "$ref": "#/definitions/VnfInfoResponse"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "VNF Not Found"
+ },
+ "500": {
+ "description": "VNF service failed to process the request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/{vnfmtype}/v1/jobs/{jobid}": {
+ "get": {
+ "summary": "Get VNF operational status",
+ "description": "VNF operational status",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "vnfmtype",
+ "in": "path",
+ "description": "vnfm type",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "jobid",
+ "in": "path",
+ "description": "jobid",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "responseId",
+ "in": "query",
+ "description": "vnfm response id",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "VNF Response",
+ "schema": {
+ "$ref": "#/definitions/VnfStatusResponse"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "VNF Not Found"
+ },
+ "500": {
+ "description": "VNF service failed to process the request",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "VnfStatusResponse": {
+ "type": "object",
+ "description": "Operational Status Response.",
+ "required": [
+ "jobId",
+ "responseDescriptor",
+ "status",
+ "progress",
+ "statusDescription",
+ "errorCode",
+ "responseId",
+ "responseHistoryList"
+ ],
+ "properties": {
+ "jobId": {
+ "type": "string",
+ "description": "Job ID"
+ },
+ "responseDescriptor": {
+ "type": "string",
+ "description": "Including vnfStatus, statusDescription, errorCode, progress, responseHistoryList, responseId."
+ },
+ "status": {
+ "type": "string",
+ "description": "JOB status started processing finished error"
+ },
+ "progress": {
+ "type": "integer",
+ "description": "Progress (1 - 100)"
+ },
+ "statusDescription": {
+ "type": "string",
+ "description": "Progress Description"
+ },
+ "errorCode": {
+ "type": "integer",
+ "description": "Errorcode"
+ },
+ "responseId": {
+ "type": "integer",
+ "description": "Response Identifier"
+ },
+ "responseHistoryList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/HistoryDetails"
+ }
+ }
+ }
+ },
+ "HistoryDetails": {
+ "type": "object",
+ "description": "InitiateVnfResponse.",
+ "required": [
+ "vnfStatus",
+ "statusDescription",
+ "errorCode",
+ "progress",
+ "responseId"
+ ],
+ "properties": {
+ "vnfStatus": {
+ "type": "string",
+ "description": "Vnf Job Status."
+ },
+ "statusDescription": {
+ "type": "string",
+ "description": "Progress Description."
+ },
+ "errorCode": {
+ "type": "integer",
+ "description": "Error code."
+ },
+ "progress": {
+ "type": "integer",
+ "description": "progress (1-100)."
+ },
+ "responseId": {
+ "type": "integer",
+ "description": "Response Identifier."
+ }
+ }
+ },
+ "VnfResponse": {
+ "type": "object",
+ "description": "InitiateVnfResponse.",
+ "required": [
+ "jobId",
+ "vnfInstanceId"
+ ],
+ "properties": {
+ "jobId": {
+ "type": "string",
+ "description": "Identifier of the VNF lifecycle operation occurrence."
+ },
+ "vnfInstanceId": {
+ "type": "string",
+ "description": "Identifier of the VNF instance."
+ }
+ }
+ },
+ "VnfTerminateResponse": {
+ "type": "object",
+ "description": "TerminateVnfResponse.",
+ "required": [
+ "jobId"
+ ],
+ "properties": {
+ "jobId": {
+ "type": "string",
+ "description": "Identifier of the VNF lifecycle operation occurrence."
+ }
+ }
+ },
+ "VnfInfoResponse": {
+ "type": "object",
+ "description": "The information items about the selected VNF instance(s) that are returned..",
+ "required": [
+ "VnfInfo"
+ ],
+ "properties": {
+ "VnfInfo": {
+ "$ref": "#/definitions/VnfInfo"
+ }
+ }
+ },
+ "VnfInfo": {
+ "type": "object",
+ "description": "The information items about the selected VNF instance(s) that are returned..",
+ "required": [
+ "vnfInstanceId",
+ "vnfInstanceName",
+ "vnfInstanceDescription",
+ "vnfdId",
+ "vnfPackageId",
+ "version",
+ "vnfProvider",
+ "vnfType",
+ "vnfStatus"
+ ],
+ "properties": {
+ "vnfInstanceId": {
+ "type": "string",
+ "description": "VNF instance identifier."
+ },
+ "vnfInstanceName": {
+ "type": "string",
+ "description": "VNF instance name."
+ },
+ "vnfInstanceDescription": {
+ "type": "string",
+ "description": "Human-readable description of the VNF instance."
+ },
+ "vnfdId": {
+ "type": "string",
+ "description": "Identifier of the VNFD on which the VNF instance is based."
+ },
+ "vnfPackageId": {
+ "type": "string",
+ "description": "Identifier of the VNF Package used to manage the lifecycle of the VNF instance."
+ },
+ "version": {
+ "type": "string",
+ "description": "Version of the VNF."
+ },
+ "vnfProvider": {
+ "type": "string",
+ "description": "Name of the person or company providing the VNF."
+ },
+ "vnfType": {
+ "type": "string",
+ "description": "VNF Application Type."
+ },
+ "vnfStatus": {
+ "default": "active",
+ "enum": [
+ "inactive",
+ "active"
+ ],
+ "description": "The instantiation state of the VNF. Possible values:INACTIVE (Vnf is terminated or not instantiated ), ACTIVE (Vnf is instantiated). [instantiationState]."
+ }
+ }
+ },
+ "VnfTerminate": {
+ "type": "object",
+ "description": "Terminate VNF.",
+ "required": [
+ "terminationType",
+ "gracefulTerminationTimeout"
+ ],
+ "properties": {
+ "terminationType": {
+ "default": "forceful",
+ "enum": [
+ "forceful",
+ "graceful"
+ ],
+ "description": "Signals whether forceful or graceful termination is requested.."
+ },
+ "gracefulTerminationTimeout": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The time interval (second) to wait for the VNF to be taken out of service during graceful termination, before shutting down the VNF and releasing the resources."
+ }
+ }
+ },
+ "Vnf": {
+ "type": "object",
+ "description": "VNF encapsulate an external IP for the given project in a domain. Each property description is provided with 1. required 2. update allowed 3. format. whenever its needs to be mentioned explicitly.",
+ "required": [
+ "vnfInstanceName",
+ "vnfPackageId",
+ "vnfDescriptorId",
+ "flavourId",
+ "vnfInstanceDescription",
+ "extVirtualLink"
+ ],
+ "properties": {
+ "vnfInstanceName": {
+ "type": "string",
+ "description": "Human-readable name of the VNF instance to be created.."
+ },
+ "vnfPackageId": {
+ "type": "string",
+ "description": "VNF packageId."
+ },
+ "vnfDescriptorId": {
+ "type": "string",
+ "description": "Information sufficient to identify the VNF Descriptor which defines the VNF to be created."
+ },
+ "flavourId": {
+ "type": "string",
+ "description": "verify."
+ },
+ "vnfInstanceDescription": {
+ "type": "string",
+ "description": "Human-readable description of the VNF instance to be created."
+ },
+ "extVirtualLink": {
+ "$ref": "#/definitions/ExtVirtualLinkData"
+ }
+ }
+ },
+ "ExtVirtualLinkData": {
+ "type": "object",
+ "description": "References to external virtual links to connect the VNF to.",
+ "required": [
+ "vlInstanceId",
+ "vim",
+ "networkId",
+ "cpdId"
+ ],
+ "properties": {
+ "vlInstanceId": {
+ "type": "string",
+ "description": "Identifier of the VL instance."
+ },
+ "vim": {
+ "$ref": "#/definitions/VimInfo"
+ },
+ "networkId": {
+ "type": "string",
+ "description": "The network UUID of network"
+ },
+ "cpdId": {
+ "type": "string",
+ "description": "Identifier of the external CPD in VNFD"
+ }
+ }
+ },
+ "VimInfo": {
+ "type": "object",
+ "description": "Information about the VIM that manages this resource.",
+ "required": [
+ "vimInfoId",
+ "vimId",
+ "interfaceInfo",
+ "accessInfo",
+ "interfaceEndpoint"
+ ],
+ "properties": {
+ "vimInfoId": {
+ "type": "string",
+ "description": "The identifier of this VimInfo instance, for the purpose of referencing it from other information elements."
+ },
+ "vimId": {
+ "type": "string",
+ "description": "The identifier of the VIM.."
+ },
+ "interfaceInfo": {
+ "$ref": "#/definitions/interfaceInfo"
+ },
+ "accessInfo": {
+ "$ref": "#/definitions/accessInfo"
+ },
+ "interfaceEndpoint": {
+ "type": "string",
+ "description": "Information about the interface endpoint. An example is a URL."
+ }
+ }
+ },
+ "interfaceInfo": {
+ "type": "object",
+ "description": "Information about the interface to the VIM, including VIM provider type, API version, and protocol type..",
+ "required": [
+ "vimType",
+ "apiVersion",
+ "protocolType"
+ ],
+ "properties": {
+ "vimType": {
+ "type": "string",
+ "description": "vim"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "api version"
+ },
+ "protocolType": {
+ "type": "string",
+ "description": "Type of the protocol"
+ }
+ }
+ },
+ "accessInfo": {
+ "type": "object",
+ "description": "Authentication credentials for accessing the VIM. Examples may include those to support different authentication schemes, e.g., OAuth, Token, etc..",
+ "required": [
+ "tenant",
+ "username",
+ "password"
+ ],
+ "properties": {
+ "tenant": {
+ "type": "string",
+ "description": "Tenant Name of tenant"
+ },
+ "username": {
+ "type": "string",
+ "description": "Username for login"
+ },
+ "password": {
+ "type": "string",
+ "description": "Password of login user"
+ }
+ }
+ },
+ "Error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+} \ No newline at end of file