Loading SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot 0 → 100644 +50 −0 Original line number Diff line number Diff line *** 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 *** Create a VNF Instance [Documentation] Test ID: 5.x.y.x ... Test title: Create a VNF instance procedure ... Test objective: The objective is to test the procedure for the creation of a VNF instance resource. ... Pre-conditions: ... Reference: section 5.3.1 - SOL003 v2.4.1; section ... Config ID: Config_prod_VNFM ... Applicability: ... NFVO is not subscribed for ... Post-Conditions: upon successful completion, the VNF instance resource has been created in "NOT_INSTANTIATED" state. Send VNF create Request Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check Operation Notification For Create VnfIdentifierCreationNotification Check Postcondition VNF CREATE *** Keywords *** Initialize System Create Sessions Check Postcondition VNF [Arguments] ${operation} Check VNF Instance ${vnfInstanceId} Check HTTP Response Status Code Is 200 Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED Check Operation Notification For Create [Arguments] ${element} ${json}= Get File schemas/${element}.schema.json Configure Notification Handler ${notification_ep} No newline at end of file SOL003/VNFLifecycleManagement-API/ScaleVNFTaskWorkflow.robot→SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot +2 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ 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 REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ... spec=SOL003-VNFLifecycleManagement-API.yaml Library OperatingSystem Library BuiltIn Library Collections Loading SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot +4 −7 Original line number Diff line number Diff line Loading @@ -9,9 +9,6 @@ Library Collections Library JSONLibrary Library MockServerLibrary *** Variables *** ${json} {} *** Keywords *** Check subscriptions about one VNFInstance and operation type [Arguments] ${vnfInstanceId} ${notificationType} ${operationType}="" ${operationState}="" Loading @@ -30,8 +27,8 @@ Create Sessions Create Mock Session ${callback_uri}:${callback_port} Configure Notification Handler [Arguments] ${endpoint} ${status} set to dictionary ${json["operationState"]} dp=${status} [Arguments] ${endpoint} ${status}="" Run Keyword If ${status}!="" set to dictionary ${json["operationState"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${element} &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} Loading @@ -40,7 +37,6 @@ Configure Notification Handler Configure Notification Forward [Arguments] ${element} ${endpoint} ${endpoint_fwd} ${json}= Get File schemas/${element}.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock HTTP forward to handle ${element} &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${BODY} Loading @@ -48,7 +44,8 @@ Configure Notification Forward Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} Check Operation Notification [Arguments] ${element} ${status} [Arguments] ${element} ${status}="" ${json}= Get File schemas/${element}.schema.json Configure Notification Forward ${element} ${notification_ep} ${notification_ep_fwd} Configure Notification Handler ${notification_ep_fwd} ${status} Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} Loading SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +8 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,14 @@ Send VNF Scale Out Request ${aspectId}= Set Variable ${json.aspectId} ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} Send VNF Create Request Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File json/createVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} Create a new Grant - Synchronous mode [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants Loading SOL003/VNFLifecycleManagement-API/environment/variables.txt +2 −1 Original line number Diff line number Diff line Loading @@ -17,3 +17,4 @@ ${VnfIdentifierDeletionNotification} {} ${response} {} ${notification_request} [] ${notification_response} [] ${json} {} No newline at end of file Loading
SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot 0 → 100644 +50 −0 Original line number Diff line number Diff line *** 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 *** Create a VNF Instance [Documentation] Test ID: 5.x.y.x ... Test title: Create a VNF instance procedure ... Test objective: The objective is to test the procedure for the creation of a VNF instance resource. ... Pre-conditions: ... Reference: section 5.3.1 - SOL003 v2.4.1; section ... Config ID: Config_prod_VNFM ... Applicability: ... NFVO is not subscribed for ... Post-Conditions: upon successful completion, the VNF instance resource has been created in "NOT_INSTANTIATED" state. Send VNF create Request Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check Operation Notification For Create VnfIdentifierCreationNotification Check Postcondition VNF CREATE *** Keywords *** Initialize System Create Sessions Check Postcondition VNF [Arguments] ${operation} Check VNF Instance ${vnfInstanceId} Check HTTP Response Status Code Is 200 Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED Check Operation Notification For Create [Arguments] ${element} ${json}= Get File schemas/${element}.schema.json Configure Notification Handler ${notification_ep} No newline at end of file
SOL003/VNFLifecycleManagement-API/ScaleVNFTaskWorkflow.robot→SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot +2 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ 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 REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ... spec=SOL003-VNFLifecycleManagement-API.yaml Library OperatingSystem Library BuiltIn Library Collections Loading
SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot +4 −7 Original line number Diff line number Diff line Loading @@ -9,9 +9,6 @@ Library Collections Library JSONLibrary Library MockServerLibrary *** Variables *** ${json} {} *** Keywords *** Check subscriptions about one VNFInstance and operation type [Arguments] ${vnfInstanceId} ${notificationType} ${operationType}="" ${operationState}="" Loading @@ -30,8 +27,8 @@ Create Sessions Create Mock Session ${callback_uri}:${callback_port} Configure Notification Handler [Arguments] ${endpoint} ${status} set to dictionary ${json["operationState"]} dp=${status} [Arguments] ${endpoint} ${status}="" Run Keyword If ${status}!="" set to dictionary ${json["operationState"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${element} &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} Loading @@ -40,7 +37,6 @@ Configure Notification Handler Configure Notification Forward [Arguments] ${element} ${endpoint} ${endpoint_fwd} ${json}= Get File schemas/${element}.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock HTTP forward to handle ${element} &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${BODY} Loading @@ -48,7 +44,8 @@ Configure Notification Forward Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} Check Operation Notification [Arguments] ${element} ${status} [Arguments] ${element} ${status}="" ${json}= Get File schemas/${element}.schema.json Configure Notification Forward ${element} ${notification_ep} ${notification_ep_fwd} Configure Notification Handler ${notification_ep_fwd} ${status} Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} Loading
SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +8 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,14 @@ Send VNF Scale Out Request ${aspectId}= Set Variable ${json.aspectId} ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} Send VNF Create Request Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File json/createVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} Create a new Grant - Synchronous mode [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants Loading
SOL003/VNFLifecycleManagement-API/environment/variables.txt +2 −1 Original line number Diff line number Diff line Loading @@ -17,3 +17,4 @@ ${VnfIdentifierDeletionNotification} {} ${response} {} ${notification_request} [] ${notification_response} [] ${json} {} No newline at end of file