From de4c02e81c464a746bb9aac4921066eebb1481ea Mon Sep 17 00:00:00 2001 From: Abbas Ahmad Date: Mon, 18 Mar 2019 03:41:09 +0100 Subject: [PATCH] Advancement on NS LCM SOL005 --- .../HealNSTask.robot | 39 ++ .../IndividualNSInstance.robot | 38 ++ .../InstantiateNSTask.robot | 37 ++ .../NSInstances.robot | 28 +- .../NSLCMOccurences.robot | 43 ++ .../NSLCMOperationKeywords.robot | 406 +++++++++++++++++- .../ScaleNSTask.robot | 39 ++ .../TerminateNSTask.robot | 39 ++ .../UpdateNSTask.robot | 39 ++ .../environment/variables.txt | 13 +- .../jsons/HealNsRequest.json | 3 + .../jsons/InstantiateNsRequest.json | 73 ++++ .../jsons/ScaleNsRequest.json | 32 ++ .../jsons/TerminateNsRequest.json | 3 + .../jsons/UpdateNsRequest.json | 172 ++++++++ .../jsons/scaleNsToLevelRequest.json | 3 + .../schemas/NsInstance.schema.json | 270 ++++++------ .../schemas/NsInstances.schema.json | 145 +++++++ .../schemas/NsLcmOpOcc.schema.json | 157 +++++++ .../schemas/NsLcmOpOccs.schema.json | 160 +++++++ .../schemas/ProblemDetails.schema.json | 34 ++ 21 files changed, 1624 insertions(+), 149 deletions(-) create mode 100644 SOL005/NSLifecycleManagement-API/HealNSTask.robot create mode 100644 SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot create mode 100644 SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot create mode 100644 SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot create mode 100644 SOL005/NSLifecycleManagement-API/ScaleNSTask.robot create mode 100644 SOL005/NSLifecycleManagement-API/TerminateNSTask.robot create mode 100644 SOL005/NSLifecycleManagement-API/UpdateNSTask.robot create mode 100644 SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsInstances.schema.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOcc.schema.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOccs.schema.json create mode 100644 SOL005/NSLifecycleManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL005/NSLifecycleManagement-API/HealNSTask.robot b/SOL005/NSLifecycleManagement-API/HealNSTask.robot new file mode 100644 index 00000000..7f42a93e --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/HealNSTask.robot @@ -0,0 +1,39 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Heal a NSInstance + Do POST Heal NSInstance + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + +Heal a NSInstance Conflict + [Setup] Check resource not_instantiated + Do POST Heal NSInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header Contains ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +GET Heal NSInstance- Method not implemented + Do GET Heal NSInstance + Check HTTP Response Status Code Is 405 + +PUT Heal NSInstance - Method not implemented + Do PUT Heal NSInstance + Check HTTP Response Status Code Is 405 + +PATCH Heal NSInstance - Method not implemented + Do PATCH Heal NSInstance + Check HTTP Response Status Code Is 405 + +DELETE Heal NSInstance - Method not implemented + Do DELETE Heal NSInstance + Check HTTP Response Status Code Is 405 + + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot new file mode 100644 index 00000000..ec2130a1 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -0,0 +1,38 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Post Individual VNFInstance - Method not implemented + Do POST IndividualNSInstance + Check HTTP Response Status Code Is 405 + +Get Information about an individual NS Instance + Do POST individualNSInstance + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is nsInstance.schema.json + +PUT Individual NSInstance - Method not implemented + Do PUT IndividualNSInstance + Check HTTP Response Status Code Is 405 + +PATCH Individual NSInstance - Method not implemented + Do PATCH IndividualNSInstance + Check HTTP Response Status Code Is 405 + +DELETE Individual NSInstance + Do DELETE IndividualNSInstance + Check HTTP Response Status Code Is 204 + +DELETE Individual NSInstance Conflict + [Setup] Check resource instantiated + Do DELETE IndividualNSInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json diff --git a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot new file mode 100644 index 00000000..d525434e --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot @@ -0,0 +1,37 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Instantiate a nsInstance + Do POST Instatiate nsInstance + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + +Instantiate a nsInstance Conflict + [Setup] Check resource instantiated + Do POST Instatiate nsInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header Contains ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +GET Instantiate NSInstance - Method not implemented + Do GET Instantiate NSInstance + Check HTTP Response Status Code Is 405 + +PUT Instantiate NSInstance - Method not implemented + Do PUT Instantiate NSInstance + Check HTTP Response Status Code Is 405 + +PATCH Instantiate NSInstance - Method not implemented + Do PATCH Instantiate NSInstance + Check HTTP Response Status Code Is 405 + +DELETE Instantiate NSInstance - Method not implemented + Do DELETE Instantiate NSInstance + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSInstances.robot b/SOL005/NSLifecycleManagement-API/NSInstances.robot index 9044e322..8479cb3b 100644 --- a/SOL005/NSLifecycleManagement-API/NSInstances.robot +++ b/SOL005/NSLifecycleManagement-API/NSInstances.robot @@ -8,7 +8,7 @@ Library JSONSchemaLibrary schemas/ *** Test Cases *** Create a new NsInstance - Do POST New vnfInstance + Do POST New nsInstance Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Header ContentType is ${CONTENT_TYPE} @@ -18,6 +18,28 @@ Get information about multiple NS instances Do GET NsInstances Check HTTP Response Status Code Is 200 Check HTTP Response Header ContentType is ${CONTENT_TYPE} - Check HTTP Response Body Json Schema Is vnfInstances.schema.json - Log Validation OK + Check HTTP Response Body Json Schema Is NsInstances.schema.json + +Get information about multiple NS instances Bad Request Invalid attribute-based filtering parameters + Do GET NsInstance Invalid Attribute-Based filtering parameter + Check HTTP Response Status Code Is 400 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +Get information about multiple NS instances Bad Request Invalid attribute selector + Do GET NsInstance Invalid Attribute Selector + Check HTTP Response Status Code Is 400 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +PUT NSInstances - Method not implemented + Do PUT NSInstances + Check HTTP Response Status Code Is 405 + +PATCH NSInstances - Method not implemented + Do PATCH NSInstances + Check HTTP Response Status Code Is 405 +DELETE NSInstances - Method not implemented + Do DELETE NSInstances + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot new file mode 100644 index 00000000..3edcb9ea --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot @@ -0,0 +1,43 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +Post NS LCM occurences - Method not implemented + Do POST NS LCM OP Occurences + Check HTTP Response Status Code Is 405 + +PUT stauts information about multiple NS LCM OP OCC - Method not implemented + Do PUT NS LCM OP Occurences + Check HTTP Response Status Code Is 405 + +PATCH stauts information about multiple NS LCM OP OCC - Method not implemented + Do PATCH NS LCM OP Occurences + Check HTTP Response Status Code Is 405 + +DELETE stauts information about multiple NS LCM OP OCC - Method not implemented + Do DELETE NS LCM OP Occurences + Check HTTP Response Status Code Is 405 + + +Get stauts information about multiple NS LCM OP OCC + Do GET NS LCN OP Occurences + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is NsLcmOpOccs.schema.json + +Get stauts information about multiple NS LCM OP OCC Bad Request Invalid attribute-based filtering parameters + Do GET NS LCN OP Occurences Invalid attribute-based filtering parameters + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + + +Get stauts information about multiple NS LCM OP OCC Bad Request Invalid attribute selector + Do GET NS LCN OP Occurences Invalid attribute selector + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 1fa1c84d..c540d080 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -5,8 +5,36 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem - *** Keywords *** +Check resource instantiated + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + String response body instantiationState INSTANTIATED + +Check resource not_instantiated + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + String response body instantiationState NOT_INSTANTIATED + +Launch another LCM operation + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleNsToLevelRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale_to_level ${body} + Integer response status 202 + +Check resource existance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Integer response status 200 + Check HTTP Response Status Code Is [Arguments] ${expected_status} Log Validate Status code @@ -23,14 +51,13 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK -Check HTTP Response Header ContentType is +Check HTTP Response Header ContentType is [Arguments] ${expected_contentType} Log Validate content type Should Be Equal ${response[0]['headers']['Content-Type']} ${expected_contentType} Log Content Type validated - -Do POST New vnfInstance +Do POST New nsInstance Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiVersion}/ns_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -40,7 +67,6 @@ Do POST New vnfInstance ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} - Do GET NsInstances Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} @@ -50,4 +76,372 @@ Do GET NsInstances ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} - \ No newline at end of file + +Do GET NsInstance Invalid Attribute-Based filtering parameter + Log Query NS The GET method queries information about multiple NS instances. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET NsInstance Invalid Attribute Selector + Log Query NS The GET method queries information about multiple NS instances. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT NSInstances + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH NSInstances + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE NSInstances + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DO POST IndividualNSInstance + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET IndividualNSInstance + Log Trying to get information about an individual NS instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + ${Etag}= Output response headers Etag + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DO PUT IndividualNSInstance + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DO PATCH IndividualNSInstance + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE IndividualNSInstance + log Trying to delete an individual VNF instance + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE Instantiate NSInstance + log Trying to delete an instantiate NS instance. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do PATCH Instantiate NSInstance + log Trying to patch an instantiate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Instantiate NSInstance + log Trying to put an instantiate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Instantiate NSInstance + log Trying to get an instantiate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do POST Instatiate nsInstance + Log Trying to Instantiate a ns Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/InstantiateNsRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + +Do DELETE Scale NSInstance + log Trying to delete an Scale NS instance. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do PATCH Scale NSInstance + log Trying to patch an Scale NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Scale NSInstance + log Trying to put an Scale NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Scale NSInstance + log Trying to get an Scale NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST scale nsInstance + Log Trying to Instantiate a scale NS Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/ScaleNsRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + +Do DELETE Update NSInstance + log Trying to delete an Update NS instance. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do PATCH Update NSInstance + log Trying to patch an Update NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Update NSInstance + log Trying to put an Update NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Update NSInstance + log Trying to get an Update NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST Update NSInstance + Log Trying to Instantiate a Update NS Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/UpdateNsRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE Heal NSInstance + log Trying to Delete an Heal NS instance. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do PATCH Heal NSInstance + log Trying to patch an Heal NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Heal NSInstance + log Trying to put an Heal NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Heal NSInstance + log Trying to get an Heal NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST Heal NSInstance + Log Trying to Instantiate a Heal NS Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/HealNsRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE Terminate NSInstance + log Trying to Delete an Terminate NS instance. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH Terminate NSInstance + log Trying to patch an Terminate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Terminate NSInstance + log Trying to put an Terminate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Terminate NSInstance + log Trying to Get an Terminate NS instance. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST Terminate NSInstance + Log Trying to Instantiate a Terminate NS Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/TerminateNsRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST NS LCM OP Occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT NS LCM OP Occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH NS LCM OP Occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE NS LCM OP Occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET NS LCN OP Occurences + Log Query status information about multiple NS lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + Do GET NS LCN OP Occurences Invalid attribute-based filtering parameters + Log Query status information about multiple NS lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET NS LCN OP Occurences Invalid attribute selector + Log Query NS The GET method queries information about multiple NS instances. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot new file mode 100644 index 00000000..405bc1f9 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot @@ -0,0 +1,39 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Scale a nsInstance + Do POST scale nsInstance + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + +Instantiate a nsInstance Conflict + [Setup] Check resource not_instantiated + Do POST scale nsInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header Contains ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +GET Scale NSInstance- Method not implemented + Do GET scale NSInstance + Check HTTP Response Status Code Is 405 + +PUT Scale NSInstance - Method not implemented + Do PUT scale NSInstance + Check HTTP Response Status Code Is 405 + +PATCH Scale NSInstance - Method not implemented + Do PATCH scale NSInstance + Check HTTP Response Status Code Is 405 + +DELETE Scale NSInstance - Method not implemented + Do DELETE scale NSInstance + Check HTTP Response Status Code Is 405 + + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot new file mode 100644 index 00000000..8a9bf7f6 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot @@ -0,0 +1,39 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Terminate a NSInstance + Do POST Terminate NSInstance + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + +Terminate a NSInstance Conflict + [Setup] Check resource not_instantiated + Do POST Terminate NSInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header Contains ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +GET Terminate NSInstance- Method not implemented + Do GET Terminate NSInstance + Check HTTP Response Status Code Is 405 + +PUT Terminate NSInstance - Method not implemented + Do PUT Terminate NSInstance + Check HTTP Response Status Code Is 405 + +PATCH Terminate NSInstance - Method not implemented + Do PATCH Terminate NSInstance + Check HTTP Response Status Code Is 405 + +DELETE Terminate NSInstance - Method not implemented + Do DELETE Terminate NSInstance + Check HTTP Response Status Code Is 405 + + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot new file mode 100644 index 00000000..afe4f7b6 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -0,0 +1,39 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existance + +*** Test Cases *** +Update a NSInstance + Do POST Update NSInstance + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + +Update a NSInstance Conflict + [Setup] Check resource not_instantiated + Do POST Update NSInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Header Contains ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +GET Update NSInstance- Method not implemented + Do GET Update NSInstance + Check HTTP Response Status Code Is 405 + +PUT Update NSInstance - Method not implemented + Do PUT Update NSInstance + Check HTTP Response Status Code Is 405 + +PATCH Update NSInstance - Method not implemented + Do PATCH Update NSInstance + Check HTTP Response Status Code Is 405 + +DELETE Update NSInstance - Method not implemented + Do DELETE Update NSInstance + Check HTTP Response Status Code Is 405 + + \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 5d37e4f2..885d99c9 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -15,14 +15,14 @@ ${apiName} nslcm ${apiVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX -${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfInstanceName} Test-VnfInstance -${vnfInstanceDescription} description vnf -${vnfInstanceDescription_Update} Updated description vnf +${nsInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${nsInstanceName} Test-nsInstance +${nsInstanceDescription} description ns +${nsInstanceDescription_Update} Updated description ns ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip -${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c +${nsPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c ${ARTIFACT_TYPE} application/octet-stream ${ARTIFACT_ID} artifactId ${WRONG_ACCEPT} application/json @@ -43,3 +43,6 @@ ${callback_endpoint_error} /endpoint_404 ${sleep_interval} 20s ${response} {} + +${Etag}= an etag +${Etag_modified}= a modified etag diff --git a/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json new file mode 100644 index 00000000..fccf6153 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json @@ -0,0 +1,3 @@ +{ + "degreeHealing": "HEAL_RESTORE" +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json new file mode 100644 index 00000000..9ff470c1 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json @@ -0,0 +1,73 @@ +{ + "type": "object", + "required": [ + "nsFlavourId" + ], + "properties": { + "nsFlavourId": { + "description": "Identifier of the NS deployment flavor to be instantiated.\n", + "$ref": "SOL005_def.yaml#/definitions/IdentifierInNsd" + }, + "sapData": { + "description": "Create data concerning the SAPs of this NS.\n", + "type": "array", + "items": { + "$ref": "#/definitions/SapData" + } + }, + "addpnfData": { + "description": "Information on the PNF(s) that are part of this NS.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AddPnfData" + } + }, + "vnfInstanceData": { + "description": "Specify an existing VNF instance to be used in the NS. If needed, the VNF Profile to be used for this VNF instance is also provided.\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnfInstanceData" + } + }, + "nestedNsInstanceId": { + "description": "Specify an existing NS instance to be used as a nested NS within the NS.\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "localizationLanguage": { + "description": "Defines the location constraints for the VNF to be instantiated as part of the NS instantiation. An example can be a constraint for the VNF to be in a specific geographic location..\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnfLocationConstraint" + } + }, + "additionalParamsForNs": { + "description": "Allows the OSS/BSS to provide additional parameter(s) at the NS level (as opposed to the VNF level, which is covered in additionalParamsForVnf)..\n", + "$ref": "SOL005_def.yaml#/definitions/KeyValuePairs" + }, + "additionalParamsForVnf": { + "description": "Allows the OSS/BSS to provide additional parameter(s) per VNF instance (as opposed to the NS level, which is covered in additionalParamsForNs). This is for VNFs that are to be created by the NFVO as part of the NS instantiation and not for existing VNF that are referenced for reuse..\n", + "type": "array", + "items": { + "$ref": "#/definitions/ParamsForVnf" + } + }, + "startTime": { + "description": "Timestamp indicating the earliest time to instantiate the NS. Cardinality \"0\" indicates the NS instantiation takes place immediately.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "nsInstantiationLevelId": { + "description": "Identifies one of the NS instantiation levels declared in the DF applicable to this NS instance. If not present, the default NS instantiation level as declared in the NSD shall be used.\n", + "$ref": "SOL005_def.yaml#/definitions/IdentifierInNsd" + }, + "additionalAffinityOrAntiAffiniityRule": { + "description": "Specifies additional affinity or anti-affinity constraint for the VNF instances to be instantiated as part of the NS instantiation. Shall not conflict with rules already specified in the NSD.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffinityOrAntiAffinityRule" + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json new file mode 100644 index 00000000..a4813a95 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json @@ -0,0 +1,32 @@ +{ + "description": "This type represents a request for the scale NS operation.\n", + "type": "object", + "required": [ + "scaleType" + ], + "properties": { + "scaleType": { + "description": "Indicates the type of scaling to be performed. Possible values: - SCALE_NS - SCALE_VNF\n", + "type": "string", + "enum": [ + "SCALE_NS", + "SCALE_VNF" + ] + }, + "scaleNsData": { + "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_NS.\n", + "$ref": "#/definitions/ScaleNsData" + }, + "scaleVnfData": { + "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_VNF.\n", + "type": "array", + "items": { + "$ref": "#/definitions/ScaleVnfData" + } + }, + "scaleTime": { + "description": "Timestamp indicating the scale time of the NS, i.e. the NS will be scaled at this timestamp. Cardinality \"0\" indicates the NS scaling takes place immediately\".\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json new file mode 100644 index 00000000..55821dd8 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json @@ -0,0 +1,3 @@ +{ + "terminationTime": "2021-04-12T23:20:50.52Z" +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json new file mode 100644 index 00000000..705612bf --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json @@ -0,0 +1,172 @@ +{ + "description": "This operation supports the update of a NS instance, It shall comply with the provisions defined in Table 6.5.2.12-1.\n", + "type": "object", + "required": [ + "updateType" + ], + "properties": { + "updateType": { + "description": "The type of update. It determines also which one of the following parameters is present in the operation. Possible values include: * ADD_VNF: Adding existing VNF instance(s) * REMOVE_VNF: Removing VNF instance(s) * INSTANTIATE_VNF: Instantiating new VNF(s) * CHANGE_VNF_DF: Changing VNF DF * OPERATE_VNF: Changing VNF state, * MODIFY_VNF_INFORMATION: Modifying VNF information and/or the configurable properties of VNF instance(s) * CHANGE_EXTERNAL_VNF_CONNECTIVITY: Changing the external connectivity of VNF instance(s)ADD_SAP: Adding SAP(s) * REMOVE_SAP: Removing SAP(s) * ADD_NESTED_NS: Adding existing NS instance(s) as nested NS(s) * REMOVE_NESTED_NS: Removing existing nested NS instance(s) * ASSOC_NEW_NSD_VERSION: Associating a new NSD version to the NS instance * MOVE_VNF: Moving VNF instance(s) from one origin NS instance to another target NS instance * ADD_VNFFG: Adding VNFFG(s) * REMOVE_VNFFG: Removing VNFFG(s) * UPDATE_VNFFG: Updating VNFFG(s) * CHANGE_NS_DF: Changing NS DF * ADD_PNF: Adding PNF * MODIFY_PNF: Modifying PNF * REMOVE_PNF: Removing PNF\n", + "type": "string", + "enum": [ + "ADD_VNF", + "REMOVE_VNF", + "INSTANTIATE_VNF", + "CHANGE_VNF_DF", + "OPERATE_VNF", + "MODIFY_VNF_INFORMATION", + "CHANGE_EXTERNAL_VNF_CONNECTIVITY", + "REMOVE_SAP", + "ADD_NESTED_NS", + "REMOVE_NESTED_NS", + "ASSOC_NEW_NSD_VERSION", + "MOVE_VNF", + "ADD_VNFFG", + "REMOVE_VNFFG", + "UPDATE_VNFFG", + "CHANGE_NS_DF", + "ADD_PNF", + "MODIFY_PNF", + "REMOVE_PNF" + ] + }, + "addVnfIstance": { + "description": "Identifies an existing VNF instance to be added to the NS instance. It shall be present only if updateType = \"ADD_VNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnfInstanceData" + } + }, + "removeVnfInstanceId": { + "description": "Identifies an existing VNF instance to be removed from the NS instance. It contains the identifier(s) of the VNF instances to be removed. It shall be present only if updateType = \"REMOVE_VNF.\" Note: If a VNF instance is removed from a NS and this NS was the last one for which this VNF instance was a part, the VNF instance is terminated by the NFVO.\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "instantiateVnfData": { + "description": "Identifies the new VNF to be instantiated. It can be used e.g. for the bottom-up NS creation. It shall be present only if updateType = \"INSTANTIATE_VNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/InstantiateVnfData" + } + }, + "changeVnfFlavourData": { + "description": "Identifies the new DF of the VNF instance to be changed to. It shall be present only if updateType = \"CHANGE_VNF_DF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/ChangeVnfFlavourData" + } + }, + "operateVnfData": { + "description": "Identifies the state of the VNF instance to be changed. It shall be present only if updateType = \"OPERATE_VNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/OperateVnfData" + } + }, + "modifyVnfInfoData": { + "description": "Identifies the VNF information parameters and/or the configurable properties of VNF instance to be modified. It shall be present only if updateType = \"MODIFY_VNF_INFORMATION\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/ModifyVnfInfoData" + } + }, + "changeExtVnfConnectivityData": { + "description": "Specifies the new external connectivity data of the VNF instance to be changed. It shall be present only if updateType = \"CHANGE_EXTERNAL_VNF_CONNECTIVITY\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/ChangeExtVnfConnectivityData" + } + }, + "addSap": { + "description": "Identifies a new SAP to be added to the NS instance. It shall be present only if updateType = \"ADD_SAP.\"\n", + "type": "array", + "items": { + "$ref": "#/definitions/SapData" + } + }, + "removeSapId": { + "description": "The identifier an existing SAP to be removed from the NS instance. It shall be present only if updateType = \"REMOVE_SAP.\"\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "addNestedNsId": { + "description": "The identifier of an existing nested NS instance to be added to (nested within) the NS instance. It shall be present only if updateType = \"ADD_NESTED_NS\".\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "removeNestedNsId": { + "description": "The identifier of an existing nested NS instance to be removed from the NS instance. It shall be present only if updateType = \"REMOVE_NESTED_NS\".\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/IdentifierInNs" + } + }, + "assocNewNsdVersionData": { + "description": "Specify the new NSD to be used for the NS instance. It shall be present only if updateType = ASSOC_NEW_NSD_VERSION\".\n", + "$ref": "#/definitions/AssocNewNsdVersionData" + }, + "moveVnfInstanceData": { + "description": "Specify existing VNF instance to be moved from one NS instance to another NS instance. It shall be present only if updateType = MOVE_VNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/MoveVnfInstanceData" + } + }, + "addVnffg": { + "description": "Specify the new VNFFG to be created to the NS Instance. It shall be present only if updateType = \"ADD_VNFFG\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/AddVnffgData" + } + }, + "removeVnffgId": { + "description": "Identifier of an existing VNFFG to be removed from the NS Instance. It shall be present only if updateType = \"REMOVE_VNFFG\".\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "updateVnffg": { + "description": "Specify the new VNFFG Information data to be updated for a VNFFG of the NS Instance. It shall be present only if updateType = \"UPDATE_VNFFG\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/UpdateVnffgData" + } + }, + "changeNsFlavourData": { + "description": "Specifies the new DF to be applied to the NS instance. It shall be present only if updateType = \"CHANGE_NS_DF\".\n", + "$ref": "#/definitions/ChangeNsFlavourData" + }, + "addPnfData": { + "description": "specifies the PNF to be added into the NS instance. It shall be present only if updateType = \"ADD_PNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/AddPnfData" + } + }, + "modifyPnfData": { + "description": "Specifies the PNF to be modified in the NS instance. It shall be present only if updateType = \"MODIFY_PNF\".\n", + "type": "array", + "items": { + "$ref": "#/definitions/ModifyPnfData" + } + }, + "removePnfId": { + "description": "Identifier of the PNF to be deleted from the NS instance. It shall be present only if updateType = \"REMOVE_PNF\".\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "updateTime": { + "description": "Timestamp indicating the update time of the NS, i.e. the NS will be updated at this timestamp. Cardinality \"0\" indicates the NS update takes place immediately.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json new file mode 100644 index 00000000..240f405c --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json @@ -0,0 +1,3 @@ +{ + "instantiationLevelId": "myNextLevel" +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsInstance.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsInstance.schema.json index 68aa8632..56b7566f 100644 --- a/SOL005/NSLifecycleManagement-API/schemas/NsInstance.schema.json +++ b/SOL005/NSLifecycleManagement-API/schemas/NsInstance.schema.json @@ -1,144 +1,144 @@ { - "NsInstance": { - "description": "This type represents a response for Query NS operation. It shall comply with the provisions defined in Table 6.5.2.10-1.\n", - "type": "object", - "required": [ - "id", - "nsInstanceName", - "nsInstanceDescription", - "nsdId", - "nsdInfoId", - "nsState" - ], - "properties": { - "id": { - "description": "Identifier of the NS instance.\n", - "$ref": "SOL005_def.yaml#/definitions/Identifier" - }, - "nsInstanceName": { - "description": "Human readable name of the NS instance.\n", - "type": "string" - }, - "nsInstanceDescription": { - "description": "Human readable description of the NS instance.\n", - "type": "string" - }, - "nsdId": { - "description": "Identifier of the NSD on which the NS instance is based.\n", - "$ref": "SOL005_def.yaml#/definitions/Identifier" - }, - "nsdInfoId": { - "description": "Identifier of the NSD information object on which the NS instance is based. This identifier was allocated by the NFVO.\n", + + "description": "This type represents a response for Query NS operation. It shall comply with the provisions defined in Table 6.5.2.10-1.\n", + "type": "object", + "required": [ + "id", + "nsInstanceName", + "nsInstanceDescription", + "nsdId", + "nsdInfoId", + "nsState" + ], + "properties": { + "id": { + "description": "Identifier of the NS instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsInstanceName": { + "description": "Human readable name of the NS instance.\n", + "type": "string" + }, + "nsInstanceDescription": { + "description": "Human readable description of the NS instance.\n", + "type": "string" + }, + "nsdId": { + "description": "Identifier of the NSD on which the NS instance is based.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsdInfoId": { + "description": "Identifier of the NSD information object on which the NS instance is based. This identifier was allocated by the NFVO.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "flavourId": { + "description": "Identifier of the NS deployment flavor applied to the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", + "$ref": "SOL005_def.yaml#/definitions/IdentifierInNsd" + }, + "vnfInstance": { + "description": "Information on constituent VNF(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnfInstance" + } + }, + "pnfInfo": { + "description": "Information on the PNF(s) that are part of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/PnfInfo" + } + }, + "virtualLinkInfo": { + "description": "Information on the VL(s) of the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED and if the NS instance has specified connectivity.\n", + "type": "array", + "items": { + "$ref": "#/definitions/NsVirtualLinkInfo" + } + }, + "vnffgInfo": { + "description": "Information on the VNFFG(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnffgInfo" + } + }, + "sapInfo": { + "description": "Information on the SAP(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/SapInfo" + } + }, + "nestedNsInstanceId": { + "description": "Identifier of the nested NS(s) of the NS instance.\n", + "type": "array", + "items": { "$ref": "SOL005_def.yaml#/definitions/Identifier" - }, - "flavourId": { - "description": "Identifier of the NS deployment flavor applied to the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", - "$ref": "SOL005_def.yaml#/definitions/IdentifierInNsd" - }, - "vnfInstance": { - "description": "Information on constituent VNF(s) of the NS instance.\n", - "type": "array", - "items": { - "$ref": "#/definitions/VnfInstance" - } - }, - "pnfInfo": { - "description": "Information on the PNF(s) that are part of the NS instance.\n", - "type": "array", - "items": { - "$ref": "#/definitions/PnfInfo" - } - }, - "virtualLinkInfo": { - "description": "Information on the VL(s) of the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED and if the NS instance has specified connectivity.\n", - "type": "array", - "items": { - "$ref": "#/definitions/NsVirtualLinkInfo" - } - }, - "vnffgInfo": { - "description": "Information on the VNFFG(s) of the NS instance.\n", - "type": "array", - "items": { - "$ref": "#/definitions/VnffgInfo" - } - }, - "sapInfo": { - "description": "Information on the SAP(s) of the NS instance.\n", - "type": "array", - "items": { - "$ref": "#/definitions/SapInfo" - } - }, - "nestedNsInstanceId": { - "description": "Identifier of the nested NS(s) of the NS instance.\n", - "type": "array", - "items": { - "$ref": "SOL005_def.yaml#/definitions/Identifier" - } - }, - "nsState": { - "description": "The state of the NS instance. Permitted values: NOT_INSTANTIATED: The NS instance is terminated or not instantiated. INSTANTIATED: The NS instance is instantiated.\n", - "type": "string", - "enum": [ - "NOT_INSTANTIATED", - "INSTANTIATED" - ] - }, - "nsScaleStatus": { - "description": "Status of each NS scaling aspect declared in the applicable DF, how \"big\" the NS instance has been scaled w.r.t. that aspect. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", - "type": "array", - "items": { - "$ref": "#/definitions/NsScaleInfo" - } - }, - "additionalAffinityOrAntiAffinityRule": { - "description": "Information on the additional affinity or anti-affinity rule from NS instantiation operation. Shall not conflict with rules already specified in the NSD.\n", - "type": "array", - "items": { - "$ref": "#/definitions/AffinityOrAntiAffinityRule" - } - }, - "_links": { - "type": "object", - "description": "Links to resources related to this resource.", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "URI of this resource.\n", - "$ref": "SOL005_def.yaml#/definitions/Link" - }, - "nestedNsInstances": { - "description": "Links to resources related to this notification.\n", - "type": "array", - "items": { - "$ref": "SOL005_def.yaml#/definitions/Link" - } - }, - "instantiate": { - "description": "Link to the \"instantiate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance in NOT_INSTANTIATED state).\n", - "$ref": "SOL005_def.yaml#/definitions/Link" - }, - "terminate": { - "description": "Link to the \"terminate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", - "$ref": "SOL005_def.yaml#/definitions/Link" - }, - "update": { - "description": "Link to the \"update\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", - "$ref": "SOL005_def.yaml#/definitions/Link" - }, - "scale": { - "description": "Link to the \"scale\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", - "$ref": "SOL005_def.yaml#/definitions/Link" - }, - "heal": { - "description": "Link to the \"heal\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + } + }, + "nsState": { + "description": "The state of the NS instance. Permitted values: NOT_INSTANTIATED: The NS instance is terminated or not instantiated. INSTANTIATED: The NS instance is instantiated.\n", + "type": "string", + "enum": [ + "NOT_INSTANTIATED", + "INSTANTIATED" + ] + }, + "nsScaleStatus": { + "description": "Status of each NS scaling aspect declared in the applicable DF, how \"big\" the NS instance has been scaled w.r.t. that aspect. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", + "type": "array", + "items": { + "$ref": "#/definitions/NsScaleInfo" + } + }, + "additionalAffinityOrAntiAffinityRule": { + "description": "Information on the additional affinity or anti-affinity rule from NS instantiation operation. Shall not conflict with rules already specified in the NSD.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffinityOrAntiAffinityRule" + } + }, + "_links": { + "type": "object", + "description": "Links to resources related to this resource.", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "nestedNsInstances": { + "description": "Links to resources related to this notification.\n", + "type": "array", + "items": { "$ref": "SOL005_def.yaml#/definitions/Link" } + }, + "instantiate": { + "description": "Link to the \"instantiate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance in NOT_INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "terminate": { + "description": "Link to the \"terminate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "update": { + "description": "Link to the \"update\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "scale": { + "description": "Link to the \"scale\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "heal": { + "description": "Link to the \"heal\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" } } } } + } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsInstances.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsInstances.schema.json new file mode 100644 index 00000000..51832b7c --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsInstances.schema.json @@ -0,0 +1,145 @@ +{ + "type:" : "array", + "items": { + "description": "This type represents a response for Query NS operation. It shall comply with the provisions defined in Table 6.5.2.10-1.\n", + "type": "object", + "required": [ + "id", + "nsInstanceName", + "nsInstanceDescription", + "nsdId", + "nsdInfoId", + "nsState" + ], + "properties": { + "id": { + "description": "Identifier of the NS instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsInstanceName": { + "description": "Human readable name of the NS instance.\n", + "type": "string" + }, + "nsInstanceDescription": { + "description": "Human readable description of the NS instance.\n", + "type": "string" + }, + "nsdId": { + "description": "Identifier of the NSD on which the NS instance is based.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "nsdInfoId": { + "description": "Identifier of the NSD information object on which the NS instance is based. This identifier was allocated by the NFVO.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "flavourId": { + "description": "Identifier of the NS deployment flavor applied to the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", + "$ref": "SOL005_def.yaml#/definitions/IdentifierInNsd" + }, + "vnfInstance": { + "description": "Information on constituent VNF(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnfInstance" + } + }, + "pnfInfo": { + "description": "Information on the PNF(s) that are part of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/PnfInfo" + } + }, + "virtualLinkInfo": { + "description": "Information on the VL(s) of the NS instance. This attribute shall be present if the nsState attribute value is INSTANTIATED and if the NS instance has specified connectivity.\n", + "type": "array", + "items": { + "$ref": "#/definitions/NsVirtualLinkInfo" + } + }, + "vnffgInfo": { + "description": "Information on the VNFFG(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/VnffgInfo" + } + }, + "sapInfo": { + "description": "Information on the SAP(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "#/definitions/SapInfo" + } + }, + "nestedNsInstanceId": { + "description": "Identifier of the nested NS(s) of the NS instance.\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "nsState": { + "description": "The state of the NS instance. Permitted values: NOT_INSTANTIATED: The NS instance is terminated or not instantiated. INSTANTIATED: The NS instance is instantiated.\n", + "type": "string", + "enum": [ + "NOT_INSTANTIATED", + "INSTANTIATED" + ] + }, + "nsScaleStatus": { + "description": "Status of each NS scaling aspect declared in the applicable DF, how \"big\" the NS instance has been scaled w.r.t. that aspect. This attribute shall be present if the nsState attribute value is INSTANTIATED.\n", + "type": "array", + "items": { + "$ref": "#/definitions/NsScaleInfo" + } + }, + "additionalAffinityOrAntiAffinityRule": { + "description": "Information on the additional affinity or anti-affinity rule from NS instantiation operation. Shall not conflict with rules already specified in the NSD.\n", + "type": "array", + "items": { + "$ref": "#/definitions/AffinityOrAntiAffinityRule" + } + }, + "_links": { + "type": "object", + "description": "Links to resources related to this resource.", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "nestedNsInstances": { + "description": "Links to resources related to this notification.\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Link" + } + }, + "instantiate": { + "description": "Link to the \"instantiate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance in NOT_INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "terminate": { + "description": "Link to the \"terminate\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "update": { + "description": "Link to the \"update\" task resource, if the related operation is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "scale": { + "description": "Link to the \"scale\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "heal": { + "description": "Link to the \"heal\" task resource, if the related operation is supported for this NS instance, and is possible based on the current status of this NS instance resource (i.e. NS instance is in INSTANTIATED state).\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOcc.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOcc.schema.json new file mode 100644 index 00000000..195db319 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOcc.schema.json @@ -0,0 +1,157 @@ +{ + "description": "This type represents a request a NS lifecycle operation occurrence. It shall comply with the provisions defined in Table 6.5.2.3-1.\n", + "type": "object", + "required": [ + "id", + "operationState", + "stateEnteredTime", + "nsInstanceId", + "lcmOperationType", + "startTime", + "isAutomaticInvocation", + "operationParams", + "isCancelPending", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this NS lifecycle operation occurrence.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "operationState": { + "description": "The state of the NS LCM operation.\n", + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/NsLcmOperationStateType" + }, + "stateEnteredTime": { + "description": "Date-time when the current state was entered.\n", + "type": "string", + "format": "date-time" + }, + "nsInstanceId": { + "description": "Identifier of the NS instance to which the operation applies.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "lcmOperationType": { + "description": "Type of the actual LCM operation represented by this lcm operation occurrence.\n", + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/NsLcmOpType" + }, + "startTime": { + "description": "Date-time of the start of the operation.\n", + "type": "string", + "format": "date-time" + }, + "isAutomaticInvocation": { + "description": "Set to true if this NS LCM operation occurrence has been automatically triggered by the NFVO. This occurs in the case of auto-scaling, auto-healing and when a nested NS is modified as a result of an operation on its composite NS. Set to false otherwise.\n", + "type": "boolean" + }, + "operationParams": { + "description": "Input parameters of the LCM operation. This attribute shall be formatted according to the request data type of the related LCM operation. The following mapping between lcmOperationType and the data type of this attribute shall apply: - INSTANTIATE: InstantiateNsRequest - SCALE: ScaleNsRequest - UPDATE: UpdateNsRequest - HEAL: HealNsRequest - TERMINATE: TerminateNsRequest\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "UPDATE", + "HEAL", + "TERMINATE" + ] + }, + "isCancelPending": { + "description": "If the LCM operation occurrence is in \"PROCESSING\" or \"ROLLING_BACK\" state and the operation is being cancelled, this attribute shall be set to true. Otherwise, it shall be set to false.\n", + "type": "boolean" + }, + "cancelMode": { + "description": "The mode of an ongoing cancellation. Shall be present when isCancelPending=true, and shall be absent otherwise.\n", + "$ref": "#/definitions/CancelModeType" + }, + "error": { + "description": "If \"operationState\" is \"FAILED_TEMP\" or \"FAILED\" or \"operationState\" is \"PROCESSING\" or \"ROLLING_BACK\" and previous value of \"operationState\" was \"FAILED_TEMP\", this attribute shall be present and contain error information, unless it has been requested to be excluded via an attribute selector.\n", + "$ref": "#/definitions/ProblemDetails" + }, + "resourceChanges": { + "description": "This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the LCM operation since its start, if applicable\n", + "type": "object", + "properties": { + "affectedVnfs": { + "description": "Information about the VNF instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVnf" + } + }, + "affectedPnfs": { + "description": "Information about the PNF instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedPnf" + } + }, + "affectedVls": { + "description": "Information about the VL instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVl" + } + }, + "affectedVnffgs": { + "description": "Information about the VNFFG instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVnffg" + } + }, + "affectedNss": { + "description": "Information about the nested NS instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedNs" + } + }, + "affectedSaps": { + "description": "Information about the nested NS instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedSap" + } + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "nsInstance" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "nsInstance": { + "description": "Link to the NS instance that the operation applies to.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "cancel": { + "description": "Link to the task resource that represents the \"cancel\" operation for this LCM operation occurrence, if cancelling is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "retry": { + "description": "Link to the task resource that represents the \"cancel\" operation for this LCM operation occurrence, if cancelling is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "rollback": { + "description": "Link to the task resource that represents the \"rollback\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "continue": { + "description": "Link to the task resource that represents the \"continue\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "fail": { + "description": "Link to the task resource that represents the \"fail\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOccs.schema.json b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOccs.schema.json new file mode 100644 index 00000000..ad3e5afb --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/NsLcmOpOccs.schema.json @@ -0,0 +1,160 @@ +{ + "type": "array", + "items":{ + "description": "This type represents a request a NS lifecycle operation occurrence. It shall comply with the provisions defined in Table 6.5.2.3-1.\n", + "type": "object", + "required": [ + "id", + "operationState", + "stateEnteredTime", + "nsInstanceId", + "lcmOperationType", + "startTime", + "isAutomaticInvocation", + "operationParams", + "isCancelPending", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this NS lifecycle operation occurrence.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "operationState": { + "description": "The state of the NS LCM operation.\n", + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/NsLcmOperationStateType" + }, + "stateEnteredTime": { + "description": "Date-time when the current state was entered.\n", + "type": "string", + "format": "date-time" + }, + "nsInstanceId": { + "description": "Identifier of the NS instance to which the operation applies.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "lcmOperationType": { + "description": "Type of the actual LCM operation represented by this lcm operation occurrence.\n", + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/NsLcmOpType" + }, + "startTime": { + "description": "Date-time of the start of the operation.\n", + "type": "string", + "format": "date-time" + }, + "isAutomaticInvocation": { + "description": "Set to true if this NS LCM operation occurrence has been automatically triggered by the NFVO. This occurs in the case of auto-scaling, auto-healing and when a nested NS is modified as a result of an operation on its composite NS. Set to false otherwise.\n", + "type": "boolean" + }, + "operationParams": { + "description": "Input parameters of the LCM operation. This attribute shall be formatted according to the request data type of the related LCM operation. The following mapping between lcmOperationType and the data type of this attribute shall apply: - INSTANTIATE: InstantiateNsRequest - SCALE: ScaleNsRequest - UPDATE: UpdateNsRequest - HEAL: HealNsRequest - TERMINATE: TerminateNsRequest\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "UPDATE", + "HEAL", + "TERMINATE" + ] + }, + "isCancelPending": { + "description": "If the LCM operation occurrence is in \"PROCESSING\" or \"ROLLING_BACK\" state and the operation is being cancelled, this attribute shall be set to true. Otherwise, it shall be set to false.\n", + "type": "boolean" + }, + "cancelMode": { + "description": "The mode of an ongoing cancellation. Shall be present when isCancelPending=true, and shall be absent otherwise.\n", + "$ref": "#/definitions/CancelModeType" + }, + "error": { + "description": "If \"operationState\" is \"FAILED_TEMP\" or \"FAILED\" or \"operationState\" is \"PROCESSING\" or \"ROLLING_BACK\" and previous value of \"operationState\" was \"FAILED_TEMP\", this attribute shall be present and contain error information, unless it has been requested to be excluded via an attribute selector.\n", + "$ref": "#/definitions/ProblemDetails" + }, + "resourceChanges": { + "description": "This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the LCM operation since its start, if applicable\n", + "type": "object", + "properties": { + "affectedVnfs": { + "description": "Information about the VNF instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVnf" + } + }, + "affectedPnfs": { + "description": "Information about the PNF instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedPnf" + } + }, + "affectedVls": { + "description": "Information about the VL instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVl" + } + }, + "affectedVnffgs": { + "description": "Information about the VNFFG instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedVnffg" + } + }, + "affectedNss": { + "description": "Information about the nested NS instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedNs" + } + }, + "affectedSaps": { + "description": "Information about the nested NS instances that were affected during the lifecycle operation, if this notification represents the result of a lifecycle operation. See note.\n", + "type": "array", + "items": { + "$ref": "SOL005NSLifecycleManagement_def.yaml#/definitions/AffectedSap" + } + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "nsInstance" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "nsInstance": { + "description": "Link to the NS instance that the operation applies to.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "cancel": { + "description": "Link to the task resource that represents the \"cancel\" operation for this LCM operation occurrence, if cancelling is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "retry": { + "description": "Link to the task resource that represents the \"cancel\" operation for this LCM operation occurrence, if cancelling is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "rollback": { + "description": "Link to the task resource that represents the \"rollback\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "continue": { + "description": "Link to the task resource that represents the \"continue\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "fail": { + "description": "Link to the task resource that represents the \"fail\" operation for this LCM operation occurrence, if rolling back is currently allowed.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/schemas/ProblemDetails.schema.json b/SOL005/NSLifecycleManagement-API/schemas/ProblemDetails.schema.json new file mode 100644 index 00000000..cb8cecc4 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/schemas/ProblemDetails.schema.json @@ -0,0 +1,34 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "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", + "properties": { + "type": { + "type": "string", + "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", + "format": "URI" + }, + "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", + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "format": "URI" + } + }, + "required": [ + "status", + "detail" + ] +} \ No newline at end of file -- GitLab