Commit 82e505c6 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixed few backlog issues

parent 3cc1f559
......@@ -232,3 +232,16 @@ Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Log Status code validated
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Log ${response['headers']}
Should Contain ${response['headers']} ${CONTENT_TYPE}
Log Header is present
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library JSONSchemaLibrary
Suite Setup Check resource existance
*** Test Cases ***
......@@ -104,3 +105,15 @@ DELETE escalate severity
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -118,6 +118,7 @@ PUT Alarm Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/alarmModifications.json
Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
......@@ -173,3 +174,14 @@ GET Alarm Task with invalid filter
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -128,3 +128,15 @@ DELETE individual subscription
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -275,3 +275,15 @@ DELETE subscriptions
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -4,6 +4,7 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${ACCEPT} application/json
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
......@@ -46,3 +47,5 @@ ${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${fields} softwareImages,additionalArtifacts
${response}= httpresponse
\ No newline at end of file
......@@ -17,7 +17,7 @@ POST Heal a vnfInstance
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 202
Check Operation Occurrence Id
......@@ -31,7 +31,7 @@ POST Heal a vnfInstance Conflict (Not-Instantiated)
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
......@@ -45,7 +45,7 @@ POST Heal a vnfInstance Not Found
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
......
......@@ -44,7 +44,7 @@ GET Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
GET Scale vnfInstance to level
GET Terminate VNF
Check HTTP Response Status Code Is 405
PUT Terminate VNFInstance - Method not implemented
......@@ -56,7 +56,7 @@ PUT Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
PUT Scale vnfInstance to level
PUT Terminate VNF
Check HTTP Response Status Code Is 405
PATCH Terminate VNFInstance - Method not implemented
......@@ -68,7 +68,7 @@ PATCH Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
PATCH Scale vnfInstance to level
PATCH Terminate VNF
Check HTTP Response Status Code Is 405
DELETE Terminate VNFInstance - Method not implemented
......@@ -80,7 +80,7 @@ DELETE Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
DELETE Scale vnfInstance to level
DELETE Terminate VNF
Check HTTP Response Status Code Is 405
*** Keywords ***
......
*** Settings ***
Resource environment/configuration.txt
#Resource environment/configuration.txt
Resource environment/variables.txt
Resource environment/scaleVariables.txt
#Resource environment/scaleVariables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library OperatingSystem
Library BuiltIn
......@@ -319,7 +319,7 @@ POST Change VNF deployment flavour
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
GET Change External VNF Connectivity
GET Change External VNF Flavour
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}/change_flavour
......
*** Settings ***
Resource environment/configuration.txt
#Resource environment/configuration.txt
Resource environment/variables.txt
Resource environment/scaleVariables.txt
#Resource environment/scaleVariables.txt
Library MockServerLibrary
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library OperatingSystem
......
......@@ -132,7 +132,7 @@ PATCH status information about multiple VNF LCM operation occurrences - Method n
... Config ID: Config_prod_VE
... Applicability: none
... Post-Conditions: none
PUT VNF LCM OP occurences
PATCH VNF LCM OP occurences
Check HTTP Response Status Code Is 405
DELETE status information about multiple VNF LCM operation occurrences - Method not implemented
......
......@@ -9,6 +9,7 @@ ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${ACCEPT} application/json
${ACCEPT_JSON} application/json
${apiRoot} /
${apiName} vnflcm
${apiVersion} v1
......@@ -38,6 +39,8 @@ ${VnfLcmOperationOccurrenceNotification} {}
${VnfIdentifierCreationNotification} {}
${VnfIdentifierDeletionNotification} {}
${SYNC_MODE} 0
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
......@@ -50,4 +53,7 @@ ${polling_interval} 10 sec
${notification_request} []
${notification_response} []
${response}= httpresponse
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
......@@ -5,6 +5,7 @@ ${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${ACCEPT} application/json
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
${alarm_filter} managedObjectId
......@@ -21,6 +22,8 @@ ${VNFM_DUPLICATION} 1
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${NFVO_FIELDS} 1
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
......@@ -41,3 +44,5 @@ ${alarm_filter} nsInstanceId
${nsInstanceId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${invalidAlarmId} invalidIdAlarm
${fields} criteria,objectInstanceIds
\ No newline at end of file
......@@ -117,7 +117,7 @@ Check resource instantiated
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId}
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}
String response body instantiationState INSTANTIATED
Check change flavour not supported
......
......@@ -17,7 +17,7 @@ POST Heal a vnfInstance
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 202
Check Operation Occurrence Id existence
......@@ -31,7 +31,7 @@ POST Heal a vnfInstance Conflict (Not-Instantiated)
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
......@@ -46,7 +46,7 @@ POST Heal a vnfInstance Not Found
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions:
POST Terminate VNF
POST Heal VNF
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
......
......@@ -45,7 +45,7 @@ GET Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET Scale vnfInstance to level
GET Terminate VNF
Check HTTP Response Status Code Is 405
PUT Terminate VNFInstance - Method not implemented
......@@ -57,7 +57,7 @@ PUT Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT Scale vnfInstance to level
PUT Terminate VNF
Check HTTP Response Status Code Is 405
PATCH Terminate VNFInstance - Method not implemented
......@@ -69,7 +69,7 @@ PATCH Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PATCH Scale vnfInstance to level
PATCH Terminate VNF
Check HTTP Response Status Code Is 405
DELETE Terminate VNFInstance - Method not implemented
......@@ -81,7 +81,7 @@ DELETE Terminate VNFInstance - Method not implemented
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
DELETE Scale vnfInstance to level
DELETE Terminate VNF
Check HTTP Response Status Code Is 405
*** Keywords ***
......
......@@ -366,6 +366,15 @@ POST Create a new vnfInstance
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Get multiple VNF instances
Log Query status information about multiple VNF lifecycle management operation occurrences.
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
GET multiple vnfInstances
Log Query VNF The GET method queries information about multiple VNF instances.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -534,13 +543,12 @@ DELETE instantiate individual vnfInstance
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
POST Scale vnfInstance
[Arguments] ${instanceId}
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/${instanceId}/scale ${body}
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
GET Scale vnfInstance
......@@ -815,14 +823,7 @@ Post Individual VNF LCM Operation occurrences
Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Get multiple VNF instances
Log Query status information about multiple VNF lifecycle management operation occurrences.
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Put multiple VNF instances
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......
......@@ -131,7 +131,7 @@ PATCH status information about multiple VNF LCM Operation OCC - Method not imple
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
PUT VNF LCM Operation occurrences
PATCH VNF LCM Operation occurrences
Check HTTP Response Status Code Is 405
DELETE status information about multiple VNF LCM Operation OCC - Method not implemented
......
......@@ -3,6 +3,7 @@ ${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https
${ACCEPT} application/json
${ACCEPT_JSON} application/json
${CONTENT_TYPE} application/json
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTH_USAGE} 1
......
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