diff options
Diffstat (limited to 'nokiav2/driver/src/main/resources')
-rw-r--r-- | nokiav2/driver/src/main/resources/self.swagger.json | 809 | ||||
-rw-r--r-- | nokiav2/driver/src/main/resources/upload.html | 5 |
2 files changed, 385 insertions, 429 deletions
diff --git a/nokiav2/driver/src/main/resources/self.swagger.json b/nokiav2/driver/src/main/resources/self.swagger.json index 2645cd0e..680fee4f 100644 --- a/nokiav2/driver/src/main/resources/self.swagger.json +++ b/nokiav2/driver/src/main/resources/self.swagger.json @@ -21,290 +21,6 @@ "version": "1.1.0" }, "definitions": { - "SoJobHandler": { - "type": "object", - "properties": { - "jobId": { - "required": true, - "description": "The identifier of the job", - "type": "string" - } - } - }, - "SoJobStatus": { - "description": "The status of the job", - "type": "string", - "enum": [ - "started", - "finished", - "failed" - ] - }, - "SoJobDetail": { - "allOf": [ - { - "$ref": "#/definitions/SoJobHandler" - }, - { - "type": "object", - "properties": { - "status": { - "required": true, - "description": "The status of the job", - "$ref": "#/definitions/SoJobStatus" - }, - "description": { - "required": true, - "description": "The description of the current state of the job", - "type": "string" - } - } - } - ] - }, - "SoVnfCreationRequest": { - "type": "object", - "properties": { - "name": { - "required": true, - "description": "The name of the VNF", - "type": "string" - }, - "csarId": { - "required": true, - "description": "The identifier of the VNF package in SDC", - "type": "string" - }, - "description": { - "required": false, - "description": "The description of the VNF", - "type": "string" - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, - "SoVnfCreationResponse": { - "type": "object", - "properties": { - "vnfId": { - "required": true, - "description": "The identifier of the created VNF", - "type": "string" - } - } - }, - "SoVduMapping": { - "type": "object", - "properties": { - "vduId": { - "required": true, - "description": "The identifier of the VDU within the VNF package", - "type": "string" - }, - "imageId": { - "required": true, - "description": "The provider id of the image to be used for the VDU", - "type": "string" - }, - "flavourId": { - "required": true, - "description": "The provider id of the flavour to be used for the VDU", - "type": "string" - } - } - }, - "SoServerMapping": { - "type": "object", - "description": "Maps a server instance to a VDU and availability zone", - "properties": { - "vduId": { - "required": true, - "description": "The identifier of the VDU", - "type": "string" - }, - "availabilityZoneId": { - "required": false, - "description": "The provider id of the availability zone to be used for the server instance", - "type": "string" - } - } - }, - "SoAssignedAddresses": { - "type": "object", - "properties": { - "cpdId": { - "required": true, - "description": "The identifier of the connection point descriptor", - "type": "string" - }, - "ipAddress": { - "required": true, - "description": "The IP address to be used", - "type": "string" - } - } - }, - "SoNetworkMapping": { - "type": "object", - "properties": { - "vldId": { - "required": true, - "description": "The identifier of the network in the VNF package", - "type": "string" - }, - "networkProviderId": { - "required": true, - "description": "The provider id of the network be used for the given purpose", - "type": "string" - }, - "assignedAddresses": { - "required": true, - "description": "The assigned network addresses", - "type": "array", - "items": { - "$ref": "#/definitions/SoAssignedAddresses" - } - } - } - }, - "SoVnfActivationRequest": { - "type": "object", - "properties": { - "vimId": { - "required": true, - "type": "string", - "description": "The identifier of the VIM on which the VNF is to be instantiated" - }, - "serverMappings": { - "required": true, - "description": "The server mappings", - "type": "array", - "items": { - "$ref": "#/definitions/SoServerMapping" - } - }, - "vduMappings": { - "required": true, - "description": "The VDU mappings", - "type": "array", - "items": { - "$ref": "#/definitions/SoVduMapping" - } - }, - "networkMappings": { - "required": true, - "description": "The network mappings", - "type": "array", - "items": { - "$ref": "#/definitions/SoNetworkMapping" - } - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, - "SoScaleDirection": { - "description": "The direction of the scale", - "type": "string", - "enum": [ - "in", - "out" - ] - }, - "SoVnfScaleRequest": { - "type": "object", - "properties": { - "aspectId": { - "type": "string", - "description": "The identifier of the scaling aspect in the VNF package" - }, - "steps": { - "type": "integer", - "description": "The expected absolute scale level" - }, - "direction": { - "required": true, - "description": "The direction of the scale", - "$ref": "#/definitions/SoScaleDirection" - }, - "serverMappings": { - "required": true, - "description": "The server mappings", - "items": { - "$ref": "#/definitions/SoServerMapping" - } - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, - "SoVnfCustomOperation": { - "type": "object", - "properties": { - "operationId": { - "required": true, - "type": "string", - "description": "The identifier of the custom operation" - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, - "SoVnfHealRequest": { - "type": "object", - "properties": { - "vnfcId": { - "type": "string", - "description": "The identifier of the VNFC to be healed" - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, - "SoTerminationMode": { - "description": "The way in which the VNF is terminated", - "type": "string", - "enum": [ - "forceful", - "graceful" - ] - }, - "SoVnfTerminationRequest": { - "type": "object", - "properties": { - "mode": { - "required": true, - "description": "The VNF termination mode", - "$ref": "#/definitions/SoTerminationMode" - }, - "gracefulTerminationTimeoutInMs": { - "required": false, - "type": "integer", - "description": "The timeout for graceful termination. After the timeout has expired forceful termination is attempted." - }, - "additionalParams": { - "description": "Additional VNFM specific parameters", - "type": "object", - "additionalProperties": true - } - } - }, "JobDetailInfo": { "properties": { "jobId": { @@ -680,6 +396,219 @@ "VnfLifecycleChangeNotification": { "type": "object", "description": "The lifecycle change notifications send from CBAM" + }, + "SoMsoRequest": { + "type": "object", + "properties": { + "requestId": { + "required": true, + "description": "The identifier of the request in SO. Used to track requests.", + "type": "string" + }, + "serviceInstanceId": { + "required": true, + "description": "The identifier of the service instance in A&AI.", + "type": "string" + } + } + }, + "SoV2VnfQueryRequest": { + "type": "object", + "properties": { + "msoRequest": { + "required": true, + "$ref": "#/definitions/SoMsoRequest" + } + } + }, + "SoVnfStatus": { + "description": "The status of the VNF", + "type": "string", + "enum": [ + "ACTIVE", + "FAILED", + "NOTFOUND", + "UNKNOWN" + ] + }, + "SoOutput": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "SoInput": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "SoV2VnfQueryResponse": { + "type": "object", + "properties": { + "status": { + "required": true, + "description": "The status of the VNF", + "$ref": "#/definitions/SoVnfStatus" + } + } + }, + "SoV2VnfCreateRequest": { + "type": "object", + "properties": { + "cloudOwner": { + "required": true, + "type": "string", + "description": "The owner of cloud in A&AI." + }, + "regionName": { + "required": true, + "type": "string", + "description": "The regionName of cloud in A&AI." + }, + "tenantId": { + "required": true, + "type": "string", + "description": "The identifier of the tenant." + }, + "name": { + "required": true, + "type": "string", + "description": "The name of the VNF." + }, + "inputs": { + "required": false, + "description": "The inputs of the VNF.", + "$ref": "#/definitions/SoInput" + }, + "failIfExists": { + "required": false, + "description": "Should the VNF creation fail if the VNF already exists. (defaults to false)", + "type": "boolean" + }, + "deleteUponFailure": { + "required": false, + "description": "Delete VNF in case of failure. (defaults to false)", + "type": "boolean" + }, + "msoRequest": { + "required": false, + "$ref": "#/definitions/SoMsoRequest" + } + } + }, + "SoMsoRollback": { + "type": "object", + "description": "Generic rollback parameters", + "properties": { + "deleteIfExists": { + "required": true, + "description": "Delete the VNF if exists", + "type": "boolean" + }, + "vnfIdInAai": { + "required": true, + "description": "The identifier of the VNF in AAI", + "type": "string" + }, + "msoRequest": { + "required": true, + "description": "The pointer to the original request that triggered the rollback", + "$ref": "#/definitions/SoMsoRequest" + } + } + }, + "OriginalVnfProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "SoV2RollbackVnfUpdate": { + "allOf": [ + { + "$ref": "#/definitions/SoMsoRollback" + }, + { + "type": "object", + "properties": { + "originalVnfProperties": { + "required": false, + "description": "The original VNF properties before the operation", + "$ref": "#/definitions/OriginalVnfProperties" + } + } + } + ] + }, + "SoV2VnfUpdateRequest": { + "type": "object", + "properties": { + "inputs": { + "required": false, + "description": "The inputs of the VNF.", + "$ref": "#/definitions/SoInput" + }, + "msoRequest": { + "required": false, + "$ref": "#/definitions/SoMsoRequest" + } + } + }, + "SoV2VnfUpdateResponse": { + "allOf": [ + { + "$ref": "#/definitions/SoV2RollbackVnfUpdate" + }, + { + "type": "object", + "properties": { + "successful": { + "required": true, + "description": "Is the update successful. The operation can be rolled back regardless of this attribute", + "type": "boolean" + } + } + } + ] + }, + "SoV2VnfDeleteRequest": { + "type": "object", + "properties": { + "msoRequest": { + "required": false, + "$ref": "#/definitions/SoMsoRequest" + } + } + }, + "SoV2VfModuleCreateRequest": { + "type": "object", + "properties": { + "scalingAspectId": { + "required": true, + "description": "The identifier of the scaling aspect", + "type": "string" + }, + "inputs": { + "required": false, + "description": "The inputs of the VNF.", + "$ref": "#/definitions/SoInput" + }, + "failIfExists": { + "required": false, + "description": "Should the VNF creation fail if the VNF already exists. (defaults to false)", + "type": "boolean" + }, + "deleteUponFailure": { + "required": false, + "description": "Delete VF module in case of failure. (defaults to false)", + "type": "boolean" + }, + "msoRequest": { + "required": false, + "$ref": "#/definitions/SoMsoRequest" + } + } } }, "paths": { @@ -1083,56 +1012,64 @@ } } }, - "/so/{vnfmId}/vnfs": { + "/so/v2/ping": { + "get": { + "tags": [ + "SO VNFM Adaptor V2" + ], + "summary": "Test VNFM driver health", + "description": "Test VNFM driver health", + "responses": { + "204": { + "description": "VNFM adapter is healthy" + } + } + } + }, + "/so/v2/vnfs/{vnfIdInAai}/rollback": { "post": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF create", - "description": "VNF create", - "operationId": "vnf_create", + "summary": "Rollback VNF update operation", + "description": "Rollback VNF update operation", + "operationId": "rollback", "consumes": [ "application/json" ], - "produces": [ - "application/json" - ], "parameters": [ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of the VNF", + "name": "vnfIdInAai", "in": "path" }, { "in": "body", "name": "body", - "description": "VNF creation request parameter", + "description": "Rollback parameters", "required": true, "schema": { - "$ref": "#/definitions/SoVnfCreationRequest" + "$ref": "#/definitions/SoV2RollbackVnfUpdate" } } ], "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/SoVnfCreationResponse" - } + "204": { + "description": "Operation has been rolled back" } } } }, - "/so/{vnfmId}/vnfs/{vnfId}": { - "post": { + "/so/v2/vnfs/{vnfIdInAai}": { + "get": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF activation", - "description": "VNF activation", - "operationId": "vnf_activate", + "summary": "VNF query", + "description": "VNF query", + "operationId": "vnf_query", "consumes": [ "application/json" ], @@ -1143,24 +1080,17 @@ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", - "in": "path" - }, - { - "required": true, - "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", + "description": "The identifier of the VNF in A&AI.", + "name": "vnfIdInAai", "in": "path" }, { "in": "body", "name": "body", - "description": "instantiate request param", + "description": "VNF creation query parameter", "required": true, "schema": { - "$ref": "#/definitions/SoVnfActivationRequest" + "$ref": "#/definitions/SoV2VnfQueryRequest" } } ], @@ -1168,49 +1098,58 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/SoJobHandler" + "$ref": "#/definitions/SoV2VnfQueryResponse" } + }, + "404": { + "descriotion": "The VNF does not exist on the VNFM side" } } }, - "delete": { + "post": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" + ], + "summary": "VNF create", + "description": "VNF create", + "operationId": "vnf_create", + "consumes": [ + "application/json" ], - "summary": "Deletes VNF", - "description": "Deletes the VNF. If the VNF was instantiated VNF termination must be called before VNF deletion", - "operationId": "delete_vnf", "parameters": [ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of the VNF", + "name": "vnfIdInAai", "in": "path" }, { + "in": "body", + "name": "body", + "description": "VNF creation query parameter", "required": true, - "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", - "in": "path" + "schema": { + "$ref": "#/definitions/SoV2VnfCreateRequest" + } } ], "responses": { "204": { - "description": "The VNF was deleted successfully" + "description": "The VNF was created on the VNFM side." + }, + "400": { + "description": "The VNF could not be instantiated on the VNFM side. Failure has been treated according to deleteUponFailure parameter" } } - } - }, - "/so/{vnfmId}/vnfs/{vnfId}/scale": { - "post": { + }, + "put": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF scale", - "description": "VNF scale request", - "operationId": "vnf_scale", + "summary": "VNF update", + "description": "VNF update", + "operationId": "vnf_update", "consumes": [ "application/json" ], @@ -1221,94 +1160,113 @@ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of the VNF", + "name": "vnfIdInAai", "in": "path" }, { + "in": "body", + "name": "body", + "description": "VNF update parameter", + "required": true, + "schema": { + "$ref": "#/definitions/SoV2VnfUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "The VNF update has finished. Success is indicated in the success field.", + "schema": { + "$ref": "#/definitions/SoV2VnfUpdateResponse" + } + } + } + }, + "delete": { + "tags": [ + "SO VNFM Adaptor V2" + ], + "summary": "VNF delete", + "description": "VNF delete", + "operationId": "vnf_delete", + "consumes": [ + "application/json" + ], + "parameters": [ + { "required": true, "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", + "description": "The identifier of the VNF", + "name": "vnfIdInAai", "in": "path" }, { "in": "body", "name": "body", - "description": "VNF scale request parameters", + "description": "VNF delete parameter", "required": true, "schema": { - "$ref": "#/definitions/SoVnfScaleRequest" + "$ref": "#/definitions/SoV2VnfDeleteRequest" } } ], "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/SoJobHandler" - } + "204": { + "description": "The VNF was successfully deleted." } } } }, - "/so/{vnfmId}/vnfs/{vnfId}/customOperation": { + "/so/v2/vfmodule/{vnfIdInAai}/{vfModuleId}": { "post": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF scale", - "description": "VNF scale request", - "operationId": "vnf_scale", + "summary": "VF module create", + "description": "VF module create", + "operationId": "vf_module_create", "consumes": [ "application/json" ], - "produces": [ - "application/json" - ], "parameters": [ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of VNF in A&AI.", + "name": "vnfIdInAai", "in": "path" }, { "required": true, "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", + "description": "The identifier of the VF module in A&AI", + "name": "vfModuleId", "in": "path" }, { "in": "body", "name": "body", - "description": "VNF scale request parameters", + "description": "VNF creation query parameter", "required": true, "schema": { - "$ref": "#/definitions/SoVnfCustomOperation" + "$ref": "#/definitions/SoV2VfModuleCreateRequest" } } ], "responses": { "201": { - "description": "", - "schema": { - "$ref": "#/definitions/SoJobHandler" - } + "description": "The VF module has been created" } } - } - }, - "/so/{vnfmId}/vnfs/{vnfId}/heal": { - "post": { + }, + "put": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF heal", - "description": "VNF heal", - "operationId": "vnf_heal", + "summary": "VF module update", + "description": "VF module update", + "operationId": "vf_module_update", "consumes": [ "application/json" ], @@ -1319,123 +1277,120 @@ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of VNF in A&AI.", + "name": "vnfIdInAai", "in": "path" }, { "required": true, "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", + "description": "The identifier of the VF module in A&AI", + "name": "vfModuleId", "in": "path" }, { "in": "body", "name": "body", - "description": "VNF heal request parameters", + "description": "VNF creation query parameter", "required": true, "schema": { - "$ref": "#/definitions/SoVnfHealRequest" + "$ref": "#/definitions/SoV2VnfUpdateRequest" } } ], "responses": { "201": { - "description": "", "schema": { - "$ref": "#/definitions/SoJobHandler" + "$ref": "#/definitions/SoV2VnfUpdateResponse" } } } - } - }, - "/so/{vnfmId}/vnfs/{vnfId}/terminate": { - "post": { + }, + "delete": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" ], - "summary": "VNF terminate", - "description": "VNF terminate", - "operationId": "vnf_terminate", + "summary": "VF module delete", + "description": "VF module delete", + "operationId": "vf_module_delete", "consumes": [ "application/json" ], - "produces": [ - "application/json" - ], "parameters": [ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of VNF in A&AI.", + "name": "vnfIdInAai", "in": "path" }, { "required": true, "type": "string", - "description": "The identifier of the VNF in A&AI", - "name": "vnfId", + "description": "The identifier of the VF module in A&AI", + "name": "vfModuleId", "in": "path" }, { "in": "body", "name": "body", - "description": "VNF termination request parameters", + "description": "VNF delete parameter", "required": true, "schema": { - "$ref": "#/definitions/SoVnfTerminationRequest" + "$ref": "#/definitions/SoV2VnfDeleteRequest" } } ], "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/SoJobHandler" - } + "204": { + "description": "The VNF was successfully deleted." } } } }, - "/so/{vnfmId}/jobs/{jobId}": { - "get": { + "/so/v2/vfmodule/{vnfIdInAai}/{vfModuleId}/rollback": { + "put": { "tags": [ - "SO VNFM Adaptor" + "SO VNFM Adaptor V2" + ], + "summary": "VF module update rollback", + "description": "VF module update rollback", + "operationId": "vf_module_update rollback", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" ], - "summary": "Query job status", - "description": "Query the job status", - "operationId": "get_jobstatus", "parameters": [ { "required": true, "type": "string", - "description": "The identifier of the VNFM in A&AI", - "name": "vnfmId", + "description": "The identifier of VNF in A&AI.", + "name": "vnfIdInAai", "in": "path" }, { "required": true, "type": "string", - "description": "The identifier of the job", - "name": "jobId", + "description": "The identifier of the VF module in A&AI", + "name": "vfModuleId", "in": "path" - } - ], - "responses": { - "202": { - "description": "The details of a job", - "schema": { - "$ref": "#/definitions/SoJobDetail" - } }, - "404": { - "description": "The job is unknown to the VNFM. The VNFM does not keep finished jobs for forever.", + { + "in": "body", + "name": "body", + "description": "VNF update rollback parameter", + "required": true, "schema": { - "$ref": "#/definitions/SoJobDetail" + "$ref": "#/definitions/SoV2RollbackVnfUpdate" } } + ], + "responses": { + "204": { + "description": "Operation has been rolled back" + } } } } diff --git a/nokiav2/driver/src/main/resources/upload.html b/nokiav2/driver/src/main/resources/upload.html index ace9d2e4..907b566e 100644 --- a/nokiav2/driver/src/main/resources/upload.html +++ b/nokiav2/driver/src/main/resources/upload.html @@ -6,8 +6,9 @@ Select CBAM package to upload: <input type="file" name="fileToUpload" id="fileToUpload"> ONAP package version: <select name="version"> - <option value="V1">V1</option> - <option value="V2" selected="selected">V2</option> + <option value="V1TOSCA">V1TOSCA</option> + <option value="V2TOSCA" selected="selected">V2TOSCA</option> + <option value="V2HEAT">V2HEAT</option> </select> <input type="submit" value="Upload" name="submit"> </form> |