summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2019-04-04 16:06:42 +0000
committerMarcus Williams <marcus.williams@intel.com>2019-04-04 20:24:55 +0000
commit4602430ef0e94f14088c7428740902868a1e7ba8 (patch)
tree8ad26d27a7c4c35c3b15290a821018e314ebe4e9 /adapters
parentf81920304c7b62637d32473e672a1e51275ce54b (diff)
Notification handling for instantiate
Issue-ID: SO-1629 Change-Id: I3ef8aae6f40c83600b723d5c8a5e8a2c7d7b1516 Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml21
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json1897
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml13
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java41
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java22
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java20
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java159
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnContoller.java107
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java255
9 files changed, 2535 insertions, 0 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 8e5deafd21..9fa14b1b18 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
@@ -47,6 +47,27 @@
</configOptions>
</configuration>
</execution>
+ <execution>
+ <id>sol003-vnf-lcn-api</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json</inputSpec>
+ <language>java</language>
+ <library>okhttp-gson</library>
+ <output>${project.build.directory}/generated-sources/sol003-vnf-lcn</output>
+ <apiPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.api</apiPackage>
+ <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model</modelPackage>
+ <configOptions>
+ <jackson>true</jackson>
+ <sourceFolder>src/gen/java/main</sourceFolder>
+ <withXml>true</withXml>
+ <useRxJava2>true</useRxJava2>
+ <serializableModel>true</serializableModel>
+ </configOptions>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json
new file mode 100644
index 0000000000..d3b6ebaa7e
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json
@@ -0,0 +1,1897 @@
+{
+ "swagger" : "2.0",
+ "info" : {
+ "description" : "SOL003 - VNF Lifecycle Management Notification 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",
+ "version" : "1.1.1",
+ "title" : "SOL003 - VNF Lifecycle Management Notification interface",
+ "license" : {
+ "name" : "ETSI Forge copyright notice",
+ "url" : "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
+ }
+ },
+ "basePath" : "/so/vnfm-adapter/v1/",
+ "schemes" : [ "https" ],
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "paths" : {
+ "/lcn/VnfLcmOperationOccurrenceNotification" : {
+ "post" : {
+ "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "VnfLcmOperationOccurrenceNotification",
+ "description" : "A notification about on-boarding of a VNF package.",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/VnfLcmOperationOccurrenceNotification"
+ }
+ }, {
+ "name" : "Authorization",
+ "in" : "header",
+ "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "Content-Type",
+ "in" : "header",
+ "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "204" : {
+ "description" : "No Content\nThe notification was delivered successfully.\n",
+ "headers" : {
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ }
+ },
+ "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 ---\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 ---\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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "403" : {
+ "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ }
+ }
+ }
+ },
+ "/lcn/VnfIdentifierCreationNotification" : {
+ "post" : {
+ "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "VnfIdentifierCreationNotification",
+ "description" : "A notification about the creation of a VNF identifier and the related VNF instance resource.\n",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/VnfIdentifierCreationNotification"
+ }
+ }, {
+ "name" : "Authorization",
+ "in" : "header",
+ "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "Content-Type",
+ "in" : "header",
+ "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "204" : {
+ "description" : "No Content\nThe notification was delivered successfully.\n",
+ "headers" : {
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ }
+ },
+ "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 ---\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 ---\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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "403" : {
+ "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ }
+ }
+ }
+ },
+ "/lcn/VnfIdentifierDeletionNotification" : {
+ "post" : {
+ "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "VnfIdentifierDeletionNotification",
+ "description" : "A notification about the deletion of a VNF identifier and the related VNF instance resource.\n",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/VnfIdentifierDeletionNotification"
+ }
+ }, {
+ "name" : "Authorization",
+ "in" : "header",
+ "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "Content-Type",
+ "in" : "header",
+ "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "204" : {
+ "description" : "No Content\nThe notification was delivered successfully.\n",
+ "headers" : {
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ }
+ },
+ "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 ---\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 ---\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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ },
+ "WWW-Authenticate" : {
+ "type" : "string",
+ "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"
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "403" : {
+ "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
+ "headers" : {
+ "Content-Type" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ },
+ "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" : {
+ "type" : "string",
+ "description" : "The MIME type of the body of the response."
+ }
+ },
+ "schema" : {
+ "type" : "object",
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions" : {
+ "lcnVnfLcmOperationOccurrenceNotification_changedInfo_vimConnectionInfo" : {
+ "required" : [ "id", "vimType" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "vimId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "vimType" : {
+ "type" : "string",
+ "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"
+ },
+ "interfaceInfo" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "accessInfo" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "extra" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ }
+ },
+ "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",
+ "example" : {
+ "vimType" : "vimType",
+ "vimId" : "vimId",
+ "extra" : "{}",
+ "interfaceInfo" : "{}",
+ "id" : "id",
+ "accessInfo" : "{}"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_computeResource" : {
+ "required" : [ "resourceId", "vimConnectionId" ],
+ "properties" : {
+ "vimConnectionId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "resourceProviderId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "resourceId" : {
+ "type" : "string",
+ "description" : "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n"
+ },
+ "vimLevelResourceType" : {
+ "type" : "string",
+ "description" : "Type of the resource in the scope of the VIM or the resource provider.\n"
+ }
+ },
+ "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",
+ "example" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_affectedVnfcs" : {
+ "required" : [ "changeType", "computeResource", "id", "vduId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ },
+ "vduId" : {
+ "type" : "string",
+ "description" : "An identifier that is unique within a VNF descriptor.\n"
+ },
+ "changeType" : {
+ "type" : "string",
+ "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVnfc structure exists as long as the temporary resource exists.\n",
+ "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY" ]
+ },
+ "computeResource" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
+ },
+ "metadata" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "affectedVnfcCpIds" : {
+ "type" : "array",
+ "description" : "Identifiers of CP(s) of the VNFC instance that were affected by the change. Shall be present for those affected CPs of the VNFC instance that are associated to an external CP of the VNF instance. May be present for further affected CPs of the VNFC instance.\n",
+ "items" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ }
+ },
+ "addedStorageResourceIds" : {
+ "type" : "array",
+ "description" : "References to VirtualStorage resources that have been added. Each value refers to a VirtualStorageResourceInfo item in the VnfInstance that was added to the VNFC. It shall be provided if at least one storage resource was added to the VNFC.\n",
+ "items" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ }
+ },
+ "removedStorageResourceIds" : {
+ "type" : "array",
+ "description" : "References to VirtualStorage resources that have been removed. The value contains the identifier of a VirtualStorageResourceInfo item that has been removed from the VNFC, and might no longer exist in the VnfInstance. It shall be provided if at least one storage resource was removed from the VNFC.\n",
+ "items" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ }
+ }
+ },
+ "description" : "This type provides information about added, deleted, modified and temporary VNFCs. \n",
+ "example" : {
+ "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
+ "metadata" : "{}",
+ "changeType" : "ADDED",
+ "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
+ "id" : "id",
+ "vduId" : "vduId",
+ "computeResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_changedExtConnectivity" : {
+ "required" : [ "id", "resourceHandle" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "resourceHandle" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
+ },
+ "extLinkPorts" : {
+ "type" : "array",
+ "description" : "Link ports of this VL.\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_extLinkPorts"
+ }
+ }
+ },
+ "example" : {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "extLinkPorts" : [ {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ }, {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ } ],
+ "id" : "id"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_error" : {
+ "required" : [ "detail", "status" ],
+ "properties" : {
+ "type" : {
+ "type" : "string",
+ "format" : "URI",
+ "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"
+ },
+ "title" : {
+ "type" : "string",
+ "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"
+ },
+ "status" : {
+ "type" : "integer",
+ "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"
+ },
+ "detail" : {
+ "type" : "string",
+ "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
+ },
+ "instance" : {
+ "type" : "string",
+ "format" : "URI",
+ "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
+ }
+ },
+ "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",
+ "example" : {
+ "instance" : "instance",
+ "detail" : "detail",
+ "type" : "type",
+ "title" : "title",
+ "status" : 0
+ }
+ },
+ "VnfLcmOperationOccurrenceNotification" : {
+ "type" : "object",
+ "required" : [ "_links", "id", "isAutomaticInvocation", "notificationStatus", "notificationType", "operation", "operationState", "subscriptionId", "timeStamp", "vnfInstanceId", "vnfLcmOpOccId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "notificationType" : {
+ "type" : "string",
+ "description" : "Discriminator for the different notification types. Shall be set to \"VnfLcmOperationOccurrenceNotification\" for this notification type.\n",
+ "enum" : [ "VnfLcmOperationOccurrenceNotification" ]
+ },
+ "subscriptionId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "timeStamp" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
+ },
+ "notificationStatus" : {
+ "type" : "string",
+ "description" : "Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation. Permitted values: * START: Informs about the start of the VNF LCM operation\n occurrence.\n* RESULT: Informs about the final or intermediate result of the VNF\n LCM operation occurrence.\n",
+ "enum" : [ "START", "RESULT" ]
+ },
+ "operationState" : {
+ "type" : "string",
+ "description" : "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
+ "enum" : [ "STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK" ]
+ },
+ "vnfInstanceId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "operation" : {
+ "type" : "string",
+ "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",
+ "enum" : [ "INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO" ]
+ },
+ "isAutomaticInvocation" : {
+ "type" : "boolean",
+ "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"
+ },
+ "vnfLcmOpOccId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "affectedVnfcs" : {
+ "type" : "array",
+ "description" : "Information about VNFC instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVnfcs"
+ }
+ },
+ "affectedVirtualLinks" : {
+ "type" : "array",
+ "description" : "Information about VL instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVirtualLinks"
+ }
+ },
+ "affectedVirtualStorages" : {
+ "type" : "array",
+ "description" : "Information about virtualised storage instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVirtualStorages"
+ }
+ },
+ "changedInfo" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedInfo"
+ },
+ "changedExtConnectivity" : {
+ "type" : "array",
+ "description" : "Information about changed external connectivity, if this notification represents the result of a lifecycle operation occurrence. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the \"operation\" is set to \"CHANGE_EXT_CONN\". Shall be absent otherwise.\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedExtConnectivity"
+ }
+ },
+ "error" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_error"
+ },
+ "_links" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
+ }
+ },
+ "description" : "This type represents a VNF lifecycle management operation occurrence notification, which informs the receiver of changes in the VNF lifecycle caused by a VNF LCM operation occurrence. The support of the notification is mandatory. This notification shall be triggered by the VNFM when there is a change in the VNF lifecycle caused by a VNF LCM operation occurrence, including: * Instantiation of the VNF * Scaling of the VNF instance (including auto-scaling) * Healing of the VNF instance (including auto-healing) * Change of the state of the VNF instance (i.e. Operate VNF) * Change of the deployment flavour of the VNF instance * Change of the external connectivity of the VNF instance * Termination of the VNF instance * Modification of VNF instance information and/or VNF configurable\n properties through the \"PATCH\" method on the \"Individual VNF instance\"\n resource.\nIf this is the initial notification about the start of a VNF LCM operation occurrence, it is assumed that the notification is sent by the VNFM before any action (including sending the grant request) is taken as part of the LCM operation. Due to possible race conditions, the \"start\" notification, the grant request and the LCM operation acknowledgment can arrive in any order at the NFVO, and the NFVO shall be able to handle such a situation. If this is a notification about a final or intermediate result state of a VNF LCM operation occurrence, the notification shall be sent after all related actions of the LCM operation that led to this state have been executed. The new state shall be set in the VnfLcmOpOcc resource before the notification about the state change is sent.\n",
+ "example" : {
+ "notificationStatus" : "START",
+ "affectedVirtualLinks" : [ {
+ "metadata" : "{}",
+ "networkResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "changeType" : "ADDED",
+ "virtualLinkDescId" : "virtualLinkDescId",
+ "id" : "id"
+ }, {
+ "metadata" : "{}",
+ "networkResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "changeType" : "ADDED",
+ "virtualLinkDescId" : "virtualLinkDescId",
+ "id" : "id"
+ } ],
+ "affectedVirtualStorages" : [ {
+ "metadata" : "{}",
+ "virtualStorageDescId" : "virtualStorageDescId",
+ "changeType" : "ADDED",
+ "id" : "id",
+ "storageResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ }
+ }, {
+ "metadata" : "{}",
+ "virtualStorageDescId" : "virtualStorageDescId",
+ "changeType" : "ADDED",
+ "id" : "id",
+ "storageResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ }
+ } ],
+ "affectedVnfcs" : [ {
+ "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
+ "metadata" : "{}",
+ "changeType" : "ADDED",
+ "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
+ "id" : "id",
+ "vduId" : "vduId",
+ "computeResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
+ }, {
+ "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
+ "metadata" : "{}",
+ "changeType" : "ADDED",
+ "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
+ "id" : "id",
+ "vduId" : "vduId",
+ "computeResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
+ } ],
+ "_links" : {
+ "subscription" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfLcmOpOcc" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfInstance" : {
+ "href" : "http://example.com/aeiou"
+ }
+ },
+ "operationState" : "STARTING",
+ "notificationType" : "VnfLcmOperationOccurrenceNotification",
+ "error" : {
+ "instance" : "instance",
+ "detail" : "detail",
+ "type" : "type",
+ "title" : "title",
+ "status" : 0
+ },
+ "timeStamp" : "2000-01-23T04:56:07.000+00:00",
+ "vnfInstanceId" : "vnfInstanceId",
+ "vnfLcmOpOccId" : "vnfLcmOpOccId",
+ "changedInfo" : {
+ "vnfProductName" : "vnfProductName",
+ "metadata" : "{}",
+ "extensions" : "{}",
+ "vimConnectionInfo" : [ {
+ "vimType" : "vimType",
+ "vimId" : "vimId",
+ "extra" : "{}",
+ "interfaceInfo" : "{}",
+ "id" : "id",
+ "accessInfo" : "{}"
+ }, {
+ "vimType" : "vimType",
+ "vimId" : "vimId",
+ "extra" : "{}",
+ "interfaceInfo" : "{}",
+ "id" : "id",
+ "accessInfo" : "{}"
+ } ],
+ "vnfdVersion" : "vnfdVersion",
+ "vnfProvider" : "vnfProvider",
+ "vnfConfigurableProperties" : "{}",
+ "vnfPkgId" : "vnfPkgId",
+ "vnfdId" : "vnfdId",
+ "vnfInstanceName" : "vnfInstanceName",
+ "vnfInstanceDescription" : "vnfInstanceDescription",
+ "vnfSoftwareVersion" : "vnfSoftwareVersion"
+ },
+ "changedExtConnectivity" : [ {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "extLinkPorts" : [ {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ }, {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ } ],
+ "id" : "id"
+ }, {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "extLinkPorts" : [ {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ }, {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ } ],
+ "id" : "id"
+ } ],
+ "id" : "id",
+ "subscriptionId" : "subscriptionId",
+ "isAutomaticInvocation" : true,
+ "operation" : "INSTANTIATE"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_extLinkPorts" : {
+ "required" : [ "id", "resourceHandle" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "resourceHandle" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
+ },
+ "cpInstanceId" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ }
+ },
+ "description" : "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL. \n",
+ "example" : {
+ "resourceHandle" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "id" : "id",
+ "cpInstanceId" : "cpInstanceId"
+ }
+ },
+ "VnfIdentifierCreationNotification" : {
+ "type" : "object",
+ "required" : [ "_links", "id", "notificationType", "timeStamp", "vnfInstanceId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "notificationType" : {
+ "type" : "string",
+ "description" : "Discriminator for the different notification types. Shall be set to \"VnfIdentifierCreationNotification\" for this notification type.\n",
+ "enum" : [ "VnfIdentifierCreationNotification" ]
+ },
+ "subscriptionId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "timeStamp" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
+ },
+ "vnfInstanceId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "_links" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
+ }
+ },
+ "description" : "This type represents a VNF identifier creation notification, which informs the receiver of the creation of a new VNF instance resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has created a VNF instance resource and the associated VNF instance identifier.\n",
+ "example" : {
+ "timeStamp" : "2000-01-23T04:56:07.000+00:00",
+ "vnfInstanceId" : "vnfInstanceId",
+ "_links" : {
+ "subscription" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfLcmOpOcc" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfInstance" : {
+ "href" : "http://example.com/aeiou"
+ }
+ },
+ "id" : "id",
+ "notificationType" : "VnfIdentifierCreationNotification",
+ "subscriptionId" : "subscriptionId"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance" : {
+ "required" : [ "href" ],
+ "properties" : {
+ "href" : {
+ "type" : "string",
+ "format" : "url",
+ "description" : "URI of the referenced resource.\n"
+ }
+ },
+ "description" : "This type represents a link to a resource.\n",
+ "example" : {
+ "href" : "http://example.com/aeiou"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_changedInfo" : {
+ "properties" : {
+ "vnfInstanceName" : {
+ "type" : "string",
+ "description" : "If present, this attribute signals modifications of the \"vnfInstanceName\" attribute in \"VnfInstance\".\n"
+ },
+ "vnfInstanceDescription" : {
+ "type" : "string",
+ "description" : "If present, this attribute signals modifications of the \"vnfInstanceDescription\" attribute in \"VnfInstance\".\n"
+ },
+ "vnfConfigurableProperties" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "metadata" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "extensions" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ },
+ "vimConnectionInfo" : {
+ "type" : "array",
+ "description" : "If present, this attribute signals modifications of certain entries in the \"vimConnectionInfo\" attribute array in \"VnfInstance\".\n",
+ "items" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedInfo_vimConnectionInfo"
+ }
+ },
+ "vnfPkgId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "vnfdId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "vnfProvider" : {
+ "type" : "string",
+ "description" : "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n"
+ },
+ "vnfProductName" : {
+ "type" : "string",
+ "description" : "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n"
+ },
+ "vnfSoftwareVersion" : {
+ "type" : "string",
+ "description" : "A Version.\n"
+ },
+ "vnfdVersion" : {
+ "type" : "string",
+ "description" : "A Version.\n"
+ }
+ },
+ "description" : "This type represents attribute modifications that were performed on an \"Individual VNF instance\" resource. The attributes that can be included consist of those requested to be modified explicitly in the \"VnfInfoModificationRequest\" data structure, and additional attributes of the \"VnfInstance\" data structure that were modified implicitly e.g. when modifying the referenced VNF package.\n",
+ "example" : {
+ "vnfProductName" : "vnfProductName",
+ "metadata" : "{}",
+ "extensions" : "{}",
+ "vimConnectionInfo" : [ {
+ "vimType" : "vimType",
+ "vimId" : "vimId",
+ "extra" : "{}",
+ "interfaceInfo" : "{}",
+ "id" : "id",
+ "accessInfo" : "{}"
+ }, {
+ "vimType" : "vimType",
+ "vimId" : "vimId",
+ "extra" : "{}",
+ "interfaceInfo" : "{}",
+ "id" : "id",
+ "accessInfo" : "{}"
+ } ],
+ "vnfdVersion" : "vnfdVersion",
+ "vnfProvider" : "vnfProvider",
+ "vnfConfigurableProperties" : "{}",
+ "vnfPkgId" : "vnfPkgId",
+ "vnfdId" : "vnfdId",
+ "vnfInstanceName" : "vnfInstanceName",
+ "vnfInstanceDescription" : "vnfInstanceDescription",
+ "vnfSoftwareVersion" : "vnfSoftwareVersion"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_affectedVirtualStorages" : {
+ "required" : [ "changeType", "id", "storageResource", "virtualStorageDescId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ },
+ "virtualStorageDescId" : {
+ "type" : "string",
+ "description" : "An identifier that is unique within a VNF descriptor.\n"
+ },
+ "changeType" : {
+ "type" : "string",
+ "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVirtualStorage structure exists as long as the temporary resource exists.\n",
+ "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY" ]
+ },
+ "storageResource" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
+ },
+ "metadata" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ }
+ },
+ "description" : "This type provides information about added, deleted, modified and temporary virtual storage resources.\n",
+ "example" : {
+ "metadata" : "{}",
+ "virtualStorageDescId" : "virtualStorageDescId",
+ "changeType" : "ADDED",
+ "id" : "id",
+ "storageResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ }
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification__links" : {
+ "required" : [ "subscription", "vnfInstance" ],
+ "properties" : {
+ "vnfInstance" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
+ },
+ "subscription" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
+ },
+ "vnfLcmOpOcc" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
+ }
+ },
+ "description" : "This type represents the links to resources that a notification can contain.\n",
+ "example" : {
+ "subscription" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfLcmOpOcc" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfInstance" : {
+ "href" : "http://example.com/aeiou"
+ }
+ }
+ },
+ "VnfIdentifierDeletionNotification" : {
+ "type" : "object",
+ "required" : [ "_links", "id", "notificationType", "timeStamp", "vnfInstanceId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "notificationType" : {
+ "type" : "string",
+ "description" : "Discriminator for the different notification types. Shall be set to \"VnfIdentifierDeletionNotification\" for this notification type.\n",
+ "enum" : [ "VnfIdentifierDeletionNotification" ]
+ },
+ "subscriptionId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "timeStamp" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
+ },
+ "vnfInstanceId" : {
+ "type" : "string",
+ "description" : "An identifier with the intention of being globally unique.\n"
+ },
+ "_links" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
+ }
+ },
+ "description" : "This type represents a VNF identifier deletion notification, which informs the receiver of the deletion of a new VNF instance resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has deleted a VNF instance resource and the associated VNF instance identifier.\n",
+ "example" : {
+ "timeStamp" : "2000-01-23T04:56:07.000+00:00",
+ "vnfInstanceId" : "vnfInstanceId",
+ "_links" : {
+ "subscription" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfLcmOpOcc" : {
+ "href" : "http://example.com/aeiou"
+ },
+ "vnfInstance" : {
+ "href" : "http://example.com/aeiou"
+ }
+ },
+ "id" : "id",
+ "notificationType" : "VnfIdentifierDeletionNotification",
+ "subscriptionId" : "subscriptionId"
+ }
+ },
+ "lcnVnfLcmOperationOccurrenceNotification_affectedVirtualLinks" : {
+ "required" : [ "changeType", "id", "networkResource", "virtualLinkDescId" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
+ },
+ "virtualLinkDescId" : {
+ "type" : "string",
+ "description" : "An identifier that is unique within a VNF descriptor.\n"
+ },
+ "changeType" : {
+ "type" : "string",
+ "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY * LINK_PORT_ADDED * LINK_PORT_REMOVED For a temporary resource, an AffectedVirtualLink structure exists as long as the temporary resource exists.\n",
+ "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED" ]
+ },
+ "networkResource" : {
+ "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
+ },
+ "metadata" : {
+ "type" : "object",
+ "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",
+ "properties" : { }
+ }
+ },
+ "description" : "This type provides information about added, deleted, modified and temporary VLs.\n",
+ "example" : {
+ "metadata" : "{}",
+ "networkResource" : {
+ "resourceId" : "resourceId",
+ "vimConnectionId" : "vimConnectionId",
+ "vimLevelResourceType" : "vimLevelResourceType",
+ "resourceProviderId" : "resourceProviderId"
+ },
+ "changeType" : "ADDED",
+ "virtualLinkDescId" : "virtualLinkDescId",
+ "id" : "id"
+ }
+ }
+ },
+ "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"
+ }
+} \ No newline at end of file
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
index d932c4e768..f97c1b8c56 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
@@ -45,6 +45,19 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <so.log.level>DEBUG</so.log.level>
+ </systemPropertyVariables>
+ <rerunFailingTestsCount>2</rerunFailingTestsCount>
+ <parallel>suites</parallel>
+ <useUnlimitedThreads>false</useUnlimitedThreads>
+ <threadCount>1</threadCount>
+ </configuration>
+ </plugin>
</plugins>
</build>
<dependencies>
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 893df02019..bacbea141e 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
@@ -30,6 +30,8 @@ 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.VnfmNotFoundException;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIVersion;
@@ -172,4 +174,43 @@ public class AaiHelper {
return false;
}
+ /**
+ * Create a vserver.
+ *
+ * @param vnfc the VNFC to base the vserver on
+ * @return the vserver
+ */
+ public Vserver createVserver(final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc) {
+ final Vserver vserver = new Vserver();
+ vserver.setVserverId(vnfc.getComputeResource().getResourceId());
+ vserver.setVserverName(vnfc.getId());
+ vserver.setProvStatus("active");
+ vserver.setVserverSelflink("Not available");
+ return vserver;
+ }
+
+ /**
+ * Add a relationship to the given vserver to the given VNF.
+ *
+ * @param vnf the vserver
+ * @param vnfmId the ID of the VNF
+ */
+ public void addRelationshipFromVserverVnfToGenericVnf(final Vserver vserver, final String vnfId) {
+ if (vserver.getRelationshipList() == null) {
+ vserver.setRelationshipList(new RelationshipList());
+ }
+ final RelationshipList vserverRelationshiplist = vserver.getRelationshipList();
+ vserverRelationshiplist.getRelationship().add(createRelationshipToGenericVnf(vnfId));
+ }
+
+ private Relationship createRelationshipToGenericVnf(final String vnfId) {
+ final Relationship relationship = new Relationship();
+ relationship.setRelatedTo("generic-vnf");
+ relationship.setRelationshipLabel("tosca.relationships.HostedOn");
+ relationship.setRelatedLink("/aai/" + AAIVersion.LATEST
+ + AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).build().toString());
+ relationship.getRelationshipData().add(createRelationshipData("generic-vnf.vnf-id", vnfId));
+ return relationship;
+ }
+
}
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 d11da0c91b..a043bb85b6 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
@@ -20,11 +20,13 @@
package org.onap.so.adapters.vnfmadapter.extclients.aai;
+import java.util.List;
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;
/**
* Provides methods for invoking REST calls to AAI.
@@ -40,6 +42,14 @@ public interface AaiServiceProvider {
GenericVnf invokeGetGenericVnf(final String vnfId);
/**
+ * Invoke a query for a generic VNF with the given selfLink
+ *
+ * @param selfLink the selfLink
+ * @return the matching generic vnfs
+ */
+ List<GenericVnf> invokeQueryGenericVnf(final String selfLink);
+
+ /**
* Invoke a GET request for the VNFMs.
*
* @return the VNFMs
@@ -70,6 +80,18 @@ public interface AaiServiceProvider {
void invokePutGenericVnf(GenericVnf vnf);
/**
+ * Invoke a PUT request for a vserver.
+ *
+ * @param cloudOwner the cloud owner
+ * @param cloudRegion the cloud region
+ * @param tenantId the ID of the tenant
+ * @param vserver the vserver
+ * @return
+ */
+ void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenantId,
+ final Vserver vserver);
+
+ /**
* Invoke a GET request for the a tenant.
*
* @param cloudOwner the cloud owner
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 fa0dcf07f1..364a6415a8 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
@@ -20,11 +20,13 @@
package org.onap.so.adapters.vnfmadapter.extclients.aai;
+import java.util.List;
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.slf4j.Logger;
@@ -54,6 +56,17 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
}
@Override
+ public List<GenericVnf> invokeQueryGenericVnf(final String selfLink) {
+ return aaiClientProvider.getAaiClient()
+ .get(List.class,
+ AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam("selflink", selfLink))
+ .orElseGet(() -> {
+ logger.debug("No vnf found in AAI with selflink: {}", selfLink);
+ return null;
+ });
+ }
+
+ @Override
public EsrVnfmList invokeGetVnfms() {
return aaiClientProvider.getAaiClient()
.get(EsrVnfmList.class, AAIUriFactory.createResourceUri(AAIObjectType.VNFM_LIST)).orElseGet(() -> {
@@ -89,6 +102,13 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
}
@Override
+ public void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenant,
+ final Vserver vserver) {
+ aaiClientProvider.getAaiClient().update(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
+ cloudRegion, tenant, vserver.getVserverId()), vserver);
+ }
+
+ @Override
public Tenant invokeGetTenant(final String cloudOwner, final String cloudRegion, final String tenantId) {
return aaiClientProvider.getAaiClient()
.get(Tenant.class,
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java
new file mode 100644
index 0000000000..36b197dd06
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java
@@ -0,0 +1,159 @@
+/*-
+ * ============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.notificationhandling;
+
+import static org.slf4j.LoggerFactory.getLogger;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Vserver;
+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.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
+import org.slf4j.Logger;
+
+/**
+ * Performs updates to AAI based on a received notification. The updates are executed in a separate
+ * thread so as the notification response to the VNFM is not delayed.
+ */
+public class NotificationHandler implements Runnable {
+ private static Logger logger = getLogger(NotificationHandler.class);
+ private final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification;
+ private final AaiHelper aaiHelper;
+ private final AaiServiceProvider aaiServiceProvider;
+
+
+ private final InlineResponse201 vnfInstance;
+
+ public NotificationHandler(final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification,
+ final AaiHelper aaiHelper, final AaiServiceProvider aaiServiceProvider,
+ final InlineResponse201 vnfInstance) {
+ this.vnfLcmOperationOccurrenceNotification = vnfLcmOperationOccurrenceNotification;
+ this.aaiHelper = aaiHelper;
+ this.aaiServiceProvider = aaiServiceProvider;
+ this.vnfInstance = vnfInstance;
+ }
+
+ @Override
+ public void run() {
+ try {
+ if (vnfLcmOperationOccurrenceNotification.getOperationState().equals(OperationStateEnum.COMPLETED)) {
+ final GenericVnf genericVnf =
+ aaiServiceProvider.invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).get(0);
+
+ switch (vnfLcmOperationOccurrenceNotification.getOperation()) {
+ case INSTANTIATE:
+ handleVnfInstantiated(genericVnf);
+ break;
+ default:
+ }
+ }
+ } catch (final Exception exception) {
+ logger.error("Error encountered handling notification, AAI may not be updated correctly "
+ + vnfLcmOperationOccurrenceNotification, exception);
+ }
+ }
+
+ private void handleVnfInstantiated(final GenericVnf genericVnf) {
+ final String ipAddress = getOamIpAddress(vnfInstance);
+ logger.debug("Updating " + genericVnf.getVnfId() + " with VNF OAM IP ADDRESS: " + ipAddress);
+ genericVnf.setIpv4OamAddress(ipAddress);
+ genericVnf.setOrchestrationStatus("Created");
+
+ aaiServiceProvider.invokePutGenericVnf(genericVnf);
+
+ updateVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(),
+ vnfInstance.getVimConnectionInfo());
+
+ logger.debug("Finished handling notification for vnfm: " + vnfInstance.getId());
+ }
+
+ private String getOamIpAddress(final InlineResponse201 vnfInstance) {
+ try {
+ logger.debug("ConfigurableProperties: " + vnfInstance.getVnfConfigurableProperties());
+ if (vnfInstance.getVnfConfigurableProperties() == null) {
+ logger.warn("No ConfigurableProperties, cannot set OAM IP Address");
+ return null;
+ }
+ final JSONObject properties = new JSONObject((Map) vnfInstance.getVnfConfigurableProperties());
+ return properties.get("vnfIpAddress").toString();
+ } catch (final JSONException jsonException) {
+ logger.error("Error getting vnfIpAddress", jsonException);
+ return null;
+ }
+ }
+
+ private void updateVservers(final VnfLcmOperationOccurrenceNotification notification, final String vnfId,
+ final List<InlineResponse201VimConnectionInfo> vnfInstancesVimConnectionInfo) {
+ final Map<String, InlineResponse201VimConnectionInfo> vimConnectionIdToVimConnectionInfo = new HashMap<>();
+ for (final InlineResponse201VimConnectionInfo vimConnectionInfo : vnfInstancesVimConnectionInfo) {
+ vimConnectionIdToVimConnectionInfo.put(vimConnectionInfo.getId(), vimConnectionInfo);
+ }
+
+ for (final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc : notification.getAffectedVnfcs()) {
+
+ switch (vnfc.getChangeType()) {
+ case ADDED:
+ final Vserver vserver = aaiHelper.createVserver(vnfc);
+ aaiHelper.addRelationshipFromVserverVnfToGenericVnf(vserver, vnfId);
+ final InlineResponse201VimConnectionInfo vimConnectionInfo =
+ getVimConnectionInfo(vimConnectionIdToVimConnectionInfo, vnfc);
+ aaiServiceProvider.invokePutVserver(getCloudOwner(vimConnectionInfo),
+ getCloudRegion(vimConnectionInfo), getTenant(vimConnectionInfo), vserver);
+ break;
+ case REMOVED:
+ case MODIFIED:
+ case TEMPORARY:
+ default:
+ }
+ }
+ }
+
+ private InlineResponse201VimConnectionInfo getVimConnectionInfo(
+ final Map<String, InlineResponse201VimConnectionInfo> vimConnectionIdToVimConnectionInfo,
+ final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc) {
+ final String vimConnectionId = vnfc.getComputeResource().getVimConnectionId();
+ return vimConnectionIdToVimConnectionInfo.get(vimConnectionId);
+ }
+
+ private String getCloudOwner(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
+ final String vimId = vimConnectionInfo.getVimId();
+ return vimId.substring(0, vimId.indexOf("_"));
+ }
+
+ private String getCloudRegion(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
+ final String vimId = vimConnectionInfo.getVimId();
+ return vimId.substring(vimId.indexOf("_") + 1);
+ }
+
+ private String getTenant(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
+ final JSONObject vimConnectionJsonObject = new JSONObject(vimConnectionInfo);
+ return vimConnectionJsonObject.getJSONObject("accessInfo").get("projectId").toString();
+ }
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnContoller.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnContoller.java
new file mode 100644
index 0000000000..60f3f51e52
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnContoller.java
@@ -0,0 +1,107 @@
+/*-
+ * ============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 static org.slf4j.LoggerFactory.getLogger;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+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.VnfmServiceProvider;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfIdentifierCreationNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfIdentifierDeletionNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.notificationhandling.NotificationHandler;
+import org.slf4j.Logger;
+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.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * Controller for handling notifications from the VNFM (Virtual Network Function Manager).
+ */
+@Controller
+@RequestMapping(value = BASE_URL, produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+ consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+public class Sol003LcnContoller {
+ private static Logger logger = getLogger(Sol003LcnContoller.class);
+ private static final String LOG_LCN_RECEIVED = "LCN received from VNFM: ";
+ private final AaiServiceProvider aaiServiceProvider;
+ private final AaiHelper aaiHelper;
+ private final VnfmServiceProvider vnfmServiceProvider;
+ private final ExecutorService executor = Executors.newCachedThreadPool();
+
+ @Autowired
+ Sol003LcnContoller(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
+ final VnfmServiceProvider vnfmServiceProvider) {
+ this.aaiServiceProvider = aaiServiceProvider;
+ this.aaiHelper = aaiHelper;
+ this.vnfmServiceProvider = vnfmServiceProvider;
+ }
+
+ @PostMapping(value = "/lcn/VnfIdentifierCreationNotification")
+ public ResponseEntity<Void> lcnVnfIdentifierCreationNotificationPost(
+ @RequestBody final VnfIdentifierCreationNotification vnfIdentifierCreationNotification) {
+ logger.info(LOG_LCN_RECEIVED + vnfIdentifierCreationNotification);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @PostMapping(value = "/lcn/VnfIdentifierDeletionNotification")
+ public ResponseEntity<Void> lcnVnfIdentifierDeletionNotificationPost(
+ @RequestBody final VnfIdentifierDeletionNotification vnfIdentifierDeletionNotification) {
+ logger.info(LOG_LCN_RECEIVED + vnfIdentifierDeletionNotification);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @PostMapping(value = "/lcn/VnfLcmOperationOccurrenceNotification")
+ public ResponseEntity<Void> lcnVnfLcmOperationOccurrenceNotificationPost(
+ @RequestBody final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification) {
+ logger.info(LOG_LCN_RECEIVED + vnfLcmOperationOccurrenceNotification);
+
+ final OperationEnum operation = vnfLcmOperationOccurrenceNotification.getOperation();
+ if ((operation.equals(OperationEnum.INSTANTIATE))
+ && vnfLcmOperationOccurrenceNotification.getOperationState().equals(OperationStateEnum.COMPLETED)) {
+ final InlineResponse201 vnfInstance = getVnfInstance(vnfLcmOperationOccurrenceNotification);
+ final NotificationHandler handler = new NotificationHandler(vnfLcmOperationOccurrenceNotification,
+ aaiHelper, aaiServiceProvider, vnfInstance);
+ executor.execute(handler);
+ }
+
+ logger.info("Sending notification response");
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ private InlineResponse201 getVnfInstance(
+ final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification) {
+ return vnfmServiceProvider.getVnf(vnfLcmOperationOccurrenceNotification.getLinks().getVnfInstance().getHref())
+ .get();
+ }
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
new file mode 100644
index 0000000000..b3fbcaa3b4
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
@@ -0,0 +1,255 @@
+/*-
+ * ============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.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.timeout;
+import static org.mockito.Mockito.verify;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
+import com.google.gson.Gson;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+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.ArgumentCaptor;
+import org.mockito.hamcrest.MockitoHamcrest;
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.Vserver;
+import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.vim.model.AccessInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationComputeResource;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinks;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfIdentifierCreationNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201Links;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201LinksSelf;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
+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.MediaType;
+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;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+public class Sol003LcnControllerTest {
+
+ private static final String CLOUD_OWNER = "myTestCloudOwner";
+ private static final String REGION = "myTestRegion";
+ private static final String TENANT_ID = "myTestTenantId";
+
+ @LocalServerPort
+ private int port;
+ @Autowired
+ @Qualifier(CONFIGURABLE_REST_TEMPLATE)
+ private RestTemplate testRestTemplate;
+ private MockRestServiceServer mockRestServer;
+
+ @MockBean
+ private AAIResourcesClient aaiResourcesClient;
+
+ @Autowired
+ private Sol003LcnContoller controller;
+ private final Gson gson = new Gson();
+
+ @Before
+ public void setUp() throws Exception {
+ mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
+ }
+
+ @Test
+ public void lcnNotification_IdentifierCreated_Returns204() throws URISyntaxException, InterruptedException {
+ final VnfIdentifierCreationNotification vnfIdentifierCreationNotification =
+ new VnfIdentifierCreationNotification();
+ final ResponseEntity<Void> response =
+ controller.lcnVnfIdentifierCreationNotificationPost(vnfIdentifierCreationNotification);
+ assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
+ }
+
+ @Test
+ public void lcnNotification_IdentifierDeleted_Returns204() throws URISyntaxException, InterruptedException {
+ final VnfIdentifierCreationNotification vnfIdentifierCreationNotification =
+ new VnfIdentifierCreationNotification();
+ final ResponseEntity<Void> response =
+ controller.lcnVnfIdentifierCreationNotificationPost(vnfIdentifierCreationNotification);
+ assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
+ }
+
+ @Test
+ public void lcnNotification_InstantiateCompleted_AaiUpdated() throws URISyntaxException, InterruptedException {
+ final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification = createNotification();
+ final InlineResponse201 vnfInstance = createVnfInstance();
+
+ mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
+ .andRespond(withSuccess(gson.toJson(vnfInstance), MediaType.APPLICATION_JSON));
+
+ final GenericVnf genericVnf = createGenericVnf("vnfmType1");
+ final List<GenericVnf> genericVnfs = new ArrayList<>();
+ genericVnfs.add(genericVnf);
+ doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(List.class),
+ MockitoHamcrest.argThat(new AaiResourceUriMatcher(
+ "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
+
+ final ResponseEntity<Void> response =
+ controller.lcnVnfLcmOperationOccurrenceNotificationPost(vnfLcmOperationOccurrenceNotification);
+ assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
+
+ final ArgumentCaptor<Object> bodyArgument = ArgumentCaptor.forClass(Object.class);
+ final ArgumentCaptor<AAIResourceUri> uriArgument = ArgumentCaptor.forClass(AAIResourceUri.class);
+
+ verify(aaiResourcesClient, timeout(1000).times(2)).update(uriArgument.capture(), bodyArgument.capture());
+
+ assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId",
+ uriArgument.getAllValues().get(0).build().toString());
+ final GenericVnf updatedGenericVnf = (GenericVnf) bodyArgument.getAllValues().get(0);
+ assertEquals("10.10.10.10", updatedGenericVnf.getIpv4OamAddress());
+ assertEquals("Created", updatedGenericVnf.getOrchestrationStatus());
+
+ assertEquals(
+ "/cloud-infrastructure/cloud-regions/cloud-region/" + CLOUD_OWNER + "/" + REGION + "/tenants/tenant/"
+ + TENANT_ID + "/vservers/vserver/myVnfc1",
+ uriArgument.getAllValues().get(1).build().toString());
+
+ final Vserver vserver = (Vserver) bodyArgument.getAllValues().get(1);
+ assertEquals("myVnfc1", vserver.getVserverId());
+ final Relationship relationship = vserver.getRelationshipList().getRelationship().get(0);
+ assertEquals("generic-vnf", relationship.getRelatedTo());
+ assertEquals("tosca.relationships.HostedOn", relationship.getRelationshipLabel());
+ assertEquals("/aai/v15/network/generic-vnfs/generic-vnf/myTestVnfId", relationship.getRelatedLink());
+ assertEquals("generic-vnf.vnf-id", relationship.getRelationshipData().get(0).getRelationshipKey());
+ assertEquals("myTestVnfId", relationship.getRelationshipData().get(0).getRelationshipValue());
+ }
+
+ private VnfLcmOperationOccurrenceNotification createNotification() {
+ final VnfLcmOperationOccurrenceNotification notification = new VnfLcmOperationOccurrenceNotification();
+ notification.setOperation(OperationEnum.INSTANTIATE);
+ notification.setOperationState(OperationStateEnum.COMPLETED);
+
+ final LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance linkToVnfInstance =
+ new LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance()
+ .href("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
+ final LcnVnfLcmOperationOccurrenceNotificationLinks operationLinks =
+ new LcnVnfLcmOperationOccurrenceNotificationLinks().vnfInstance(linkToVnfInstance);
+ notification.setLinks(operationLinks);
+
+ final List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> affectedVnfcs = new ArrayList<>();;
+ final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc =
+ new LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs();
+ vnfc.changeType(ChangeTypeEnum.ADDED);
+ final LcnVnfLcmOperationOccurrenceNotificationComputeResource computeResource =
+ new LcnVnfLcmOperationOccurrenceNotificationComputeResource();
+ computeResource.setResourceId("myVnfc1");
+ computeResource.setVimConnectionId(CLOUD_OWNER + "_" + REGION);
+ vnfc.setComputeResource(computeResource);
+ affectedVnfcs.add(vnfc);
+ notification.setAffectedVnfcs(affectedVnfcs);
+ return notification;
+ }
+
+ private InlineResponse201 createVnfInstance() {
+ final InlineResponse201 vnfInstance = new InlineResponse201();
+ final InlineResponse201LinksSelf selfLink = new InlineResponse201LinksSelf();
+ selfLink.setHref("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
+ final InlineResponse201Links VnfInstancelinks = new InlineResponse201Links();
+ VnfInstancelinks.setSelf(selfLink);
+ vnfInstance.setLinks(VnfInstancelinks);
+
+ final Map<String, String> vnfConfigurableProperties = new HashMap<>();
+ vnfConfigurableProperties.put("vnfIpAddress", "10.10.10.10");
+ vnfInstance.setVnfConfigurableProperties(vnfConfigurableProperties);
+
+ final List<InlineResponse201VimConnectionInfo> vimConnectionInfo = new ArrayList<>();;
+ final InlineResponse201VimConnectionInfo vimConnection = new InlineResponse201VimConnectionInfo();
+ vimConnection.setVimId(CLOUD_OWNER + "_" + REGION);
+ vimConnection.setId(CLOUD_OWNER + "_" + REGION);
+ final AccessInfo accessInfo = new AccessInfo();
+ accessInfo.setProjectId(TENANT_ID);
+ vimConnection.setAccessInfo(accessInfo);
+ vimConnectionInfo.add(vimConnection);
+ vnfInstance.setVimConnectionInfo(vimConnectionInfo);
+ return vnfInstance;
+ }
+
+ private GenericVnf createGenericVnf(final String type) {
+ final GenericVnf genericVnf = new GenericVnf();
+ genericVnf.setVnfId("myTestVnfId");
+ genericVnf.setNfType(type);
+ return genericVnf;
+ }
+
+ 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) {}
+
+ }
+
+
+}