summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources
diff options
context:
space:
mode:
authorvictor.gao <victor.gao@huawei.com>2017-07-03 11:44:26 +0800
committervictor.gao <victor.gao@huawei.com>2017-07-03 11:44:26 +0800
commit7c9d941a80634d40d03f38c3f24ea503822d4b79 (patch)
tree247416f9c660e9eb2d05c71184fc3fe91bfe7160 /huawei/vnfmadapter/VnfmadapterService/service/src/main/resources
parent52543689bca23d9bd6b759a8dbf8f06bf61701f3 (diff)
Change: add OPEN-O seed code for VF-C
Change-Id: Iecacac039e86db2eae006c8947d6dd681e458b83 Signed-off-by: victor.gao <victor.gao@huawei.com>
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service/src/main/resources')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties23
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/mybatis/mysql/vnfmadapter.xml77
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/registerService.properties23
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml117
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/svc_register.xml43
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/swagger.json608
6 files changed, 891 insertions, 0 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties
new file mode 100644
index 00000000..833c7a77
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright 2016, 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.
+###############################################################################
+log4j.rootLogger=INFO,root
+log4j.appender.root.Append=true
+log4j.appender.root.File=${catalina.base}/logs/vnfmadapterservice.log
+log4j.appender.root.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
+log4j.appender.root.layout=org.apache.log4j.PatternLayout
+log4j.appender.root.MaxBackupIndex=50
+log4j.appender.root.MaxFileSize=20MB
+log4j.appender.root=org.apache.log4j.RollingFileAppender \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/mybatis/mysql/vnfmadapter.xml b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/mybatis/mysql/vnfmadapter.xml
new file mode 100644
index 00000000..d9b72958
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/mybatis/mysql/vnfmadapter.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+ -->
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.openo.nfvo.vnfmadapter.service.mapper.VnfmMapper">
+ <resultMap type="org.openo.nfvo.vnfmadapter.service.entity.Vnfm"
+ id="VnfmResultMap">
+ <result property="id" javaType="String" column="ID" jdbcType="VARCHAR" />
+ <result property="version" javaType="String" column="VERSION" jdbcType="VARCHAR" />
+ <result property="vnfdId" javaType="String" column="VNFDID" jdbcType="VARCHAR" />
+ <result property="vnfPackageId" javaType="String" column="VNFPACKAGEID" jdbcType="VARCHAR" />
+ </resultMap>
+
+ <sql id="Base_Column_List">
+ ID, VERSION, VNFDID, VNFPACKAGEID
+ </sql>
+
+ <insert id="insertVnfm" parameterType="org.openo.nfvo.vnfmadapter.service.entity.Vnfm">
+ INSERT INTO VNFM (ID, VERSION, VNFDID, VNFPACKAGEID)
+ VALUES(#{id},#{version},#{vnfdId},#{vnfPackageId})
+ </insert>
+
+ <update id="updateVnfm" parameterType="org.openo.nfvo.vnfmadapter.service.entity.Vnfm">
+ UPDATE VNFM
+ <set>
+ <if test="id != null">
+ id=#{id},
+ </if>
+ <if test="version != null">
+ version=#{version},
+ </if>
+ <if test="vnfdId != null">
+ vnfdId=#{vnfdId},
+ </if>
+ <if test="vnfPackageId != null">
+ vnfPackageId=#{vnfPackageId},
+ </if>
+ </set>
+ WHERE ID=#{id}
+ </update>
+
+ <delete id="deleteVnfm" parameterType="String">
+ DELETE FROM VNFM WHERE ID = #{id}
+ </delete>
+
+ <select id="indexVnfms" resultMap="VnfmResultMap" >
+ select
+ <include refid="Base_Column_List" />
+ FROM VNFM
+ ORDER BY NAME DESC
+ <if test="offset!=0 and pageSize!=0 ">
+ limit ${offset}, ${pageSize}
+ </if>
+ </select>
+
+ <select id="getCountVnfms" parameterType="String" resultType="java.lang.Integer">
+ SELECT COUNT(*) FROM VNFM
+ </select>
+
+ <select id="getVnfmById" parameterType="java.lang.String" resultType="org.openo.nfvo.vnfmadapter.service.entity.Vnfm">
+ SELECT * FROM VNFM
+ WHERE id = #{id}
+ </select>
+</mapper> \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/registerService.properties b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/registerService.properties
new file mode 100644
index 00000000..b7520c0f
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/registerService.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright 2016, 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.
+###############################################################################
+serviceName=hw-vnfm
+version=v1
+url=/openoapi/hw-vnfm/v1
+protocol=REST
+visualRange=1
+ip=10.229.33.207
+port=8988
+ttl=0 \ No newline at end of file
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
new file mode 100644
index 00000000..fb73cd4b
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 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.
+ -->
+
+<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="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/osgi-compendium
+ http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://cxf.apache.org/jaxrs
+ http://cxf.apache.org/schemas/jaxrs.xsd
+ http://cxf.apache.org/transports/http/configuration
+ http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://www.springframework.org/schema/aop
+ 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-servlet.xml"/>
+
+ <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
+
+ <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="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" />
+ <!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
+ </bean>
+
+ <bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
+ <constructor-arg index="0" ref="sessionFactory" />
+ </bean>
+
+
+ <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+ <property name="dataSource" ref="source" />
+ </bean>
+
+ <bean id="vnfmDao"
+ class="org.openo.nfvo.vnfmadapter.service.dao.impl.VnfmDaoImpl">
+ <property name="session" ref="session"></property>
+ </bean>
+
+ <bean id="vnfMgr" class="org.openo.nfvo.vnfmadapter.service.process.VnfMgr">
+ <property name="vnfmDao" ref="vnfmDao"></property>
+ </bean>
+
+ <bean id="VnfRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfRoa">
+ <property name="vnfMgr" ref="vnfMgr"></property>
+ </bean>
+
+ <bean id="vnfResourceMgr"
+ class="org.openo.nfvo.vnfmadapter.service.process.VnfResourceMgr">
+ </bean>
+
+ <bean id="VnfResourceRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfResourceRoa">
+ <property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
+ </bean>
+
+ <bean id="authMgr" class="org.openo.nfvo.vnfmadapter.service.process.AuthMgr" />
+
+ <bean id="AuthRoa" class="org.openo.nfvo.vnfmadapter.service.rest.AuthRoa">
+ <property name="authMgr" ref="authMgr"></property>
+ </bean>
+
+ <bean id="VnfAdaResRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfAdapterResourceRoa">
+ </bean>
+
+ <bean id="SwaggerRoa" class="org.openo.nfvo.vnfmadapter.service.rest.SwaggerRoa"></bean>
+
+ <!-- bean id="registerMgr" class="org.openo.nfvo.vnfmadapter.service.process.RegisterMgr"
+ init-method="register" destroy-method="unRegister">
+ </bean-->
+
+ <jaxrs:server id="restContainer" address="/">
+ <jaxrs:serviceBeans>
+ <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.openo.nfvo.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper" />
+ <bean class="org.openo.nfvo.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper" />
+ </jaxrs:providers>
+ </jaxrs:server>
+</beans>
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/svc_register.xml b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/svc_register.xml
new file mode 100644
index 00000000..8fa5e0d2
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/svc_register.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ 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
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/osgi-compendium
+ http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://cxf.apache.org/jaxrs
+ http://cxf.apache.org/schemas/jaxrs.xsd
+ http://cxf.apache.org/transports/http/configuration
+ http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
+ <bean class="org.openo.nfvo.vnfmadapter.service.activator.RoaVnfmServicePostProcessor"></bean>
+ <bean class="org.openo.nfvo.vnfmadapter.service.api.internalsvc.impl.VnfmAdapterMgrService"></bean>
+ <bean class="org.openo.nfvo.vnfmadapter.service.activator.RoaVnfmService2DriverMgr"></bean>
+ <bean class="org.openo.nfvo.vnfmadapter.service.api.internalsvc.impl.VnfmAdapter2DriverMgrService"></bean>
+</beans> \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/swagger.json b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/swagger.json
new file mode 100644
index 00000000..aa3bf1f6
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/swagger.json
@@ -0,0 +1,608 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Huawei VNFM Driver API",
+ "description": "VNF service provider.",
+ "version": "1.0.0"
+ },
+ "tags": [
+ {
+ "name": "Huawei VNFM Driver services"
+ }
+ ],
+ "basePath": "/openoapi",
+ "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