diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 60bee901162e3c8a61c87c26cc72c2e0024de9bc..4d7c72434e495935718139c9b91b78e8030a8dae 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -15,7 +15,7 @@ Change external VNF connectivity Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File json/changeExtVnfConnectivityRequest .json + ${body}= Get File json/changeExtVnfConnectivityRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} Integer response status 202 Log Status code validated diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot new file mode 100644 index 0000000000000000000000000000000000000000..c340c5ae8bac8a216bd16a119f80e8c71ea7f33c --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot @@ -0,0 +1,60 @@ +*** Settings *** +Resource environment/configuration.txt +Resource environment/variables.txt +Resource environment/scaleVariables.txt +Resource VnfLcmMntOperationKeywords.robot +Resource SubscriptionKeywords.robot +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +... spec=SOL003-VNFLifecycleManagement-API.yaml +Library OperatingSystem +Library BuiltIn +Library Collections +Library JSONLibrary +Library Process +Suite Setup Initialize System +Suite Teardown Terminate All Processes kill=true + + +*** Test Cases *** +Operate a VNF Instance + [Documentation] Test ID: 5.x.y.x + ... Test title: Change the external connectivity of a VNF instance + ... Test objective: The objective is to change the external connectivity of a VNF instance. + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) + ... Reference: section 5.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: NFVO is able to receive notifications from VNFM. Change the external connectivity of a VNF instance is supported for the VNF (as capability in the VNFD) + ... Post-Conditions: VNF instance still in INSTANTIATED state and external connectivity of the VNF is changed + Send Change Ext Connectivity Request + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check Operation Occurrence Id + Check Operation Notification For Operate STARTING + #Create a new Grant - Sync - OPERATE + Check Operation Notification For Change Flavour PROCESSING + Check Operation Notification For Change Flavour COMPLETED + Check Postcondition VNF Change Ext Connectivity + +*** Keywords *** + +Initialize System + Create Sessions + ${body}= Get File json/changeExtVnfConnectivityRequest.json + ${changeVnfExtConnectivityRequest}= evaluate json.loads('''${body}''') json + +Precondition Checks + Check resource instantiated + ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE + +Check Postcondition VNF Change Ext Connectivity + Check resource instantiated + ${extVLId}= Get Vnf Ext Link Id ${vnfInstanceId} + Should be Equal ${changeVnfExtConnectivityRequest["extVirtualLinks"][0]["id"]} ${extVLId} + +Create a new Grant - Sync - OPERATE + Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE + +Check Operation Notification For Operate + [Arguments] ${status} + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} + \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot index 2d74dfe59b26f024d3539efd3ea0900303bc4b55..993809012117ced30be59559e9c0b25a6fa8c01e 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot @@ -16,21 +16,12 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** -<<<<<<< .merge_file_a08480 -Change VNF Flavour Operation - [Documentation] Test ID: 5.x.y.x - ... Test title: Change VNF Flavour Operation - ... Test objective: The objective is to test a change flavour operation of an existing VNF instance - ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) - ... Reference: section 5.3.3 - SOL003 v2.4.1 -======= Change VNF Flavour [Documentation] Test ID: 5.4.7.1 ... Test title: Change VNF Flavour Workflow ... Test objective: The objective is to test the workflow for a change flavour of an existing VNF instance ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.4.4.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1) ... Reference: section 5.4.7 - SOL003 v2.4.1 ->>>>>>> .merge_file_a08764 ... Config ID: Config_prod_VNFM ... Applicability: Multiple flavours are supported for the VNF (as capability in the VNFD). NFVO is able to receive notifications from VNFM ... Post-Conditions: VNF instance still in INSTANTIATED state and the flavour is changed diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot new file mode 100644 index 0000000000000000000000000000000000000000..2a05f4ed3ac96c1af4b802b35f267dcef2101d3e --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot @@ -0,0 +1,56 @@ +*** Settings *** +Resource environment/configuration.txt +Resource environment/variables.txt +Resource environment/scaleVariables.txt +Resource VnfLcmMntOperationKeywords.robot +Resource SubscriptionKeywords.robot +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +... spec=SOL003-VNFLifecycleManagement-API.yaml +Library OperatingSystem +Library BuiltIn +Library Collections +Library JSONLibrary +Library Process +Suite Setup Initialize System +Suite Teardown Terminate All Processes kill=true + + +*** Test Cases *** +Operate a VNF Instance + [Documentation] Test ID: 5.x.y.x + ... Test title: Heal a VNF Instance + ... Test objective: The objective is to heal a VNF instance. + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) + ... Reference: section 5.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: NFVO is able to receive notifications from VNFM. Heal a VNF instance is supported for the VNF (as capability in the VNFD) + ... Post-Conditions: VNF instance still in INSTANTIATED state + Send Heal VNF Request + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check Operation Occurrence Id + Check Operation Notification For Operate STARTING + #Create a new Grant - Sync - OPERATE + Check Operation Notification For Change Flavour PROCESSING + Check Operation Notification For Change Flavour COMPLETED + Check Postcondition VNF Heal + +*** Keywords *** + +Initialize System + Create Sessions + +Precondition Checks + Check resource instantiated + ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE + +Check Postcondition VNF Heal + Check resource Instantiated + +Create a new Grant - Sync - OPERATE + Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE + +Check Operation Notification For Operate + [Arguments] ${status} + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} + \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot index 8721f2067980860b4c84dca5f7e32e1ee70326f2..9f340e2351778ed6260b8b696331112252df8412 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot @@ -30,7 +30,7 @@ Operate a VNF Instance Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification For Operate STARTING - Create a new Grant - Sync - OPERATE + #Create a new Grant - Sync - OPERATE Check Operation Notification For Change Flavour PROCESSING Check Operation Notification For Change Flavour COMPLETED Check Postcondition VNF OPERATE diff --git a/SOL003/VNFLifecycleManagement-API/TerminatelVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/TerminatelVNFWorkflow.robot new file mode 100644 index 0000000000000000000000000000000000000000..b1a07eb0fc8ba2e00180543161a3ad9c831aaae4 --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/TerminatelVNFWorkflow.robot @@ -0,0 +1,56 @@ +*** Settings *** +Resource environment/configuration.txt +Resource environment/variables.txt +Resource environment/scaleVariables.txt +Resource VnfLcmMntOperationKeywords.robot +Resource SubscriptionKeywords.robot +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +... spec=SOL003-VNFLifecycleManagement-API.yaml +Library OperatingSystem +Library BuiltIn +Library Collections +Library JSONLibrary +Library Process +Suite Setup Initialize System +Suite Teardown Terminate All Processes kill=true + + +*** Test Cases *** +Operate a VNF Instance + [Documentation] Test ID: 5.x.y.x + ... Test title: Terminate a VNF Instance + ... Test objective: The objective is to terminate a VNF instance. + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) + ... Reference: section 5.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: NFVO is able to receive notifications from VNFM. + ... Post-Conditions: VNF instance in NOT_INSTANTIATED state + Send Terminate VNF Request + Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location + Check Operation Occurrence Id + Check Operation Notification For Operate STARTING + #Create a new Grant - Sync - OPERATE + Check Operation Notification For Change Flavour PROCESSING + Check Operation Notification For Change Flavour COMPLETED + Check Postcondition VNF Terminate + +*** Keywords *** + +Initialize System + Create Sessions + +Precondition Checks + Check resource instantiated + ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE + +Check Postcondition VNF Terminate + Check resource not Instantiated + +Create a new Grant - Sync - OPERATE + Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE + +Check Operation Notification For Operate + [Arguments] ${status} + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} + \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 2eaac649cebe35e9381110b79ac66392ffeba0cb..735b2435111174465ea1548ac5795647204069ae 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -42,6 +42,11 @@ Check resource Instantiated Check HTTP Response Status Code Is 200 Check VNF Status ${response.body.instantiationState} INSTANTIATED +Check resource not Instantiated + Check VNF Instance ${vnfInstanceId} + Check HTTP Response Status Code Is 200 + Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED + Check VNF Instance [Arguments] ${vnfId} Set Headers {"Accept":"${ACCEPT}"} @@ -72,6 +77,11 @@ Get Vnf Operational State Info ${stateInfo}= Get Value From Json ${vnfInstance} $..vnfState [Return] ${stateInfo} +Get Vnf Ext Link Id + [Arguments] ${vnfInstanceId} + ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} + [Return] ${vnfInstance.instantiatedVnfInfo.extVirtualLinkInfo.id} + Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} Should Contain ${response.headers} ${CONTENT_TYPE} @@ -126,6 +136,30 @@ Send Change VNF Operational State Request Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File json/operateVnFRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + +Send Heal VNF Request + Log Trying to heal a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File json/healVnFRequest.json + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + +Send Change Ext Connectivity Request + Log Trying to change the external connectivity of a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File json/changeExtVnfConnectivityRequest.json + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + +Send Terminate VNF Request + Log Trying to terminate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File json/terminateVnFRequest.json + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} Create a new Grant - Synchronous mode [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation}