summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrope252 <gareth.roper@est.tech>2019-04-09 18:20:13 +0000
committerrope252 <gareth.roper@est.tech>2019-04-09 18:20:13 +0000
commit8105de4c4b02cc1706c7065305e9f0a9a5052591 (patch)
tree6dc410d9470062d10309be4801559ecafe9d908d
parentc6d3ec1230b2d68548587b28d4a9b02e9e96101f (diff)
SO-ETSI Alignment. Handle Grant Request
Change-Id: Ic54892fd52f4125f0d1515db3224e99b5c40f47f Issue-ID: SO-1625 Signed-off-by: rope252 <gareth.roper@est.tech>
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml127
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json2774
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java11
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java2
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java2
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java30
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java130
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/exceptions/TenantNotFoundException.java35
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java240
9 files changed, 3341 insertions, 10 deletions
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
index 9fa14b1b18..c161bc2cd4 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
@@ -15,6 +15,9 @@
<okhttp-version>2.7.5</okhttp-version>
<gson-fire-version>1.8.2</gson-fire-version>
<threetenbp-version>1.3.5</threetenbp-version>
+ <retrofit2-version>2.4.0</retrofit2-version>
+ <okhttp3-version>3.14.0</okhttp3-version>
+ <oltu-version>1.0.1</oltu-version>
</properties>
<name>mso-vnfm-adapter-ext-clients</name>
<description>Clients for the vnfm adpater to use towards REST endpoints which are external to the VNFM adapter/</description>
@@ -68,6 +71,27 @@
</configOptions>
</configuration>
</execution>
+ <execution>
+ <id>sol003-vnf-grant-api</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
+ </inputSpec>
+ <language>java</language>
+ <library>retrofit2</library>
+ <output>${project.build.directory}/generated-sources/sol003-vnf-grant</output>
+ <generateApis>false</generateApis>
+ <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model</modelPackage>
+ <configOptions>
+ <generateSupportingFiles>false</generateSupportingFiles>
+ <sourceFolder>src/gen/java/main</sourceFolder>
+ <withXml>true</withXml>
+ <useRxJava2>true</useRxJava2>
+ </configOptions>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
@@ -103,5 +127,108 @@
<artifactId>threetenbp</artifactId>
<version>${threetenbp-version}</version>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <!-- the test code is generated into the main source code :( -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>converter-gson</artifactId>
+ <version>${retrofit2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>retrofit</artifactId>
+ <version>${retrofit2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>converter-scalars</artifactId>
+ <version>${retrofit2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>adapter-rxjava2</artifactId>
+ <version>${retrofit2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.okhttp3</groupId>
+ <artifactId>okhttp</artifactId>
+ <version>${okhttp3-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.okhttp3</groupId>
+ <artifactId>logging-interceptor</artifactId>
+ <version>${okhttp3-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.okhttp</groupId>
+ <artifactId>logging-interceptor</artifactId>
+ <version>${okhttp-version}</version>
+ </dependency>
+
+ <!-- Will clean these dependencies before commit From here-->
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.client</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.client</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.httpclient4</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.dynamicreg.client</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.dynamicreg.common</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver-filter</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.dynamicreg.server</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.jwt</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <!-- To here-->
+
+
+
</dependencies>
</project>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
new file mode 100644
index 0000000000..aab56ee2af
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
@@ -0,0 +1,2774 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "version": "1.1.1",
+ "title": "SOL003 - VNF Lifecycle Operation Granting interface",
+ "description": "SOL003 - VNF Lifecycle Operation Granting interface\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
+ "license": {
+ "name": "ETSI Forge copyright notice",
+ "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
+ }
+ },
+ "externalDocs": {
+ "description": "ETSI GS NFV-SOL 003 V2.4.1",
+ "url": "http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf"
+ },
+ "basePath": "/grant/v1",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/grants": {
+ "post": {
+ "description": "Grant Lifecycle Operation\n\nThe POST method requests a grant for a particular VNF lifecycle operation.\n",
+ "parameters": [
+ {
+ "name": "GrantRequest",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "description": "This type represents a grant request.\n",
+ "type": "object",
+ "required": [
+ "vnfInstanceId",
+ "vnfLcmOpOccId",
+ "vnfdId",
+ "operation",
+ "isAutomaticInvocation",
+ "_links"
+ ],
+ "properties": {
+ "vnfInstanceId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfLcmOpOccId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfdId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "flavourId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "operation": {
+ "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
+ "type": "string",
+ "enum": [
+ "INSTANTIATE",
+ "SCALE",
+ "SCALE_TO_LEVEL",
+ "CHANGE_FLAVOUR",
+ "TERMINATE",
+ "HEAL",
+ "OPERATE",
+ "CHANGE_EXT_CONN",
+ "MODIFY_INFO"
+ ]
+ },
+ "isAutomaticInvocation": {
+ "description": "Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM (i.e. ScaleVnf / ScaleVnfToLevel triggered by auto-scale, or HealVnf triggered by auto-heal). Set to false otherwise.\n",
+ "type": "boolean"
+ },
+ "instantiationLevelId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "addResources": {
+ "description": "List of resource definitions in the VNFD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource. If the granting request is for InstantiateVNF, either instantiationLevel or addResources shall be present.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "type"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
+ "type": "string",
+ "enum": [
+ "COMPUTE",
+ "VL",
+ "STORAGE",
+ "LINKPORT"
+ ]
+ },
+ "vduId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resourceTemplateId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resource": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tempResources": {
+ "description": "List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request, with one entry per resource. The NFVO will assume that the VNFM will be responsible to both allocate and release the temporary resource during the runtime of the LCM operation. This means, the resource can be allocated and consumed after the \"start\" notification for the LCM operation is sent by the VNFM, and the resource will be released before the \"result\" notification of the VNF LCM operation is sent by the VNFM.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "type"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
+ "type": "string",
+ "enum": [
+ "COMPUTE",
+ "VL",
+ "STORAGE",
+ "LINKPORT"
+ ]
+ },
+ "vduId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resourceTemplateId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resource": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "removeResources": {
+ "description": "Provides the definitions of resources to be removed by the LCM operation which is related to this grant request, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "type"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
+ "type": "string",
+ "enum": [
+ "COMPUTE",
+ "VL",
+ "STORAGE",
+ "LINKPORT"
+ ]
+ },
+ "vduId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resourceTemplateId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resource": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "updateResources": {
+ "description": "Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "type"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
+ "type": "string",
+ "enum": [
+ "COMPUTE",
+ "VL",
+ "STORAGE",
+ "LINKPORT"
+ ]
+ },
+ "vduId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resourceTemplateId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "resource": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "placementConstraints": {
+ "description": "Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision. If sent, the NFVO shall take the constraints into consideration when making resource placement decisions, and shall reject the grant if they cannot be honoured. The affinity/anti-affinity rules defined in the VNFD , and the placement constraints in the GrantVnfLifecycleOperation as defined in this clause should be conflict-free. In case of conflicts, the placement constraints in the GrantVnfLifecycleOperation shall take precedence. Passing constraints allows the VNFM or the lifecycle management scripts to influence resource placement decisions by the NFVO to ensure VNF properties such as performance or fault tolerance.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a resource placement constraint. A set of such constraints may be sent by the VNFM to the NFVO to influence the resource placement decisions made by the NFVO as part of the granting process. A placement constraint defines a condition to the placement of new resources, considering other new resources as well as existing resources. EXAMPLE: The following rules influence the placement of a set of resources such that they are placed in the same Network Function Virtualisation Infrastructure Point of Presence (NFVI-PoP) but in different resource zones: {type=\"affinity\"; scope=\"NFVI_POP\"; {resource1,resource2}} {type=\"anti-affinity\"; scope=\"ZONE\"; {resource1,resource2}}\n",
+ "type": "object",
+ "required": [
+ "affinityOrAntiAffinity",
+ "scope",
+ "resource"
+ ],
+ "properties": {
+ "affinityOrAntiAffinity": {
+ "description": "The type of the constraint. Permitted values: * AFFINITY * ANTI_AFFINITY\n",
+ "type": "string",
+ "enum": [
+ "AFFINITY",
+ "ANTI_AFFINITY"
+ ]
+ },
+ "scope": {
+ "description": "The scope of the placement constraint indicating the category of the \"place\" where the constraint applies. Permitted values: * NFVI_POP * ZONE * ZONE_GROUP * NFVI_NODE\n",
+ "type": "string",
+ "enum": [
+ "NFVI_POP",
+ "ZONE",
+ "ZONE_GROUP",
+ "NFVI_NODE"
+ ]
+ },
+ "resource": {
+ "description": "References to resources in the constraint rule.\n",
+ "type": "array",
+ "items": {
+ "description": "This type references a resource either by its VIM-level identifier for existing resources, or by the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure for new resources.\n",
+ "type": "object",
+ "required": [
+ "idType",
+ "resourceId"
+ ],
+ "properties": {
+ "idType": {
+ "description": "The type of the identifier. Permitted values: * RES_MGMT: Resource-management-level identifier; this identifier is managed by the VIM in the direct mode of VNF-related resource\n management, and is managed by the NFVO in the indirect mode)\n* GRANT: Reference to the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure.\n",
+ "type": "string",
+ "enum": [
+ "RES_MGMT",
+ "GRANT"
+ ]
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "vimConstraints": {
+ "description": "Used by the VNFM to require that multiple resources are managed through the same VIM connection. If sent, the NFVO shall take the constraints into consideration when making VIM selection decisions, and shall reject the grant if they cannot be honoured. This attribute shall be supported if VNF-related Resource Management in direct mode is applicable. The applicability and further details of this attribute for indirect mode are left for future specification.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a VIM selection constraint. A set of such constraints may be sent by the VNFM to the NFVO to influence the VIM selection decisions made by the NFVO as part of the granting process.\n",
+ "type": "object",
+ "required": [
+ "resource"
+ ],
+ "properties": {
+ "sameResourceGroup": {
+ "description": "If present and set to true, this signals that the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.\n",
+ "type": "boolean"
+ },
+ "resource": {
+ "description": "References to resources in the constraint rule. The NFVO shall ensure that all resources in this list are managed through the same VIM connection. If \"sameResourceGroup\" is set to true, the NFVO shall further ensure that all resources in this list are part of the same infrastructure resource group in that VIM connection.\n",
+ "type": "array",
+ "items": {
+ "description": "This type references a resource either by its VIM-level identifier for existing resources, or by the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure for new resources.\n",
+ "type": "object",
+ "required": [
+ "idType",
+ "resourceId"
+ ],
+ "properties": {
+ "idType": {
+ "description": "The type of the identifier. Permitted values: * RES_MGMT: Resource-management-level identifier; this identifier is managed by the VIM in the direct mode of VNF-related resource\n management, and is managed by the NFVO in the indirect mode)\n* GRANT: Reference to the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure.\n",
+ "type": "string",
+ "enum": [
+ "RES_MGMT",
+ "GRANT"
+ ]
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalParams": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "_links": {
+ "description": "Links to resources related to this request.\n",
+ "type": "object",
+ "required": [
+ "vnfLcmOpOcc",
+ "vnfInstance"
+ ],
+ "properties": {
+ "vnfLcmOpOcc": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ },
+ "vnfInstance": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "Accept",
+ "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
+ "in": "header",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "Content-Type",
+ "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
+ "in": "header",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "Authorization",
+ "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
+ "in": "header",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created\nThe grant was created successfully (synchronous mode). A representation of the created \"Individual grant\" resource shall be returned in the response body. The HTTP response shall include a \"Location\" HTTP header that indicates the URI of the \"Individual grant\" resource just created.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "Location": {
+ "description": "The resource URI of the created VNF instance",
+ "type": "string",
+ "format": "url"
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "This type represents a grant.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "vnfInstanceId",
+ "vnfLcmOpOccId",
+ "_links"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfInstanceId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfLcmOpOccId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnections": {
+ "description": "Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources, and provides parameters of these VIM connections. The VNFM shall update the \" vimConnectionInfo\" attribute of the \"VnfInstance\" structure by adding unknown entries received in this attribute. This attribute is not intended for the modification of VimConnection entries passed earlier; for that, the VnfInfoModificationRequest structure shall be used. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable. In direct mode, this parameter shall be absent if the VIM information was configured to the VNFM in another way, present otherwise. This interface allows to signal the use of multiple VIMs per VNF. However, due to the partial support of this feature in the present release, it is recommended in the present document that the number of entries in the \"vims\" attribute in the Grant is not greater than 1.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "vimType"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimType": {
+ "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
+ "type": "string"
+ },
+ "interfaceInfo": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "accessInfo": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "extra": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "zones": {
+ "description": "Identifies resource zones where the resources are approved to be allocated by the VNFM.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a resource zone.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "zoneId"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "zoneGroups": {
+ "description": "Information about groups of resource zones that are related and that the NFVO has chosen to fulfil a zoneGroup constraint in the GrantVnfLifecycleOperation request. This information confirms that the NFVO has honoured the zoneGroup constraints that were passed as part of \"placementConstraints\" in the GrantRequest.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a resource zone group. A resource zone group is a group of one or more related resource zones which can be used in resource placement constraints. To fulfil such constraint, the NFVO may decide to place a resource into any zone that belongs to a particular group. NOTE: A resource zone group can be used to support overflow from one resource zone into another, in case a particular deployment supports only non-elastic resource zones.\n",
+ "type": "object",
+ "required": [
+ "zoneId"
+ ],
+ "properties": {
+ "zoneId": {
+ "description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group.\n",
+ "type": "array",
+ "items": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "computeReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "networkReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "storageReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "addResources": {
+ "description": "List of resources that are approved to be added, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "tempResources": {
+ "description": "List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "removeResources": {
+ "description": "List of resources that are approved to be removed, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "updateResources": {
+ "description": "List of resources that are approved to be modified, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "vimAssets": {
+ "description": "Information about assets for the VNF that are managed by the NFVO in the VIM, such as software images and virtualised compute resource flavours. This attribute is not intended for the modification of vimAssets entries passed earlier. Modification of VIM assets during the lifetime of a VNF instance is not necessary, since it is expected that all applicable assets have been on boarded into the VIM before the VNF is instantiated.\n",
+ "type": "object",
+ "properties": {
+ "computeResourceFlavours": {
+ "description": "Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.\n",
+ "type": "array",
+ "items": {
+ "description": "If the VIM requires the use of virtual compute resource flavours during compute resource instantiation, it is assumed that such flavours are selected or created by the NFVO based on the information in the virtual compute descriptor defined in the VNFD. This type defines the mapping between a virtual compute descriptor in the VNFD and the corresponding compute resource flavour managed by the NFVO in the VIM.\n",
+ "type": "object",
+ "required": [
+ "vnfdVirtualComputeDescId",
+ "vimFlavourId"
+ ],
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfdVirtualComputeDescId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimFlavourId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "softwareImages": {
+ "description": "Mappings between software images defined in the VNFD and software images managed in the VIM.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains a mapping between a software image definition the VNFD and the corresponding software image managed by the NFVO in the VIM which is needed during compute resource instantiation.\n",
+ "type": "object",
+ "required": [
+ "vnfdSoftwareImageId",
+ "vimSoftwareImageId"
+ ],
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfdSoftwareImageId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimSoftwareImageId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "extVirtualLinks": {
+ "description": "Information about external VLs to connect the VNF to. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an external VL.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "resourceId",
+ "extCps"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "extCps": {
+ "description": "External CPs of the VNF to be connected to this external VL.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents configuration information for external CPs created from a CPD.\n",
+ "type": "object",
+ "required": [
+ "cpdId"
+ ],
+ "properties": {
+ "cpdId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "cpConfig": {
+ "description": "List of instance data that need to be configured on the CP instances created from the respective CPD.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an externally provided link port or network address information per instance of an external connection point. In case a link port is provided, the VNFM shall use that link port when connecting the external CP to the external VL. In a link port is not provided, the VNFM shall create a link port on the external VL, and use that link port to connect the external CP to the external VL.\n",
+ "type": "object",
+ "properties": {
+ "cpInstanceId": {
+ "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
+ "type": "string"
+ },
+ "linkPortId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "cpProtocolData": {
+ "description": "Parameters for configuring the network protocols on the link port that connects the CP to a VL. The following conditions apply to the attributes \"linkPortId\" and \"cpProtocolData\": * The \"linkPortId\" and \"cpProtocolData\" attributes shall both be absent for the deletion of an existing external CP instance\n addressed by cpInstanceId. \n* At least one of these attributes shall be present for a to-be-created external CP instance or an existing external\n CP instance.\n* If the \"linkPortId\" attribute is absent, the VNFM shall create a link port.\n* If the \"cpProtocolData\" attribute is absent, the \"linkPortId\" attribute shall be provided referencing a pre-created link port,\n and the VNFM can use means outside the scope of the present\n document to obtain the pre-configured address information for the\n connection point from the resource representing the link port.\n* If both \"cpProtocolData\" and \"linkportId\" are provided, the API consumer shall ensure that the cpProtocolData can be used with the\n pre-created link port referenced by \"linkPortId\".\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents network protocol data.\n",
+ "type": "object",
+ "required": [
+ "layerProtocol"
+ ],
+ "properties": {
+ "layerProtocol": {
+ "description": "Identifier of layer(s) and protocol(s). This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
+ "type": "string",
+ "enum": [
+ "IP_OVER_ETHERNET"
+ ]
+ },
+ "ipOverEthernet": {
+ "description": "This type represents network address data for IP over Ethernet.\n",
+ "type": "object",
+ "properties": {
+ "macAddress": {
+ "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
+ "type": "string",
+ "format": "MAC"
+ },
+ "ipAddresses": {
+ "description": "List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned.\n",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
+ "type": "string",
+ "enum": [
+ "IPV4",
+ "IPV6"
+ ]
+ },
+ "fixedAddresses": {
+ "description": "Fixed addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
+ "type": "array",
+ "items": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ }
+ },
+ "numDynamicAddresses": {
+ "description": "Number of dynamic addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
+ "type": "integer"
+ },
+ "addressRange": {
+ "description": "An IP address range to be used, e.g. in case of egress connections. In case this attribute is present, IP addresses from the range will be used.\n",
+ "type": "object",
+ "required": [
+ "minAddress",
+ "maxAddress"
+ ],
+ "properties": {
+ "minAddress": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ },
+ "maxAddress": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ }
+ }
+ },
+ "subnetId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "extLinkPorts": {
+ "description": "Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the VNFM shall create the link ports on the external VL.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an externally provided link port to be used to connect an external connection point to an external VL.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "resourceHandle"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceHandle": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "extManagedVirtualLinks": {
+ "description": "Information about internal VLs that are managed by other entities than the VNFM. The indication of externally-managed internal VLs is needed in case networks have been pre-configured for use with certain VNFs, for instance to ensure that these networks have certain properties such as security or acceleration features, or to address particular network topologies. The present document assumes that externally-managed internal VLs are managed by the NFVO and created towards the VIM. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "virtualLinkDescId",
+ "resourceId"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "virtualLinkDescId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "additionalParams": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "_links": {
+ "description": "Links to resources related to this resource.\n",
+ "type": "object",
+ "required": [
+ "self",
+ "vnfLcmOpOcc",
+ "vnfInstance"
+ ],
+ "properties": {
+ "self": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ },
+ "vnfLcmOpOcc": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ },
+ "vnfInstance": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "202": {
+ "description": "Accepted\nThe request was accepted for processing, but the processing has not been completed. It is expected to take some time to create the grant (asynchronous mode). The response body shall be empty. The HTTP response shall include a \"Location\" HTTP header that indicates the URI of the \"Individual grant\" resource that will be created once the granting decision has been made.\n",
+ "headers": {
+ "Location": {
+ "description": "The resource URI of the created VNF instance",
+ "type": "string",
+ "format": "url"
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden\nThe grant was rejected. A ProblemDetails structure shall be included in the response to provide more details about the rejection in the \"details\" attribute.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "405": {
+ "description": "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "406": {
+ "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "416": {
+ "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Unprocessable Entity\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. NOTE 2: This error response code is only applicable for methods that have a request body.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/grants/{grantId}": {
+ "parameters": [
+ {
+ "name": "grantId",
+ "description": "Identifier of the grant. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
+ "in": "path",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "get": {
+ "description": "Grant Lifecycle Operation\n\nThe GET method retrieves information about a specific grant by reading an individual grant resource.\n",
+ "parameters": [
+ {
+ "name": "Accept",
+ "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
+ "in": "header",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "Authorization",
+ "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
+ "in": "header",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK\nThe grant was read successfully. A representation of the \"individual grant\" resource shall be returned in the response body.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "This type represents a grant.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "vnfInstanceId",
+ "vnfLcmOpOccId",
+ "_links"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfInstanceId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfLcmOpOccId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnections": {
+ "description": "Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources, and provides parameters of these VIM connections. The VNFM shall update the \" vimConnectionInfo\" attribute of the \"VnfInstance\" structure by adding unknown entries received in this attribute. This attribute is not intended for the modification of VimConnection entries passed earlier; for that, the VnfInfoModificationRequest structure shall be used. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable. In direct mode, this parameter shall be absent if the VIM information was configured to the VNFM in another way, present otherwise. This interface allows to signal the use of multiple VIMs per VNF. However, due to the partial support of this feature in the present release, it is recommended in the present document that the number of entries in the \"vims\" attribute in the Grant is not greater than 1.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "vimType"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimType": {
+ "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
+ "type": "string"
+ },
+ "interfaceInfo": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "accessInfo": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "extra": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "zones": {
+ "description": "Identifies resource zones where the resources are approved to be allocated by the VNFM.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a resource zone.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "zoneId"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "zoneGroups": {
+ "description": "Information about groups of resource zones that are related and that the NFVO has chosen to fulfil a zoneGroup constraint in the GrantVnfLifecycleOperation request. This information confirms that the NFVO has honoured the zoneGroup constraints that were passed as part of \"placementConstraints\" in the GrantRequest.\n",
+ "type": "array",
+ "items": {
+ "description": "This type provides information regarding a resource zone group. A resource zone group is a group of one or more related resource zones which can be used in resource placement constraints. To fulfil such constraint, the NFVO may decide to place a resource into any zone that belongs to a particular group. NOTE: A resource zone group can be used to support overflow from one resource zone into another, in case a particular deployment supports only non-elastic resource zones.\n",
+ "type": "object",
+ "required": [
+ "zoneId"
+ ],
+ "properties": {
+ "zoneId": {
+ "description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group.\n",
+ "type": "array",
+ "items": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "computeReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "networkReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "storageReservationId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "addResources": {
+ "description": "List of resources that are approved to be added, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "tempResources": {
+ "description": "List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "removeResources": {
+ "description": "List of resources that are approved to be removed, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "updateResources": {
+ "description": "List of resources that are approved to be modified, with one entry per resource.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
+ "type": "object",
+ "required": [
+ "resourceDefinitionId"
+ ],
+ "properties": {
+ "resourceDefinitionId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "reservationId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "zoneId": {
+ "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
+ "type": "string"
+ },
+ "resourceGroupId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "vimAssets": {
+ "description": "Information about assets for the VNF that are managed by the NFVO in the VIM, such as software images and virtualised compute resource flavours. This attribute is not intended for the modification of vimAssets entries passed earlier. Modification of VIM assets during the lifetime of a VNF instance is not necessary, since it is expected that all applicable assets have been on boarded into the VIM before the VNF is instantiated.\n",
+ "type": "object",
+ "properties": {
+ "computeResourceFlavours": {
+ "description": "Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.\n",
+ "type": "array",
+ "items": {
+ "description": "If the VIM requires the use of virtual compute resource flavours during compute resource instantiation, it is assumed that such flavours are selected or created by the NFVO based on the information in the virtual compute descriptor defined in the VNFD. This type defines the mapping between a virtual compute descriptor in the VNFD and the corresponding compute resource flavour managed by the NFVO in the VIM.\n",
+ "type": "object",
+ "required": [
+ "vnfdVirtualComputeDescId",
+ "vimFlavourId"
+ ],
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfdVirtualComputeDescId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimFlavourId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "softwareImages": {
+ "description": "Mappings between software images defined in the VNFD and software images managed in the VIM.\n",
+ "type": "array",
+ "items": {
+ "description": "This type contains a mapping between a software image definition the VNFD and the corresponding software image managed by the NFVO in the VIM which is needed during compute resource instantiation.\n",
+ "type": "object",
+ "required": [
+ "vnfdSoftwareImageId",
+ "vimSoftwareImageId"
+ ],
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vnfdSoftwareImageId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimSoftwareImageId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "extVirtualLinks": {
+ "description": "Information about external VLs to connect the VNF to. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an external VL.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "resourceId",
+ "extCps"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "extCps": {
+ "description": "External CPs of the VNF to be connected to this external VL.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents configuration information for external CPs created from a CPD.\n",
+ "type": "object",
+ "required": [
+ "cpdId"
+ ],
+ "properties": {
+ "cpdId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "cpConfig": {
+ "description": "List of instance data that need to be configured on the CP instances created from the respective CPD.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an externally provided link port or network address information per instance of an external connection point. In case a link port is provided, the VNFM shall use that link port when connecting the external CP to the external VL. In a link port is not provided, the VNFM shall create a link port on the external VL, and use that link port to connect the external CP to the external VL.\n",
+ "type": "object",
+ "properties": {
+ "cpInstanceId": {
+ "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
+ "type": "string"
+ },
+ "linkPortId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "cpProtocolData": {
+ "description": "Parameters for configuring the network protocols on the link port that connects the CP to a VL. The following conditions apply to the attributes \"linkPortId\" and \"cpProtocolData\": * The \"linkPortId\" and \"cpProtocolData\" attributes shall both be absent for the deletion of an existing external CP instance\n addressed by cpInstanceId. \n* At least one of these attributes shall be present for a to-be-created external CP instance or an existing external\n CP instance.\n* If the \"linkPortId\" attribute is absent, the VNFM shall create a link port.\n* If the \"cpProtocolData\" attribute is absent, the \"linkPortId\" attribute shall be provided referencing a pre-created link port,\n and the VNFM can use means outside the scope of the present\n document to obtain the pre-configured address information for the\n connection point from the resource representing the link port.\n* If both \"cpProtocolData\" and \"linkportId\" are provided, the API consumer shall ensure that the cpProtocolData can be used with the\n pre-created link port referenced by \"linkPortId\".\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents network protocol data.\n",
+ "type": "object",
+ "required": [
+ "layerProtocol"
+ ],
+ "properties": {
+ "layerProtocol": {
+ "description": "Identifier of layer(s) and protocol(s). This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
+ "type": "string",
+ "enum": [
+ "IP_OVER_ETHERNET"
+ ]
+ },
+ "ipOverEthernet": {
+ "description": "This type represents network address data for IP over Ethernet.\n",
+ "type": "object",
+ "properties": {
+ "macAddress": {
+ "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
+ "type": "string",
+ "format": "MAC"
+ },
+ "ipAddresses": {
+ "description": "List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned.\n",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
+ "type": "string",
+ "enum": [
+ "IPV4",
+ "IPV6"
+ ]
+ },
+ "fixedAddresses": {
+ "description": "Fixed addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
+ "type": "array",
+ "items": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ }
+ },
+ "numDynamicAddresses": {
+ "description": "Number of dynamic addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
+ "type": "integer"
+ },
+ "addressRange": {
+ "description": "An IP address range to be used, e.g. in case of egress connections. In case this attribute is present, IP addresses from the range will be used.\n",
+ "type": "object",
+ "required": [
+ "minAddress",
+ "maxAddress"
+ ],
+ "properties": {
+ "minAddress": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ },
+ "maxAddress": {
+ "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
+ "type": "string",
+ "format": "IP"
+ }
+ }
+ },
+ "subnetId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "extLinkPorts": {
+ "description": "Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the VNFM shall create the link ports on the external VL.\n",
+ "type": "array",
+ "items": {
+ "description": "This type represents an externally provided link port to be used to connect an external connection point to an external VL.\n",
+ "type": "object",
+ "required": [
+ "id",
+ "resourceHandle"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceHandle": {
+ "required": [
+ "vimConnectionId",
+ "resourceId"
+ ],
+ "type": "object",
+ "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
+ "properties": {
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ },
+ "vimLevelResourceType": {
+ "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "extManagedVirtualLinks": {
+ "description": "Information about internal VLs that are managed by other entities than the VNFM. The indication of externally-managed internal VLs is needed in case networks have been pre-configured for use with certain VNFs, for instance to ensure that these networks have certain properties such as security or acceleration features, or to address particular network topologies. The present document assumes that externally-managed internal VLs are managed by the NFVO and created towards the VIM. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "virtualLinkDescId",
+ "resourceId"
+ ],
+ "properties": {
+ "id": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "virtualLinkDescId": {
+ "description": "An identifier that is unique within a VNF descriptor.\n",
+ "type": "string"
+ },
+ "vimConnectionId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceProviderId": {
+ "description": "An identifier with the intention of being globally unique.\n",
+ "type": "string"
+ },
+ "resourceId": {
+ "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "additionalParams": {
+ "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
+ "type": "object"
+ },
+ "_links": {
+ "description": "Links to resources related to this resource.\n",
+ "type": "object",
+ "required": [
+ "self",
+ "vnfLcmOpOcc",
+ "vnfInstance"
+ ],
+ "properties": {
+ "self": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ },
+ "vnfLcmOpOcc": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ },
+ "vnfInstance": {
+ "description": "This type represents a link to a resource.\n",
+ "type": "object",
+ "required": [
+ "href"
+ ],
+ "properties": {
+ "href": {
+ "description": "URI of the referenced resource.\n",
+ "type": "string",
+ "format": "url"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "202": {
+ "description": "Accepted\nThe process of creating the grant is ongoing, no grant is available yet. The response body shall be empty.\n",
+ "headers": {
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden\nThe grant was rejected. A ProblemDetails structure shall be included in the response to provide more details about the rejection in the \"details\" attribute.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ },
+ "WWW-Authenticate": {
+ "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "405": {
+ "description": "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "406": {
+ "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "416": {
+ "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Unprocessable Entity\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. NOTE 2: This error response code is only applicable for methods that have a request body.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
+ "headers": {
+ "Content-Type": {
+ "description": "The MIME type of the body of the response.",
+ "type": "string",
+ "maximum": 1,
+ "minimum": 1
+ }
+ },
+ "schema": {
+ "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
+ "type": "object",
+ "required": [
+ "status",
+ "detail"
+ ],
+ "properties": {
+ "type": {
+ "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
+ "type": "string",
+ "format": "URI"
+ },
+ "title": {
+ "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
+ "type": "integer"
+ },
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.\n",
+ "type": "string"
+ },
+ "instance": {
+ "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
+ "type": "string",
+ "format": "URI"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
index ee04819ca4..b9ffd8bac5 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
@@ -31,13 +31,14 @@ import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.Relationship;
import org.onap.aai.domain.yang.RelationshipData;
import org.onap.aai.domain.yang.RelationshipList;
-import org.onap.aai.domain.yang.Tenant;
import org.onap.aai.domain.yang.Vserver;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
+import org.onap.so.adapters.vnfmadapter.rest.exceptions.TenantNotFoundException;
import org.onap.so.adapters.vnfmadapter.rest.exceptions.VnfmNotFoundException;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIVersion;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.vnfmadapter.v1.model.Tenant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -124,8 +125,11 @@ public class AaiHelper {
final String cloudOwner = getRelationshipKey(relationship, "cloud-region.cloud-owner");
final String cloudRegion = getRelationshipKey(relationship, "cloud-region.cloud-region-id");
final String tenantId = getRelationshipKey(relationship, "tenant.tenant-id");
- return cloudOwner == null || cloudRegion == null || tenantId == null ? null
- : aaiServiceProvider.invokeGetTenant(cloudOwner, cloudRegion, tenantId);
+ if (cloudOwner == null || cloudRegion == null || tenantId == null) {
+ throw new TenantNotFoundException("No matching Tenant found in AAI. VNFID: " + vnf.getVnfId());
+ } else {
+ return new Tenant().cloudOwner(cloudOwner).regionName(cloudRegion).tenantId(tenantId);
+ }
}
private Relationship getRelationship(final GenericVnf vnf, final String relationshipRelatedToValue) {
@@ -233,5 +237,4 @@ public class AaiHelper {
public OamIpAddressSource getOamIpAddressSource(final String vnfId) {
return mapOfVnfIdToOamIpAddressHolder.get(vnfId);
}
-
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
index b3767a3b62..2708742e6a 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
@@ -25,8 +25,8 @@ import org.onap.aai.domain.yang.EsrSystemInfoList;
import org.onap.aai.domain.yang.EsrVnfm;
import org.onap.aai.domain.yang.EsrVnfmList;
import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Tenant;
import org.onap.aai.domain.yang.Vserver;
+import org.onap.vnfmadapter.v1.model.Tenant;
/**
* Provides methods for invoking REST calls to AAI.
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
index 6c3d7c2ca6..55a2cc39ec 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
@@ -25,10 +25,10 @@ import org.onap.aai.domain.yang.EsrSystemInfoList;
import org.onap.aai.domain.yang.EsrVnfm;
import org.onap.aai.domain.yang.EsrVnfmList;
import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Tenant;
import org.onap.aai.domain.yang.Vserver;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.vnfmadapter.v1.model.Tenant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
index c0d3cf8567..b370dc35c8 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
@@ -22,10 +22,6 @@ package org.onap.so.adapters.vnfmadapter.extclients.vnfm;
import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
import static org.onap.so.adapters.vnfmadapter.Constants.OPERATION_NOTIFICATION_ENDPOINT;
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -34,6 +30,7 @@ import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
import org.onap.so.adapters.vnfmadapter.extclients.vim.model.AccessInfo;
import org.onap.so.adapters.vnfmadapter.extclients.vim.model.InterfaceInfo;
import org.onap.so.adapters.vnfmadapter.extclients.vim.model.VimCredentials;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InstantiateVnfRequest;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.LccnSubscriptionRequest;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.SubscriptionsAuthentication;
@@ -53,6 +50,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
/**
* Provides helper methods for interactions with VNFM.
@@ -199,4 +200,25 @@ public class VnfmHelper {
return authentication;
}
+ /**
+ * Get the VIM connections for a tenant
+ *
+ * @param tenant the tenant
+ * @return the VIM connections
+ */
+ public InlineResponse201VimConnections getVimConnections(final Tenant tenant) {
+ final EsrSystemInfo esrSystemInfo =
+ aaiServiceProvider.invokeGetCloudRegionEsrSystemInfoList(tenant.getCloudOwner(), tenant.getRegionName())
+ .getEsrSystemInfo().iterator().next();
+
+ final InlineResponse201VimConnections vimConnection = new InlineResponse201VimConnections();
+ vimConnection.setId(createVimId(tenant.getCloudOwner(), tenant.getRegionName()));
+ vimConnection.setVimId(vimConnection.getId());
+ vimConnection.setVimType(esrSystemInfo.getType());
+ vimConnection.setInterfaceInfo(getInterfaceInfo(esrSystemInfo.getServiceUrl()));
+ vimConnection.setAccessInfo(getAccessInfo(esrSystemInfo, tenant.getTenantId()));
+ return vimConnection;
+ }
+
+
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java
new file mode 100644
index 0000000000..82e72a7630
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vnfmadapter.rest;
+
+import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import javax.ws.rs.core.MediaType;
+import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiHelper;
+import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.VnfmHelper;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201AddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
+import org.onap.vnfmadapter.v1.model.Tenant;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping(value = BASE_URL, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
+public class Sol003GrantController {
+
+ private static final String SEPARATOR = "_";
+ private static final String VIM_TYPE = "OPENSTACK";
+ private static final String CLOUD_OWNER = "myTestCloudOwner";
+ private static final String REGION = "myTestRegion";
+ private static final String TENANT_ID = "myTestTenantId";
+ private static final Logger logger = LoggerFactory.getLogger(Sol003GrantController.class);
+ public final AaiServiceProvider aaiServiceProvider;
+ public final AaiHelper aaiHelper;
+ public final VnfmHelper vnfmHelper;
+
+ @Autowired
+ public Sol003GrantController(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
+ final VnfmHelper vnfmHelper) {
+ this.aaiServiceProvider = aaiServiceProvider;
+ this.aaiHelper = aaiHelper;
+ this.vnfmHelper = vnfmHelper;
+ }
+
+ @GetMapping(value = "/grants/{grantId}")
+ public ResponseEntity<InlineResponse201> grantsGrantIdGet(@PathVariable("grantId") final String grantId) {
+ logger.info("Get grant received from VNFM, grant id: " + grantId);
+ return new ResponseEntity<InlineResponse201>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ @PostMapping(value = "/grants")
+ public ResponseEntity<InlineResponse201> grantsPost(@RequestBody final GrantRequest grantRequest) {
+ logger.info("Grant request received from VNFM: " + grantRequest);
+
+ final InlineResponse201 grantResponse = createGrantResponse(grantRequest);
+ logger.info("Grant request returning to VNFM: " + grantResponse);
+ return new ResponseEntity<InlineResponse201>(grantResponse, HttpStatus.CREATED);
+ }
+
+ private InlineResponse201 createGrantResponse(final GrantRequest grantRequest) {
+ final InlineResponse201 grantResponse = new InlineResponse201();
+ grantResponse.setId(UUID.randomUUID().toString());
+ grantResponse.setVnfInstanceId(grantRequest.getVnfInstanceId());
+ grantResponse.setVnfLcmOpOccId(grantRequest.getVnfLcmOpOccId());
+ final Tenant tenant =
+ aaiHelper.getAssignedTenant(aaiServiceProvider.invokeGetGenericVnf((grantRequest.getVnfInstanceId())));
+
+ String vimConnectionId = "";
+ final InlineResponse201VimConnections vimConnection = vnfmHelper.getVimConnections(tenant);
+ grantResponse.addVimConnectionsItem(vimConnection);
+ vimConnectionId = vimConnection.getId();
+
+ if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.INSTANTIATE)) {
+ grantResponse.addResources(getResources(grantRequest.getAddResources(), vimConnectionId));
+ } else if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.TERMINATE)) {
+ grantResponse.addResources(getResources(grantRequest.getRemoveResources(), vimConnectionId));
+ }
+ return grantResponse;
+ }
+
+ private InlineResponse201VimConnections getVimConnectionsItem(final Tenant tenant) {
+ final InlineResponse201VimConnections vimConnection = new InlineResponse201VimConnections();
+ vimConnection.setId(createVimConnectionId(tenant.getCloudOwner(), tenant.getRegionName()));
+ vimConnection.setVimId(vimConnection.getId());
+ vimConnection.setVimType(VIM_TYPE);
+ return vimConnection;
+ }
+
+ private List<InlineResponse201AddResources> getResources(final List<GrantsAddResources> requestResources,
+ final String vimId) {
+ final List<InlineResponse201AddResources> resources = new ArrayList<>();
+ for (final GrantsAddResources requestResource : requestResources) {
+ final InlineResponse201AddResources responseResource = new InlineResponse201AddResources();
+ responseResource.setResourceDefinitionId(requestResource.getId());
+ responseResource.setVimConnectionId(vimId);
+ resources.add(responseResource);
+ }
+ return resources;
+ }
+
+ private String createVimConnectionId(String cloudOwner, String cloudRegionId) {
+ return cloudOwner + SEPARATOR + cloudRegionId;
+ }
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/exceptions/TenantNotFoundException.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/exceptions/TenantNotFoundException.java
new file mode 100644
index 0000000000..215e68adcf
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/exceptions/TenantNotFoundException.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vnfmadapter.rest.exceptions;
+
+/**
+ * Exception for Tenant not found.
+ */
+
+public class TenantNotFoundException extends RuntimeException {
+
+ private static final long serialVersionUID = 6398018034431666933L;
+
+ public TenantNotFoundException(final String message) {
+ super(message);
+ }
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java
new file mode 100644
index 0000000000..21c6eff6b0
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java
@@ -0,0 +1,240 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vnfmadapter.rest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import java.util.Optional;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.hamcrest.MockitoHamcrest;
+import org.onap.aai.domain.yang.EsrSystemInfo;
+import org.onap.aai.domain.yang.EsrSystemInfoList;
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.RelationshipData;
+import org.onap.aai.domain.yang.RelationshipList;
+import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest.OperationEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources.TypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
+import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.boot.web.server.LocalServerPort;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.client.MockRestServiceServer;
+import org.springframework.web.client.RestTemplate;
+import com.google.gson.Gson;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+public class Sol003GrantControllerTest {
+
+ private static final String CLOUD_OWNER = "myTestCloudOwner";
+ private static final String REGION = "myTestRegion";
+ private static final String TENANT_ID = "myTestTenantId";
+ private static final String SEPARATOR = "_";
+ private static final String vimConnectionId = CLOUD_OWNER + SEPARATOR + REGION;
+
+ @LocalServerPort
+ private int port;
+ @Autowired
+ @Qualifier(CONFIGURABLE_REST_TEMPLATE)
+ private RestTemplate testRestTemplate;
+ private MockRestServiceServer mockRestServer;
+
+ @MockBean
+ private AAIResourcesClient aaiResourcesClient;
+
+ @Autowired
+ private Sol003GrantController controller;
+ private final Gson gson = new Gson();
+
+ @Before
+ public void setUp() throws Exception {
+ mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
+ setUpVimInMockAai();
+ }
+
+ @Test
+ public void grantRequest_ValidRequestInstantiate_GrantApproved() {
+ GrantRequest grantRequest = createGrantRequest("INSTANTIATE");
+ setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
+ final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
+ assertEquals(HttpStatus.CREATED, response.getStatusCode());
+ assertEquals(1, response.getBody().getAddResources().size());
+
+ assertEquals(vimConnectionId, response.getBody().getAddResources().get(0).getVimConnectionId());
+ assertEquals("myTestVnfId", response.getBody().getVnfInstanceId());
+ assertEquals("123456", response.getBody().getVnfLcmOpOccId());
+
+ InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
+ assertEquals(vimConnectionId, vimConnections.getVimId());
+ assertEquals("OPENSTACK", vimConnections.getVimType());
+ assertNotNull(vimConnections.getAccessInfo());
+ assertNotNull(vimConnections.getInterfaceInfo());
+ assertEquals("INSTANTIATE", grantRequest.getOperation().toString());
+ }
+
+ @Test
+ public void getGrant_notSupported_returns501() {
+ final ResponseEntity<InlineResponse201> response2 = controller.grantsGrantIdGet("myTestGrantId");
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response2.getStatusCode());
+ }
+
+ @Test
+ public void grantRequest_ValidRequestTerminate_GrantApproved() {
+ GrantRequest grantRequest = createGrantRequest("TERMINATE");
+ setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
+ final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
+
+ assertEquals(HttpStatus.CREATED, response.getStatusCode());
+ assertEquals(1, response.getBody().getAddResources().size());
+ assertEquals(vimConnectionId, response.getBody().getAddResources().get(0).getVimConnectionId());
+ assertEquals("myTestVnfId", response.getBody().getVnfInstanceId());
+ assertEquals("123456", response.getBody().getVnfLcmOpOccId());
+
+ InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
+ assertEquals(vimConnectionId, vimConnections.getVimId());
+ assertEquals("OPENSTACK", vimConnections.getVimType());
+ assertNotNull(vimConnections.getAccessInfo());
+ assertNotNull(vimConnections.getInterfaceInfo());
+ assertEquals("TERMINATE", grantRequest.getOperation().toString());
+
+ }
+
+ private GrantRequest createGrantRequest(String operation) {
+ GrantRequest grantRequest = new GrantRequest();
+ grantRequest.setVnfInstanceId("myTestVnfId");
+ grantRequest.setVnfLcmOpOccId("123456");
+ if (operation == "INSTANTIATE") {
+ grantRequest.setOperation(OperationEnum.INSTANTIATE);
+ GrantsAddResources resource = new GrantsAddResources();
+ resource.setId("123");
+ resource.setType(TypeEnum.COMPUTE);
+ grantRequest.addAddResourcesItem(resource);
+ } else if (operation == "TERMINATE") {
+ grantRequest.setOperation(OperationEnum.TERMINATE);
+ GrantsAddResources resource = new GrantsAddResources();
+ resource.setId("123");
+ resource.setType(TypeEnum.COMPUTE);
+ grantRequest.addRemoveResourcesItem(resource);
+ }
+
+ return grantRequest;
+ }
+
+ private void setUpVimInMockAai() {
+ final EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
+ esrSystemInfo.setServiceUrl("http://myVim:8080");
+ esrSystemInfo.setType("OPENSTACK");
+ esrSystemInfo.setSystemType("VIM");
+ esrSystemInfo.setCloudDomain("myDomain");
+ esrSystemInfo.setUserName("myUser");
+ esrSystemInfo.setPassword("myPassword");
+
+ final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
+ esrSystemInfoList.getEsrSystemInfo().add(esrSystemInfo);
+
+ doReturn(Optional.of(esrSystemInfoList)).when(aaiResourcesClient).get(eq(EsrSystemInfoList.class),
+ MockitoHamcrest.argThat(new AaiResourceUriMatcher("/cloud-infrastructure/cloud-regions/cloud-region/"
+ + CLOUD_OWNER + "/" + REGION + "/esr-system-info-list")));
+ }
+
+ private GenericVnf createGenericVnf(final String type) {
+ final GenericVnf genericVnf = new GenericVnf();
+ genericVnf.setVnfId("myTestVnfId");
+ genericVnf.setNfType(type);
+ return genericVnf;
+ }
+
+ private void setUpGenericVnfWithVnfmRelationshipInMockAai(final String type, final String vnfmId) {
+ final GenericVnf genericVnf = createGenericVnf(type);
+
+ final Relationship relationshipToVnfm = new Relationship();
+ relationshipToVnfm.setRelatedTo("tenant");
+ final RelationshipData relationshipData1 = new RelationshipData();
+ final RelationshipData relationshipData2 = new RelationshipData();
+ final RelationshipData relationshipData3 = new RelationshipData();
+
+ relationshipData1.setRelationshipKey("cloud-region.cloud-owner");
+ relationshipData1.setRelationshipValue(CLOUD_OWNER);
+ relationshipData2.setRelationshipKey("cloud-region.cloud-region-id");
+ relationshipData2.setRelationshipValue(REGION);
+ relationshipData3.setRelationshipKey("tenant.tenant-id");
+ relationshipData3.setRelationshipValue(TENANT_ID);
+
+ relationshipToVnfm.getRelationshipData().add(relationshipData1);
+ relationshipToVnfm.getRelationshipData().add(relationshipData2);
+ relationshipToVnfm.getRelationshipData().add(relationshipData3);
+
+ final RelationshipList relationshipList = new RelationshipList();
+ relationshipList.getRelationship().add(relationshipToVnfm);
+ genericVnf.setRelationshipList(relationshipList);
+
+ doReturn(Optional.of(genericVnf)).when(aaiResourcesClient).get(eq(GenericVnf.class),
+ MockitoHamcrest.argThat(new AaiResourceUriMatcher("/network/generic-vnfs/generic-vnf/myTestVnfId")));
+ }
+
+ private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
+
+ final String uriAsString;
+
+ public AaiResourceUriMatcher(final String uriAsString) {
+ this.uriAsString = uriAsString;
+ }
+
+ @Override
+ public boolean matches(final Object item) {
+ if (item instanceof AAIResourceUri) {
+ if (uriAsString.endsWith("...")) {
+ return ((AAIResourceUri) item).build().toString()
+ .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
+ }
+ return ((AAIResourceUri) item).build().toString().equals(uriAsString);
+ }
+ return false;
+ }
+
+ @Override
+ public void describeTo(final Description description) {}
+
+ }
+
+}