Commit e03ac559 authored by Elian Kraja's avatar Elian Kraja
Browse files

Bug fixing: issues #14-#19, #21-#23, #28, #29

parent 9fc274a4
......@@ -18,7 +18,7 @@ Set new VNF Configuration
... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration
Send VNF configuration
Check HTTP Response Status Code Is 200
Check HTTP Response Header Contains Etag
Check HTTP Response Header Contains ETag
Check HTTP Response Body Json Schema Is vnfConfigModifications.schema.json
Check Postcondition VNF Is Configured
......@@ -48,7 +48,7 @@ Get information about a VNF configuration with HTTP Etag
... Post-Conditions: none
Get VNF configuration
Check HTTP Response Status Code Is 200
Check HTTP Response Header Contains Etag
Check HTTP Response Header Contains ETag
Check HTTP Response Body Json Schema Is vnfConfiguration.schema.json
Set new VNF Configuration - HTTP Etag precondition unsuccessful
......@@ -121,6 +121,7 @@ Send VNF configuration
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/vnfConfigModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body}
Set Suite Variable &{etag} ${response[0]['headers']['ETag']}
${output}= Output response
Set Suite Variable @{response} ${output}
......@@ -158,11 +159,11 @@ Check Postcondition VNF Is Configured
Should Be Equal ${response[0]['body']} ${input}
Send Duplicated VNF configuration
Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified
Depends On Test Send VNF configuration # If the previous test scceeded, it means that Etag has been modified
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Set Headers {"If-Match": "${Etag}"}
Set Headers {"If-Match": "${etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/vnfConfigModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body}
......
......@@ -8,6 +8,10 @@ Library JSONSchemaLibrary schemas/
Library DependencyLibrary
*** Variables **
${original_etag} 1234
*** Test Cases ***
POST Alarm - Method not implemented
log Trying to perform a POST. This method should not be implemented
......@@ -17,6 +21,7 @@ POST Alarm - Method not implemented
Log Validate Status code
Integer response status 405
Get information about a configuration
[Documentation] Test ID: 7.4.3.1
... Test title: Get information about an alarm
......@@ -32,15 +37,17 @@ Get information about a configuration
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
${Etag}= Output response headers Etag
Log Validate Status code
Integer response status 200
${etag} Output response header ETag
Set Suite Variable &{original_etag} ${etag}
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
Validate Json alarm.schema.json ${result}
Log Validation OK
PUT Alarm - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......@@ -49,6 +56,7 @@ PUT Alarm - Method not implemented
Log Validate Status code
Integer response status 405
PATCH Alarm
[Documentation] Test ID: 7.4.3.2
... Test title: Modify an individual alarm resource
......@@ -61,11 +69,11 @@ PATCH Alarm
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
Log Validate Status code
${Etag_modified}= Output response headers Etag
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
......@@ -73,47 +81,50 @@ PATCH Alarm
Validate Json alarmModifications.schema.json ${result}
Log Validation OK
PATCH Alarm - Conflict
PATCH Alarm - Precondition failed
[Documentation] Test ID: 7.4.3.2-1
... Test title: Modify an individual alarm resource - Conflict
... Test title: Modify an individual alarm resource - Precondition failed
... Test objective: The objective is to Modify an individual alarm resource
... Pre-conditions: The related alarm exists
... Reference: section 7.4.3 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions: The alarm resource is not modified
Depends On Test PATCH Alarm # If the previous test scceeded, it means that the alarm is in ackownledged state
Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
Log Validate Status code
Integer response status 409
Integer response status 412
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PATCH Alarm - Precondition failed
PATCH Alarm - Conflict
[Documentation] Test ID: 7.4.3.2-1
... Test title: Modify an individual alarm resource - Precondition failed
... Test title: Modify an individual alarm resource - Conflict
... Test objective: The objective is to Modify an individual alarm resource
... Pre-conditions: The related alarm exists
... Reference: section 7.4.3 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions: The alarm resource is not modified
Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified
Depends On Test PATCH Alarm # If the previous test scceeded, it means that the alarm is in ackownledged state
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${Etag}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
Log Validate Status code
Integer response status 412
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
......
......@@ -16,8 +16,8 @@ ${CONTENT_TYPE} application/json
${VNFM_DUPLICATION} 0
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${Etag}= an etag
${Etag_modified}= a modified etag
${etags} a modified etag
${wrong_etag} wrong-tag
${CONTENT_TYPE_PATCH} application/merge-patch+json
${PerceivedSeverity} CRITICAL
......
......@@ -38,23 +38,6 @@ Post Cancel operation task Conflict (Not-FAILED_TEMP)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Post Cancel operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... or another error handling action is starting, such as retry or rollback.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another error handling action
log Final Fail an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Post Cancel operation task Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -21,26 +21,6 @@ Change external VNF connectivity
Should Contain ${headers} Location
Log Validation OK
Change external VNF connectivity Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that another LCM operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to change the deployment flavour 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 jsons/changeExtVnfConnectivityRequest .json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body}
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
GET Change external VNF connectivity - Method not implemented
log Trying to perform a GET. This method should not be implemented
......
......@@ -41,26 +41,6 @@ Change deployment flavour of a vnfInstance Conflict (Not-Instantiated)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Change deployment flavour of a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state,
... or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to change the deployment flavour of a VNF instance.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/changeVnfFlavourRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Change deployment flavour of a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -41,23 +41,6 @@ Post Fail operation task Conflict (Not-FAILED_TEMP)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Post Fail operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... or another error handling action is starting, such as retry or rollback.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another error handling action
log Final Fail an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Post Fail operation task Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -41,26 +41,6 @@ Heal a vnfInstance Conflict (Not-Instantiated)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Heal a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state,
... or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
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 jsons/healVnFRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body}
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Heal a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -50,7 +50,7 @@ DELETE an individual subscription
log Try to delete an individual subscription
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Integer response status 204
......
......@@ -10,9 +10,9 @@ Documentation This resource represents an individual VNF instance. The client
... underlying VNF instance, and to read information about the VNF instance.
Suite Setup Check resource existance
*** Variables ***
${Etag}= an etag
${Etag_modified}= a modified etag
${original_etag} 1234
*** Test Cases ***
Post Individual VNFInstance - Method not implemented
......@@ -31,13 +31,14 @@ Get Information about an individual VNF Instance
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Log Validate Status code
${Etag}= Output response headers Etag
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
Validate Json vnfInstance.schema.json ${result}
Log Validation OK
${etag} Output response header ETag
Set Suite Variable &{original_etag} ${etag}
PUT Individual VNFInstance - Method not implemented
Log Trying to perform a PUT. This method should not be implemented
......@@ -56,12 +57,11 @@ PATCH Individual VNFInstance
log Trying to modify an individual VNF instance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/patchBodyRequest.json
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}
Log Validate Status code
${Etag_modified}= Output response headers Etag
Integer response status 202
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
......@@ -75,7 +75,7 @@ PATCH Individual VNFInstance Precondition failed
log Trying to modify an individual VNF instance Precondition failed
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${Etag}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/patchBodyRequest.json
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}
......@@ -126,7 +126,7 @@ DELETE Individual VNFInstance Conflict
[Setup] Check resource instantiated
log Trying to delete an individual VNF instance Conflict
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId}
Log Validate Status code
Integer response status 409
${contentType}= Output response headers Content-Type
......
......@@ -35,7 +35,7 @@ Instantiate a vnfInstance Conflict
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/instantiateVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId}/instantiate ${body}
Integer response status 409
Log Status code validated
${contentType}= Output response headers Content-Type
......
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
Scale a vnfInstance
[Documentation] Instantiate VNF The POST method instantiates a VNF instance.
Log Trying to Instantiate 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 jsons/scaleVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${conflicVnfInstanceId}/scale ${body}
Integer response status 202
Log Status code validated
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
Scale a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
log Trying to Scale 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 jsons/scaleVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${conflicVnfInstanceId}/scale ${body}
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
......@@ -13,7 +13,7 @@ Operate a vnfInstance
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/operateVnFRequest.json
${body}= Get File jsons/operateVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body}
Integer response status 202
Log Status code validated
......@@ -33,7 +33,7 @@ Operate a vnfInstance Conflict (Not-Instantiated)
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/operateVnFRequest.json
${body}= Get File jsons/operateVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body}
Integer response status 409
Log Status code validated
......@@ -41,26 +41,6 @@ Operate a vnfInstance Conflict (Not-Instantiated)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Operate a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state,
... or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to change the operational state 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 jsons/operateVnFRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body}
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Operate a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......@@ -73,7 +53,7 @@ Operate a vnfInstance Not Found
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/operateVnFRequest.json
${body}= Get File jsons/operateVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body}
Integer response status 404
Log Status code validated
......
......@@ -40,24 +40,6 @@ Post Retry operation task Conflict (Not-FAILED_TEMP)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Post Retry operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
Depends on test Check resource FAILED_TEMP
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... or another error handling action is starting, such as rollback or fail.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another error handling action
log Retry an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Post Retry operation task Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -39,24 +39,6 @@ Post Rollback operation task Conflict (Not-FAILED_TEMP)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Post Rollback operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
Depends on test Check resource FAILED_TEMP
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state,
... or another error handling action is starting, such as retry or fail.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another error handling action
log Rollback an operation
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Post Rollback operation task Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -40,25 +40,6 @@ Scale a vnfInstance Conflict (Not-Instantiated)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Scale a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to Scale 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 jsons/scaleVnfRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body}
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
#[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished
Scale a vnfInstance Not Found
# TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent
......
......@@ -40,24 +40,6 @@ Scale a vnfInstance to level Conflict (Not-Instantiated)
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Scale a vnfInstance to level Conflict (parallel LCM operation)
[Documentation] Conflict
... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource.
... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing.
... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error.
[Setup] Launch another LCM operation
log Trying to Scale 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 jsons/scaleVnfToLevelRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body}
Log Validate Status code
Integer response status 409
${problemDetails}= Output response body