diff options
Diffstat (limited to 'nokiav2/driver/src/main/resources/self.swagger.json')
-rw-r--r-- | nokiav2/driver/src/main/resources/self.swagger.json | 707 |
1 files changed, 673 insertions, 34 deletions
diff --git a/nokiav2/driver/src/main/resources/self.swagger.json b/nokiav2/driver/src/main/resources/self.swagger.json index f8d24a0b..64041502 100644 --- a/nokiav2/driver/src/main/resources/self.swagger.json +++ b/nokiav2/driver/src/main/resources/self.swagger.json @@ -18,9 +18,293 @@ }, "description": "ONAP Nokia CBAM Driver API.", "title": "ONAP Nokia CBAM Driver API", - "version": "1.0.0" + "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": { @@ -294,35 +578,35 @@ ], "type": "string" }, - "extVirtualLinkInfo":{ - "type": "object", - "properties": { - "resourceSubnetId": { - "type": "string", - "description": "The provider id of the subnet" - }, - "vlInstanceId": { - "type": "string", - "description" : "The identifier of the virtual link" - }, - "resourceId": { - "type": "string", - "description": "The provider id of the network" - }, - "cpdId": { - "type": "string", - "description": "The identifier of the connection point descriptor" - }, - "vim": { - "type": "object", - "properties": { - "vimid": { - "type": "string", - "description": "The identifier of the VIM" - } + "extVirtualLinkInfo": { + "type": "object", + "properties": { + "resourceSubnetId": { + "type": "string", + "description": "The provider id of the subnet" + }, + "vlInstanceId": { + "type": "string", + "description": "The identifier of the virtual link" + }, + "resourceId": { + "type": "string", + "description": "The provider id of the network" + }, + "cpdId": { + "type": "string", + "description": "The identifier of the connection point descriptor" + }, + "vim": { + "type": "object", + "properties": { + "vimid": { + "type": "string", + "description": "The identifier of the VIM" } } } + } }, "jobResponseInfo": { "properties": { @@ -693,7 +977,7 @@ } } }, - "/lcn":{ + "/lcn": { "get": { "tags": [ "SBI" @@ -752,13 +1036,13 @@ "tags": [ "Utilities" ], - "consumes":[ + "consumes": [ "multipart/form-data" ], - "produces":[ + "produces": [ "application/octet-stream" ], - "parameters" : [ + "parameters": [ { "description": "The CBAM VNF package", "in": "formData", @@ -771,7 +1055,7 @@ "responses": { "200": { "description": "The converted package", - "schema":{ + "schema": { "type": "file" } } @@ -781,7 +1065,7 @@ "tags": [ "Utilities" ], - "produces":[ + "produces": [ "text/html" ], "summary": "UI to convert the Nokia CBAM package to ONAP package", @@ -792,7 +1076,362 @@ } } } - + }, + "/so/{vnfmId}/vnfs": { + "post": { + "tags": [ + "SO VNFM Adaptor" + ], + "summary": "VNF create", + "description": "VNF create", + "operationId": "vnf_create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "required": true, + "type": "string", + "description": "The identifier of the VNFM in A&AI", + "name": "vnfmId", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "VNF creation request parameter", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfCreationRequest" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoVnfCreationResponse" + } + } + } + } + }, + "/so/{vnfmId}/vnfs/{vnfId}": { + "post": { + "tags": [ + "SO VNFM Adaptor" + ], + "summary": "VNF activation", + "description": "VNF activation", + "operationId": "vnf_activate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "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", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "instantiate request param", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfActivationRequest" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoJobHandler" + } + } + } + }, + "delete": { + "tags": [ + "SO VNFM driver" + ], + "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", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "The identifier of the VNF in A&AI", + "name": "vnfId", + "in": "path" + } + ], + "responses": { + "204": { + "description": "The VNF was deleted successfully" + } + } + } + }, + "/so/{vnfmId}/vnfs/{vnfId}/scale": { + "post": { + "tags": [ + "SO VNFM Adaptor" + ], + "summary": "VNF scale", + "description": "VNF scale request", + "operationId": "vnf_scale", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "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", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "VNF scale request parameters", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfScaleRequest" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoJobHandler" + } + } + } + } + }, + "/so/{vnfmId}/vnfs/{vnfId}/customOperation": { + "post": { + "tags": [ + "SO VNFM Adaptor" + ], + "summary": "VNF scale", + "description": "VNF scale request", + "operationId": "vnf_scale", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "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", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "VNF scale request parameters", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfCustomOperation" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoJobHandler" + } + } + } + } + }, + "/so/{vnfmId}/vnfs/{vnfId}/heal": { + "post": { + "tags": [ + "SO VNFM driver" + ], + "summary": "VNF heal", + "description": "VNF heal", + "operationId": "vnf_heal", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "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", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "VNF heal request parameters", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfHealRequest" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoJobHandler" + } + } + } + } + }, + "/so/{vnfmId}/vnfs/{vnfId}/terminate": { + "post": { + "tags": [ + "SO VNFM driver" + ], + "summary": "VNF terminate", + "description": "VNF terminate", + "operationId": "vnf_terminate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "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", + "in": "path" + }, + { + "in": "body", + "name": "body", + "description": "VNF termination request parameters", + "required": true, + "schema": { + "$ref": "#/definitions/SoVnfTerminationRequest" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/SoJobHandler" + } + } + } + } + }, + "/so/{vnfmId}/jobs/{jobId}": { + "get": { + "tags": [ + "SO VNFM driver" + ], + "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", + "in": "path" + }, + { + "required": true, + "type": "string", + "description": "The identifier of the job", + "name": "jobId", + "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.", + "schema": { + "$ref": "#/definitions/SoJobDetail" + } + } + } + } } } } |