Commit 1977524f authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixed issue #156 on v2.7.1

parent a411d463
......@@ -5,6 +5,9 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
NS Instance Creation
......@@ -15,11 +18,13 @@ NS Instance Creation
... Reference: Clause 6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The NS lifecycle management operation occurrence is in NOT_ISTANTIATED state
... Post-Conditions: The NS resource is in NOT_ISTANTIATED state
POST New nsInstance
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is NsInstance
Check Notification Http POST Request Body Json Schema Is NsIdentifierCreationNotification
Check Notification Http POST Request Body notificationType attribute Is NsIdentifierCreationNotification
Check resource not_instantiated
NS Instance Creation with DISABLED Network Service Descriptor
......@@ -27,7 +32,7 @@ NS Instance Creation with DISABLED Network Service Descriptor
... Test title: NS Instance Creation with DISABLED Network Service Descriptor
... Test objective: The objective is to test the workflow for Creating a NS instance with a disabled NSD
... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in disabled operational state.
... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1
... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
......
......@@ -5,6 +5,10 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
NS Instance Deletion
......@@ -16,7 +20,8 @@ NS Instance Deletion
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: NS Instance resource is deleted
Check resource not_instantiated
DELETE IndividualNSInstance
Check HTTP Response Status Code Is 204
Check Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification
Check Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification
Check Postcondition NS instance is deleted
......@@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
......@@ -17,10 +18,10 @@ Heal Flow of NS lifecycle management operations
... Reference: Clause 6.4.7 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: NS Instance still in INSTANTIATED state
Check resource instantiated
... Post-Conditions: The NS Instance is still in INSTANTIATED state
POST Heal NSInstance
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification Status is START
Check Operation Notification Status is RESULT
......
......@@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
......@@ -13,15 +14,14 @@ Instantiate Flow of NS lifecycle management operations
[Documentation] Test ID: 5.3.2.21.1
... Test title: Instantiate Flow of NS lifecycle management operations
... Test objective: The objective is to test the workflow for Instantiate a NS instance
... Pre-conditions: the resource is in NOT_INSTANTIATED state
... Pre-conditions: The resource is in NOT_INSTANTIATED state
... Reference: Clause 6.4.4 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: the resource is in INSTANTIATED state
Check resource existence
Check resource not_instantiated
... Post-Conditions: The resource is in INSTANTIATED state
POST Instantiate nsInstance
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification Status is START
Check Operation Notification Status is RESULT
......
......@@ -89,7 +89,7 @@ Check Operation Notification
Configure Notification Status Handler ${callback_endpoint_fwd} ${status}
${BODY}= evaluate json.dumps(${json}) json
&{notification_request}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON" body=${BODY}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
......@@ -117,33 +117,43 @@ Check resource operationState is
String ${response['body']['operationState']} ${state}
Check resource Instantiated
Wait Until Keyword Succeeds 2 min 10 sec Probe resource Instantiated
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Probe resource Instantiated
Probe resource Instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}
GET ${response['headers']['Location']}
${opocc}= Output response
Should Be Equal as Strings ${opocc['status']} 200
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']}
String response body nsState INSTANTIATED
Check resource not_instantiated
Wait Until Keyword Succeeds 2 min 10 sec Probe resource not_instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${response['body']['id']}
String response body nsState NOT_INSTANTIATED
Probe resource not_instantiated
[Arguments] ${fresh_resource}=0
Check NS resource not_instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log ${fresh_resource}
${instanceId}= Set Variable If ${fresh_resource} == 0 ${nsInstanceId} ${response['body']['id']}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${instanceId}
GET ${response['headers']['Location']}
${opocc}= Output response
Should Be Equal as Strings ${opocc['status']} 200
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']}
String response body nsState NOT_INSTANTIATED
Check operation resource state is FAILED_TEMP
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}
GET ${response['headers']['Location']}
${opocc}= Output response
Should Be Equal as Strings ${opocc['status']} 200
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']}
String response body instantiationState FAILED_TEMP
Check operation resource state is not FAILED_TEMP
......@@ -151,14 +161,20 @@ Check operation resource state is not FAILED_TEMP
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}
GET ${response['headers']['Location']}
${opocc}= Output response
Should Be Equal as Strings ${opocc['status']} 200
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']}
String response body instantiationState not FAILED_TEMP
Check resource is finally failed
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}
GET ${response['headers']['Location']}
${opocc}= Output response
Should Be Equal as Strings ${opocc['status']} 200
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']}
String response body instantiationState FINALLY_FAILED
Launch another LCM operation
......@@ -1392,3 +1408,26 @@ Check NsLcmOpOcc content against NS Descriptor
Match the NsLcmOpOcc Response Attributes with NS Descriptors
Should Be Equal As Strings ${response['body']['affectedNss'][0]['nsdId']} ${NSDescriptor_ID}
Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['affectedSaps'][0]['sapdId']}
Check Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification NS Creation Deletion Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Configure Notification NS Creation Deletion Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
......@@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
......@@ -13,15 +14,14 @@ Scale Flow of NS lifecycle management operations
[Documentation] Test ID: 5.3.2.22.1
... Test title: Instantiate Flow of NS lifecycle management operations
... Test objective: The objective is to test the workflow for Instantiate a NS instance
... Pre-conditions: the resource is in NOT_INSTANTIATED state
... Pre-conditions: The resource is in INSTANTIATED state
... Reference: Clause 6.4.5 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: the resource is in INSTANTIATED state
Check resource existence
Check resource instantiated
... Post-Conditions: The resource is in INSTANTIATED state
POST scale nsInstance
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification Status is START
Check Operation Notification Status is RESULT
......
......@@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
......@@ -17,15 +18,15 @@ Terminate Flow of NS lifecycle management operations
... Reference: Clause 6.4.8 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: the resource is in NOT_INSTANTIATED state
Check resource existence
Check resource instantiated
... Post-Conditions: The NS resource is in NOT_INSTANTIATED state
POST Terminate NSInstance
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification Status is START
Check Operation Notification Status is RESULT
Check resource not_instantiated
Check NS resource not_instantiated
......
......@@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library Process
Suite Setup Initialize System
Suite Teardown Terminate All Processes kill=true
......@@ -13,15 +14,14 @@ Update Flow of NS lifecycle management operations
[Documentation] Test ID: 5.3.2.24.1
... Test title: Update Flow of NS lifecycle management operations
... Test objective: The objective is to test the workflow for Update a NS instance
... Pre-conditions: the resource is in INSTANTIATED state
... Pre-conditions: The resource is in INSTANTIATED state
... Reference: Clause 6.4.6 - ETSI GS NFV-SOL 005 [3] v2.7.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: the resource is in INSTANTIATED state
Check resource existence
Check resource instantiated
... Post-Conditions: The resource is in INSTANTIATED state
POST Update NSInstance
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
Check Operation Notification Status is START
Check Operation Notification Status is RESULT
......
......@@ -36,7 +36,7 @@
5.3.2.18,NS Instance Creation Workflow, CreateNSInstanceWorkflow.robot
5.3.2.19, NS Instance Deletion, DeleteNSInstanceWorkflow.robot
5.3.2.20, Heal Flow of NS lifecycle management operations, HealNSTaskWorkflow.robot
5.3.2.21, Instantiate Flow of NS lifecycle management operations, InstanciateNSTaskWorkflow.robot
5.3.2.21, Instantiate Flow of NS lifecycle management operations, InstantiateNSTaskWorkflow.robot
5.3.2.22, Scale Flow of NS lifecycle management operations, ScaleNSTaskWorkflow.robot
5.3.2.23, Terminate Flow of NS lifecycle management operations, TerminateNSTaskWorkflow.robot
5.3.2.24, Update Flow of NS lifecycle management operations, UpdateNSTaskWorkflow.robot
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment