Commit 6a46a1af authored by Elian Kraja's avatar Elian Kraja
Browse files
parents 88bff108 f7e471a8
......@@ -3,6 +3,8 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Documentation This task resource represents the "Cancel operation" operation. The client can use this resource to cancel an ongoing VNF lifecycle operation.
Suite setup Check resource existance
......@@ -14,14 +16,11 @@ Post Cancel operation task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Cancel a VNF lifecycle operation
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode}
Output response
Log Validate Status code
Integer response status 202
Check resource FAILED_TEMP
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
Post Fail operation task Conflict (Not-FAILED_TEMP)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
......@@ -34,9 +33,12 @@ Post Fail operation task Conflict (Not-FAILED_TEMP)
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
Output response
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
Post Fail operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
......@@ -50,8 +52,11 @@ Post Fail operation task Conflict (parallel LCM 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
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
......@@ -67,15 +72,17 @@ Post Fail operation task Not Found
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Fail operation task - Method not implemented
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
PUT Fail operation task - Method not implemented
......@@ -83,7 +90,6 @@ PUT Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
PATCH Fail operation task - Method not implemented
......@@ -91,7 +97,6 @@ PATCH Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
DELETE Fail operation task - Method not implemented
......@@ -99,7 +104,6 @@ DELETE Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
......@@ -118,3 +122,9 @@ Check Fail not supported
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
# how to check if Fail is not supported?
Check resource FAILED_TEMP
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
\ No newline at end of file
......@@ -3,6 +3,8 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Suite setup Check resource existance
*** Test Cases ***
......@@ -16,6 +18,9 @@ Change external VNF connectivity
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body}
Integer response status 202
Log Status code validated
${headers}= Output response headers
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
......@@ -31,8 +36,11 @@ Change external VNF connectivity Conflict (parallel LCM operation)
${body}= Get File json/changeExtVnfConnectivityRequest .json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body}
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
......@@ -41,7 +49,6 @@ GET Change external VNF connectivity - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn
Log Validate Status code
Output response
Integer response status 405
PUT Change external VNF connectivity - Method not implemented
......@@ -49,7 +56,6 @@ PUT Change external VNF connectivity - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn
Log Validate Status code
Output response
Integer response status 405
PATCH Change external VNF connectivity - Method not implemented
......@@ -57,7 +63,6 @@ PATCH Change external VNF connectivity - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn
Log Validate Status code
Output response
Integer response status 405
DELETE Change external VNF connectivity - Method not implemented
......@@ -65,7 +70,6 @@ DELETE Change external VNF connectivity - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
......
......@@ -3,6 +3,8 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Suite setup Check resource existance
*** Test Cases ***
......@@ -16,6 +18,9 @@ Change deployment flavour of a vnfInstance
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
Integer response status 202
Log Status code validated
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
Change deployment flavour of a vnfInstance Conflict (Not-Instantiated)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
......@@ -31,9 +36,12 @@ Change deployment flavour of a vnfInstance Conflict (Not-Instantiated)
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File json/changeVnfFlavourRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
Output response
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
Change deployment flavour of a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
......@@ -50,8 +58,11 @@ Change deployment flavour of a vnfInstance Conflict (parallel LCM operation)
${body}= Get File json/changeVnfFlavourRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
......@@ -69,6 +80,10 @@ Change deployment flavour of a vnfInstance Not Found
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
Integer response status 404
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Change deployment flavour VNFInstance - Method not implemented
......@@ -76,7 +91,6 @@ GET Change deployment flavour VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour
Log Validate Status code
Output response
Integer response status 405
PUT Change deployment flavour VNFInstance - Method not implemented
......@@ -84,7 +98,6 @@ PUT Change deployment flavour VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour
Log Validate Status code
Output response
Integer response status 405
PATCH Change deployment flavour VNFInstance - Method not implemented
......@@ -92,7 +105,6 @@ PATCH Change deployment flavour VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour
Log Validate Status code
Output response
Integer response status 405
DELETE Change deployment flavour VNFInstance - Method not implemented
......@@ -100,7 +112,6 @@ DELETE Change deployment flavour VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
......
......@@ -3,6 +3,8 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Documentation This task resource represents the "Fail operation" operation.
... The client can use this resource to mark a VNF lifecycle management operation occurrence as "finally failed",
... i.e. change the state of the related VNF LCM operation occurrence resource to "FAILED", if it is not assumed that a subsequent retry or rollback will succeed.
......@@ -19,11 +21,9 @@ Post Fail operation task
Output response
Log Validate Status code
Integer response status 202
Check resource FAILED_TEMP
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
Post Fail operation task Conflict (Not-FAILED_TEMP)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
......@@ -36,9 +36,12 @@ Post Fail operation task Conflict (Not-FAILED_TEMP)
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
Output response
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
Post Fail operation task Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
......@@ -52,8 +55,11 @@ Post Fail operation task Conflict (parallel LCM 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
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
......@@ -69,15 +75,17 @@ Post Fail operation task Not Found
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Fail operation task - Method not implemented
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
PUT Fail operation task - Method not implemented
......@@ -85,7 +93,6 @@ PUT Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
PATCH Fail operation task - Method not implemented
......@@ -93,7 +100,6 @@ PATCH Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
DELETE Fail operation task - Method not implemented
......@@ -101,7 +107,6 @@ DELETE Fail operation task - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfInstanceId}/fail
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
......@@ -120,3 +125,8 @@ Check Fail not supported
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
# how to check if Fail is not supported?
Check resource FAILED_TEMP
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
String response body operationState FAILED_TEMP
\ No newline at end of file
......@@ -3,6 +3,8 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Suite setup Check resource existance
*** Test Cases ***
......@@ -16,6 +18,9 @@ Heal a vnfInstance
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body}
Integer response status 202
Log Status code validated
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
Heal a vnfInstance Conflict (Not-Instantiated)
# TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
......@@ -31,9 +36,12 @@ Heal a vnfInstance Conflict (Not-Instantiated)
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File json/healVnFRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body}
Output response
Integer response status 409
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
Heal a vnfInstance Conflict (parallel LCM operation)
# TODO: Need to set the pre-condition of the test
......@@ -50,8 +58,11 @@ Heal a vnfInstance Conflict (parallel LCM operation)
${body}= Get File json/healVnFRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body}
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
......@@ -69,14 +80,16 @@ Heal a vnfInstance Not Found
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body}
Integer response status 404
Log Status code validated
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
GET Heal VNFInstance - Method not implemented
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal
Log Validate Status code
Output response
Integer response status 405
PUT Heal VNFInstance - Method not implemented
......@@ -84,7 +97,6 @@ PUT Heal VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal
Log Validate Status code
Output response
Integer response status 405
PATCH Heal VNFInstance - Method not implemented
......@@ -92,7 +104,6 @@ PATCH Heal VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal
Log Validate Status code
Output response
Integer response status 405
DELETE Heal VNFInstance - Method not implemented
......@@ -100,7 +111,6 @@ DELETE Heal VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal
Log Validate Status code
Output response
Integer response status 405
*** Key words ***
......
......@@ -2,6 +2,8 @@
Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Documentation This resource represents an individual subscription. The client can use this resource to read and to terminate a
... subscription to notifications related to VNF lifecycle management
Suite setup Check resource existance
......@@ -14,7 +16,6 @@ Post Individual Subscription - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Output response
Integer response status 405
Get Information about an individual subscription
......@@ -23,8 +24,11 @@ Get Information about an individual subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Output response
Integer response status 200
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json subscriptions.schema.json ${json}
Log Validation OK
PUT an individual subscription - Method not implemented
log Trying to perform a PUT. This method should not be implemented
......@@ -33,7 +37,6 @@ PUT an individual subscription - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Output response
Integer response status 405
PATCH an individual subscription - Method not implemented
......@@ -43,7 +46,6 @@ PATCH an individual subscription - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Output response
Integer response status 405
DELETE an individual subscription
......@@ -52,7 +54,6 @@ DELETE an individual subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Log Validate Status code
Output response
Integer response status 204
*** Key words ***
......
......@@ -4,6 +4,9 @@ Resource variables.txt
Library REST http://${VNFM_HOST}:${VNFM_PORT}
... spec=SOL003-VNFLifecycleManagement-API.yaml
Library OperatingSystem
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Documentation This resource represents an individual VNF instance. The client can use this resource to modify and delete the
... underlying VNF instance, and to read information about the VNF instance.
Suite setup Check resource existance
......@@ -20,7 +23,6 @@ Post Individual VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Log Validate Status code
Output response
Integer response status 405
Get Information about an individual VNF Instance
......@@ -30,9 +32,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
Output response
${Etag}= Output response headers Etag
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE}
${result}= Output response body
${json}= evaluate json.loads('''${result}''') json
Validate Json vnfInstance.schema.json ${json}
Log Validation OK
PUT Individual VNFInstance - Method not implemented
log Trying to perform a PUT. This method should not be implemented
......@@ -41,8 +48,6 @@ PUT Individual VNFInstance - Method not implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Log Validate Status code
Output response
${Etag_modified}= Output response headers Etag
Integer response status 405
PATCH Individual VNFInstance
......@@ -57,14 +62,18 @@ PATCH Individual VNFInstance
${body}= Get File json/patchBodyRequest.json
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}
Log Validate Status code
Output response
${Etag_modified}= Output response headers Etag
Integer response status 202
${headers}= Output response headers
Should Contain ${headers} Location
Log Validation OK
PATCH Individual VNFInstance Precondition failed
[Documentation] Precondition Failed
... A precondition given in an HTTP request header is not fulfilled.
... Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity.
... The response body should contain a ProblemDetails structure, in which the “detail” attribute should convey more information about the error.
Depends On Test PATCH Individual VNFInstance # If the previous test scceeded, it means that Etag has been modified
log Trying to modify an individual VNF instance Precondition failed
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
......@@ -73,8 +82,11 @@ PATCH Individual VNFInstance Precondition failed
${body}= Get File json/patchBodyRequest.json
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}
Log Validate Status code
Output response
Integer response status 412
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
Log Validation OK
PATCH Individual VNFInstance Conflict
# TODO: Need to set the pre-condition of the test
......@@ -89,19 +101,21 @@ PATCH Individual VNFInstance Conflict
${body}= Get File json/patchBodyRequest.json
Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}
Log Validate Status code
Output response
Integer response status 409
${problemDetails}= Output response body
${json}= evaluate json.loads('''${problemDetails}''') json
Validate Json ProblemDetails.schema.json ${json}
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
DELETE Individual VNFInstance
[Documentation] Delete VNF Identifier This method deletes an individual VNF instance resource.
log Trying to delete an individual VNF instance
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
Log Validate Status code
Output response