diff --git a/SOL002/VNFConfiguration-API/ApiVersion.robot b/SOL002/VNFConfiguration-API/ApiVersion.robot index 108cbe0d9ab0665e259bdaec00c8629f78a91083..f3afab525eff5282c93cb9a14b23b2d2ca1284f6 100644 --- a/SOL002/VNFConfiguration-API/ApiVersion.robot +++ b/SOL002/VNFConfiguration-API/ApiVersion.robot @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index a8ccf57c991f264e2b00d72b87d1349c89491890..69239787a7062d15e3e1d1251ce7debd5d3aef7a 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -107,7 +107,7 @@ Get VNF configuration Log Query VNF The GET method queries information about a configuration. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response @@ -117,7 +117,7 @@ Send VNF configuration log Trying to perform a PATCH. This method modifies the configuration Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/vnfConfigModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} ${output}= Output response @@ -158,7 +158,7 @@ Send Duplicated VNF configuration Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"If-Match": "${etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/vnfConfigModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} ${output}= Output response @@ -167,7 +167,7 @@ Send Duplicated VNF configuration Send POST Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} @@ -175,7 +175,7 @@ Send POST Request for VNF Configuration Send PUT Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} @@ -183,7 +183,7 @@ Send PUT Request for VNF Configuration Send DELETE Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index 0cd66a08c6b850f1eece41c7a99fbed059e68beb..0d4c026b13c6740baa803bd634649f7ba47cda53 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -10,7 +10,8 @@ ${EM-VNF_SCHEMA} https ${ACCEPT} application/json ${AUTH_USAGE} 1 -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index b2c226c552155cb2dea292907d9fe8653caa463c..f8827ba03e9c035fd6e9648a34e4128fbccd8b18 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -261,35 +261,35 @@ GET information about multiple alarms with attribute-based filter "probableCause POST Alarms Task log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Alarms 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Alarms Task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Alarms Task log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task Log Query VNF The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response @@ -297,7 +297,7 @@ GET Alarms Task GET Alarms Task with filter Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} ${outputResponse}= Output response @@ -305,7 +305,7 @@ GET Alarms Task with filter GET Alarms Task with invalid filter Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} ${outputResponse}= Output response @@ -313,28 +313,28 @@ GET Alarms Task with invalid filter GET Alarms Task with all_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -364,7 +364,7 @@ Check HTTP Response Header Contain Link GET Alarms Task with filter "id" Log Query VNF The GET method queries information about multiple alarms with filters "id". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?id=${alarmId} ${outputResponse}= Output response @@ -376,7 +376,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "vnfcInstanceIds" Log Query VNF The GET method queries information about multiple alarms with filters "vnfcInstanceIds". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds} ${outputResponse}= Output response @@ -390,7 +390,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType" Log Query VNF The GET method queries information about multiple alarms with filters "rootCauseFaultyResource.faultyResourceType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} ${outputResponse}= Output response @@ -404,7 +404,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "eventType" Log Query VNF The GET method queries information about multiple alarms with filters "eventType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?eventType=${eventType} ${outputResponse}= Output response @@ -418,7 +418,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "perceivedSeverity" Log Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?perceivedSeverity=${perceivedSeverity} ${outputResponse}= Output response @@ -432,7 +432,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "probableCause" Log Query VNF The GET method queries information about multiple alarms with filters "probableCause". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?probableCause=${probableCause} ${outputResponse}= Output response diff --git a/SOL002/VNFFaultManagement-API/ApiVersion.robot b/SOL002/VNFFaultManagement-API/ApiVersion.robot index 48a593c977c953340493b591ddb68d6fa5fbb44d..72ae2f9b37f1b0d922923e47dcbc82b2f1edfe4d 100644 --- a/SOL002/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL002/VNFFaultManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 63f0d49d919fc266974f764eb0e0ebf5976593c8..c06950a4803f6a188a87a74790465e453db19784 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -69,38 +69,38 @@ DELETE Escalate the perceived severity - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} Integer response status 200 POST escalate severity Log escalate the perceived severity of an alarm with the VNFM Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET escalate severity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT escalate severity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH escalate severity log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE escalate severity log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 97c96dc562c9a9de6d96b086c6c683d0304f0961..1d9d1e7ab81a38091963ffa481ae4744b2925a20 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -117,14 +117,14 @@ GET information about an individual alarm - Not Found POST Alarm Task log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -134,7 +134,7 @@ PATCH Alarm Task 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -143,7 +143,7 @@ PATCH Alarm Task with wrong precondition log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${origOutput}= Output response @@ -154,14 +154,14 @@ PATCH Alarm Task with wrong precondition DELETE Alarm Task log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarm Task Log Query VNF The GET method queries information about individual alarm. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${etag} Output response headers ETag @@ -171,7 +171,7 @@ GET Alarm Task GET Alarm Task with filter Log Query VNF The GET method queries information about individual alarm with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} ${outputResponse}= Output response @@ -179,7 +179,7 @@ GET Alarm Task with filter GET Alarm Task with invalid filter Log Query VNF The GET method queries information about individual alarm with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} ${outputResponse}= Output response diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index 6189b4e04ed3440c7601c5b78b923394b98628ca..39c594b6fb961117f4ab0b610c728949df0e23d9 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -86,41 +86,41 @@ GET Information about an individual subscription - Not Found *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Post Create individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription - filter Log Get the list of active individual subscription using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription - invalid filter Log Get the list of active individual subscription using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT individual subscription 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -128,14 +128,14 @@ PATCH individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFFaultManagement-API/NotificationConsumer.robot b/SOL002/VNFFaultManagement-API/NotificationConsumer.robot index 039fcec989df6a1a176a0e6c1e39d6f0157287dd..f03722d4e9366c8ad9a6b808ae91ea71845d74d5 100644 --- a/SOL002/VNFFaultManagement-API/NotificationConsumer.robot +++ b/SOL002/VNFFaultManagement-API/NotificationConsumer.robot @@ -1,93 +1,93 @@ -*** Settings *** -Library String -Library OperatingSystem -Resource environment/variables.txt -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Fault Alarm Notification - [Documentation] Test ID: 6.3.4.8.1 - ... Test title: VNF Fault Alarm Notification - ... Test objective: The objective is to test that VNF Fault Alarm Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm Notification - Check HTTP Response Status Code Is 204 - -VNF Fault Alarm Cleared Notification - [Documentation] Test ID: 6.3.4.8.2 - ... Test title: VNF Fault Alarm Cleared Notification - ... Test objective: The objective is to test that VNF Fault Alarm Cleared Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm Cleared Notification - Check HTTP Response Status Code Is 204 - -VNF Fault Alarm List Rebuilt Notification - [Documentation] Test ID: 6.3.4.8.3 - ... Test title: VNF Fault List Rebuilt Alarm List Rebuilt Notification - ... Test objective: The objective is to test that VNF Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm List Rebuilt Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body FmSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Alarm Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm Cleared Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmClearedNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm List Rebuilt Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmListRebuiltNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library OperatingSystem +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Fault Alarm Notification + [Documentation] Test ID: 6.3.4.8.1 + ... Test title: VNF Fault Alarm Notification + ... Test objective: The objective is to test that VNF Fault Alarm Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm Cleared Notification + [Documentation] Test ID: 6.3.4.8.2 + ... Test title: VNF Fault Alarm Cleared Notification + ... Test objective: The objective is to test that VNF Fault Alarm Cleared Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 6.3.4.8.3 + ... Test title: VNF Fault List Rebuilt Alarm List Rebuilt Notification + ... Test objective: The objective is to test that VNF Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index d5795f5c030253e7a5a8de349954ffaaa79da384..6a6830d26be4e797844544667663b38ca37ed01b 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot @@ -113,8 +113,10 @@ Configure Notification Alarm List Rebuilt Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -123,8 +125,10 @@ Configure Notification Alarm Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -133,8 +137,10 @@ Configure Notification Alarm Cleareance Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index df7d5d84d7628725fa1a981e40162566bcd0d617..a03299db30117d84b987f1eb3b2fe4a2905f316b 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -5,6 +5,10 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Library String +Library Process +Library MockServerLibrary +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new subscription @@ -314,22 +318,34 @@ POST Create a new Subscription - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Post Create subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + # Post Create subscription - DUPLICATION # Log Trying to create a subscription with an already created content # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test # Set Headers {"Accept": "${ACCEPT}"} # Set Headers {"Content-Type": "${CONTENT_TYPE}"} - # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} # ${template}= Get File jsons/fmSubscriptionRequest.json # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} @@ -340,7 +356,7 @@ Post Create subscription # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 VNFM permits duplication. Skipping the test # Set Headers {"Accept": "${ACCEPT}"} # Set Headers {"Content-Type": "${CONTENT_TYPE}"} - # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} # ${template}= Get File jsons/fmSubscriptionRequest.json # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} @@ -350,7 +366,7 @@ Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response @@ -358,63 +374,63 @@ Get subscriptions Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT subscriptions 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -438,7 +454,7 @@ Check HTTP Response Header Contain Link Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -449,7 +465,7 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -462,7 +478,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -475,7 +491,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -488,7 +504,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -501,7 +517,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -513,7 +529,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Check Postcondition resource exists Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 7eb09910bd66c2fbeed3c4dce8b23971ddd0fad3..8a8be2d2bc72c2cfe456533438869d9f1b30f23d 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 diff --git a/SOL002/VNFIndicator-API/ApiVersion.robot b/SOL002/VNFIndicator-API/ApiVersion.robot index a89c0b19d2ef75bafcdbe50a0103295bd5ce31a7..6ba83e5f0ead4ded2c6391c8fe2575217990b102 100644 --- a/SOL002/VNFIndicator-API/ApiVersion.robot +++ b/SOL002/VNFIndicator-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 68e5bb49d1d97ea404f9518c895a4add55535937..1e6d3f3116ab2920e40c56b7d3558c7e91bd66db 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -97,7 +97,7 @@ POST Individual VNF Indicator Subscription - Method not implemented Get Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -105,7 +105,7 @@ Get Individual VNF Indicator Subscription GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -113,7 +113,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -121,14 +121,14 @@ Send Delete Request for Individual VNF Indicator Subscription Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -136,7 +136,7 @@ Send Post Request for Individual VNF Indicator Subscription Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -146,7 +146,7 @@ Send Put Request for Individual VNF Indicator Subscription Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 437cb6f3a1dbb8301d3a22e3409900703148c807..206a72b1c5afb8e2e718b82424493016b5a652fc 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -159,7 +159,7 @@ DELETE Individual Performance Indicator - Method not implemented Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -167,7 +167,7 @@ Get Individual Indicator for a VNF instance Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -175,7 +175,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -183,7 +183,7 @@ Send POST Request for individual indicator in VNF instance Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -191,7 +191,7 @@ Send PUT Request for individual indicator in VNF instance Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -199,7 +199,7 @@ Send PATCH Request for individual indicator in VNF instance Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -234,7 +234,7 @@ Check HTTP Response Body Includes Requested VNF Instance ID Get Individual Indicator Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -242,7 +242,7 @@ Get Individual Indicator Get Individual Indicator with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -250,7 +250,7 @@ Get Individual Indicator with invalid indicator identifier Send POST Request for individual indicator Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -258,7 +258,7 @@ Send POST Request for individual indicator Send PUT Request for individual indicator Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,7 +266,7 @@ Send PUT Request for individual indicator Send PATCH Request for individual indicator Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -274,7 +274,7 @@ Send PATCH Request for individual indicator Send DELETE Request for individual indicator Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/NoificationConsumer.robot b/SOL002/VNFIndicator-API/NoificationConsumer.robot index 1f6b1cb25c145183bc9c55c8d0f050b4bbfd9e67..cb11aa11ed5c0b067681779931db034608a2dd83 100644 --- a/SOL002/VNFIndicator-API/NoificationConsumer.robot +++ b/SOL002/VNFIndicator-API/NoificationConsumer.robot @@ -1,46 +1,46 @@ -*** Settings *** -Library String -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library OperatingSystem -Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Indicator Value Change Notification - [Documentation] Test ID: 6.3.2.7.1 - ... Test title: VNF Indicator Value Change Notification - ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification . - ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNF. - ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_VNF - ... Applicability: none - ... Post-Conditions: none - Post Value Change Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body VnfIndicatorSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Value Change Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/ValueChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library OperatingSystem +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Indicator Value Change Notification + [Documentation] Test ID: 6.3.2.7.1 + ... Test title: VNF Indicator Value Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification . + ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNF. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNF + ... Applicability: none + ... Post-Conditions: none + Post Value Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VnfIndicatorSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Value Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/ValueChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index b12f6693f5a045ae43aff0a6b715344c17729dd8..a1c846577967d6f03e22ee52e8122104fc58b03d 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -145,12 +145,12 @@ POST Create a new Subscription - Unprocessable Entity [Documentation] Test ID: 6.3.2.4.11 ... Test title: POST Create a new Subscription - Unprocessable Entity ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. - ... re-conditions: none + ... Pre-conditions: none ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Send Post Request for VNF Indicator Subscription + Send Post Request for VNF Indicator Subscription with unprocessable entity Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails @@ -185,7 +185,7 @@ Create new VNF indicator Subscription - NO-DUPLICATION Get VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -193,7 +193,7 @@ Get VNF Indicators Subscriptions Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -201,7 +201,7 @@ Get VNF Indicators Subscriptions with filter Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -209,7 +209,7 @@ Get VNF Indicators Subscriptions with invalid filter Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -220,17 +220,34 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + +Send Post Request for VNF Indicator Subscription with unprocessable entity + Log Trying to create a new subscription + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=localhost #not reachable endpoint + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -238,7 +255,7 @@ Send Put Request for VNF Indicator Subscriptions Send Patch Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -246,7 +263,7 @@ Send Patch Request for VNF Indicator Subscriptions Send Delete Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -280,7 +297,7 @@ Check Postcondition VNF Indicator Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -288,11 +305,10 @@ Check Postcondition VNF Indicator Subscription Is Set Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] -Create Sessions - Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run +Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} @@ -313,22 +329,40 @@ Post Create subscription - DUPLICATION Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/subscriptions.json - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${body}= Format String ${body} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/subscriptions.json - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${body}= Format String ${body} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Check Operation Occurrence Id ${vnfLcmOpOccId}= Get Value From Json ${response['headers']} $..Location diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 0addde85823850b4b4fddd01cc9fca1034a244fc..ad6536a22033ad2badb4c8169f6fa156ac53ecef 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -177,7 +177,7 @@ Get VNF Indicators - Bad Request Response too Big Get all VNF indicators Log The GET method queries multiple VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -186,7 +186,7 @@ Get all VNF indicators Get VNF indicators with filter Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response @@ -195,7 +195,7 @@ Get VNF indicators with filter Get VNF indicators with invalid filter Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response @@ -205,7 +205,7 @@ Get all VNF indicators with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -215,7 +215,7 @@ Get all VNF indicators with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -233,7 +233,7 @@ Get all VNF indicators without authorization token Get all VNF indicators with invalid resource endpoint Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicator ${output}= Output response @@ -242,7 +242,7 @@ Get all VNF indicators with invalid resource endpoint Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -250,7 +250,7 @@ Send POST Request for all VNF indicators Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -258,7 +258,7 @@ Send PUT Request for all VNF indicators Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,7 +266,7 @@ Send PATCH Request for all VNF indicators Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -293,9 +293,9 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_name} = Split String @{attr}[0] ,${SEPERATOR} - @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_name} = Split String @{attr}[0] ${SEPARATOR} + @{var_id} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" Check HTTP Response Header Contain Link diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index b25da0214a2dea2b0c1537a74bc6fa9854f08ea0..cee2b50d972ca28799f6bfe68f03793fa00cdf01 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -139,7 +139,7 @@ Get Indicators for VNF Instance - Bad Request Response too Big Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -147,7 +147,7 @@ Get all indicators for a VNF instance Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -155,7 +155,7 @@ Get all indicators for a VNF instance with filter Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -163,7 +163,7 @@ Get all indicators for a VNF instance with invalid filter Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -171,7 +171,7 @@ Get all indicators for a VNF instance with invalid resource identifier Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -179,7 +179,7 @@ Send POST Request for indicators in VNF instance Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -187,7 +187,7 @@ Send PUT Request for indicators in VNF instance Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +195,7 @@ Send PATCH Request for indicators in VNF instance Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -225,7 +225,7 @@ Check HTTP Response Body Includes Requested VNF Instance ID Check HTTP Response Body Matches Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - @{words} = Split String ${POS_FIELDS} ,${SEPERATOR} + @{words} = Split String ${POS_FIELDS} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['name']} @{words}[1] Check HTTP Response Header Contain Link diff --git a/SOL002/VNFIndicator-API/environment/variables.txt b/SOL002/VNFIndicator-API/environment/variables.txt index 3439ee7c8ca2608fec4eef194f284a1ebd442b10..82627dcabffb29d1422ce2d0a7ce3b6481362f9b 100644 --- a/SOL002/VNFIndicator-API/environment/variables.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -2,9 +2,10 @@ ${PRODUCER_HOST} localhost ${PRODUCER_PORT} 8081 ${PRODUCER_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${CONTENT_TYPE_JSON} application/json ${EM-VNF_HOST} localhost ${EM-VNF_PORT} 8002 @@ -40,7 +41,7 @@ ${POS_FILTER} callbackUri=http://127.0.0.1/subscribe ${NEG_FILTER} callback=http://127.0.0.1/subscribe ${total_polling_time} 2 min ${polling_interval} 10 sec -${SEPERATOR} = +${SEPARATOR} = ${erroneousVnfInstanceId} erroneousVnfInstanceId ${POS_FIELDS} name=vnfIndicator @@ -48,6 +49,6 @@ ${NEG_FIELDS} wrongName=any_value ${vnfIndicators} = -${VAR_SEPERATOR} & +${VAR_SEPARATOR} & ${callbackResp} localhost \ No newline at end of file diff --git a/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot b/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot index c58a979a13622a44d19a306920cd75eb500571ca..65ba44ae91a650d714b798886ff382f0332957a6 100644 --- a/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot +++ b/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot @@ -49,8 +49,10 @@ Configure Notification Indicator Value Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot index 1c1ea5db567bf9cb451ab87471fb2f20c2bce428..d226849140febdf1018ab918bd12d1269009f59d 100644 --- a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot index 60d04f4b826a16d1d1831aeadff4edb5617852f4..db8a558e65726a28a69ef69a23f6e2619a246bae 100644 --- a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -100,6 +100,6 @@ DELETE Cancel operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index f803d37fb7375eee73911cde2fcb0038b4ea7802..f46fda1db1db44bb44ebb1b64c73cedef105974b 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -86,6 +86,6 @@ POST Change external VNF connectivity Conflict Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index bf6278856972efc6d16d070f1a20b8bd55fdd766..37a3a53360d9c91a341fba60a5d50e1824cc6366 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -99,6 +99,6 @@ DELETE Change deployment flavour VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot index e8298325c4737432d10af7bc9f843da6c065dab1..63508cafe9791fbd9fd5b393e2004371dbd78c1e 100644 --- a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot @@ -100,6 +100,6 @@ DELETE Heal VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index cf5882df83b08692e0faa306c4f82693f7163a1a..a6165996edc21a17e34491f7ffbe34548544dc95 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -5,64 +5,65 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify= Library JSONLibrary Library JSONSchemaLibrary schemas/ *** Test Cases *** -Post Individual VNF LCM OP occurrences - Method not implemented +Post Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.1 - ... Test title: Post Individual VNF LCM OP occurrences - Method not implemented + ... Test title: Post Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Post Individual VNF LCM OP occurrences + Post Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -Get status information about multiple VNF instances +Get Individual VNF LCM OP occurrence [Documentation] Test ID: 6.3.5.12.2 - ... Test title: Get status information about multiple VNF instances - ... Test objective: The objective is to test that this method retrieve status information about a VNF lifecycle management operation occurrence + ... Test title: Get Individual VNF LCM OP occurrence + ... Test objective: The objective is to test that this method retrieve a VNF lifecycle management operation occurrence and perform a JSON schema validation of the returned data structure ... Pre-conditions: none ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Get Individual VNF LCM OP occurrences + Get Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is vnfLcmOpOcc + Check HTTP Response Body Json Schema Is VnfLcmOpOcc Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor -PUT status information about multiple VNF instances - Method not implemented +PUT Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.3 - ... Test title: PUT status information about multiple VNF instances - Method not implemented + ... Test title: PUT Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - PUT Individual VNF LCM OP occurrences + Put Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -PATCH status information about multiple VNF instances - Method not implemented +PATCH Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.4 - ... Test title: PATCH status information about multiple VNF instances - Method not implemented + ... Test title: PATCH Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - PATCH Individual VNF LCM OP occurrences + Patch Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -DELETE status information about multiple VNF instances - Method not implemented +DELETE Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.5 - ... Test title: DELETE status information about multiple VNF instances - Method not implemented + ... Test title: DELETE Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - DELETE Individual VNF LCM OP occurrences + Delete Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 + diff --git a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 0bf995edd501dfe8949961a485bf6cc2b6c3e562..2c43ee7a66345d7de3ddd05e276f42a2ba3a2406 100644 --- a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -88,6 +88,6 @@ DELETE Instantiate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/NotificationConsumer.robot b/SOL002/VNFLifecycleManagement-API/NotificationConsumer.robot index 2a81c11426e912c061934d39351f46d1143f73f5..7befae053b54175f07e46d1533e19bdc12deeb7c 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationConsumer.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationConsumer.robot @@ -1,89 +1,89 @@ -*** Settings *** -Library String -Resource environment/variables.txt -Resource VnfLcmOperationKeywords.robot -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF LCM Operation Occurrence Notification - [Documentation] Test ID: 6.3.5.21.1 - ... Test title: VNF LCM Operation Occurrence Start Notification - ... Test objective: The objective is to test that VNF LCM Operation Occurrence Notification is delivered with success to the notification consumer - ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF LCM Operation Occurrence Notification - Check HTTP Response Status Code Is 204 - -VNF Identifier Creation Notification - [Documentation] Test ID: 6.3.5.21.2 - ... Test title: VNF Identifier Creation Notification - ... Test objective: The objective is to test that VNF Identifier Creation Notification is delivered with success to the notification consumer - ... Pre-conditions: A subscription for VNF Identifier Creation Notification is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Identifier Creation Notification - Check HTTP Response Status Code Is 204 - -VNF Identifier Deletion Notification - [Documentation] Test ID: 6.3.5.21.3 - ... Test title: VNF Identifier Deletion Notification - ... Test objective: The objective is to test that VNF Identifier Deletion Notification is delivered with success to the notification consumer - ... Pre-conditions: A subscription for VNF Identifier Deletion Notification is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Identifier Deletion Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body Subscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Post VNF LCM Operation Occurrence Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Identifier Creation Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfIdentifierCreationNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Identifier Deletion Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfIdentifierDeletionNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF LCM Operation Occurrence Notification + [Documentation] Test ID: 6.3.5.21.1 + ... Test title: VNF LCM Operation Occurrence Start Notification + ... Test objective: The objective is to test that VNF LCM Operation Occurrence Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 + +VNF Identifier Creation Notification + [Documentation] Test ID: 6.3.5.21.2 + ... Test title: VNF Identifier Creation Notification + ... Test objective: The objective is to test that VNF Identifier Creation Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for VNF Identifier Creation Notification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Identifier Creation Notification + Check HTTP Response Status Code Is 204 + +VNF Identifier Deletion Notification + [Documentation] Test ID: 6.3.5.21.3 + ... Test title: VNF Identifier Deletion Notification + ... Test objective: The objective is to test that VNF Identifier Deletion Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for VNF Identifier Deletion Notification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Identifier Deletion Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body Subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Post VNF LCM Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot index 6a3ecfce5316e4ff74ea47391147be6542142c75..17a3b3b61aa962471cb3d6f8a01d76075c9bc6a0 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -97,8 +97,10 @@ Configure Notification VNF LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -119,8 +121,10 @@ Configure Notification VNF LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is @@ -141,8 +145,10 @@ Configure Notification VNF Identifier Creation Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -163,8 +169,10 @@ Configure Notification VNF Identifier Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot index 40448b7c605ce6d4a8d0c20cf1b40bce22559687..ccaea1ae51ff42f648bece7cbeead9b343fafb41 100644 --- a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -99,6 +99,6 @@ DELETE Operate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot index 8e7a7fd2a871c3e3a0cad9719bf73adf373e54a3..6387120809acfbc1524c1b549ed765c51ed2aeb7 100644 --- a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -98,6 +98,6 @@ DELETE Retry operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot index 1ed4064c5614692a2bf37bf6c822e34b2e647dc8..382bd0069e3c9742ce97f3550afb5655a52f29b5 100644 --- a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -99,6 +99,6 @@ DELETE Rollback operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot index e545c237da69cc5c529b357920481fc8b13948b3..9e2a107026236690443abf4224e4af008f3a710e 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -99,6 +99,6 @@ DELETE Scale VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index de97db01a59925656145109d5efce21039d6c896..1afc0bd1a4c72879c1ec01708cc4a994072e03cd 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -98,6 +98,6 @@ DELETE Scale to level VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index 6f8cbd6ed25299347d12c2b96c985893dc9eb673..65bff9a7cdc2dc9506e2d8a8228971c42839618a 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -5,6 +5,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription diff --git a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot index 0656a1724aefa98e88fbf5e56d90f52e9b4b0e47..56ef35f640b77464911e92a46e8f895caa404c37 100644 --- a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -86,6 +86,6 @@ DELETE Terminate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index e7b58946be679101a65bac6ed0056d047380f66b..fc8f22215cdb0770f197c697294b649476386b6d 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -9,17 +9,22 @@ Library BuiltIn Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ -Library String -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +Library String +Library Process +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** - +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Get Vnf Instance [Arguments] ${vnfInstanceId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}= Output response body [Return] ${body} @@ -53,7 +58,7 @@ Check VNF Instance [Arguments] ${vnfId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfId} Check VNF Status @@ -62,12 +67,12 @@ Check VNF Status Log VNF Status in the correct status Check operation resource state is FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FAILED_TEMP Check operation resource state is FINALLY_FAILED - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FINALLY_FAILED @@ -80,7 +85,7 @@ POST Create a new vnfInstance Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template} = Get File jsons/createVnfRequest.json ${body}= Format String ${template} vnfdId=${Descriptor_ID} @@ -92,7 +97,7 @@ GET multiple vnfInstances Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -101,7 +106,7 @@ GET multiple vnfInstances with bad attribute Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -110,42 +115,42 @@ GET multiple vnfInstances with bad filter Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET multiple vnfInstances with all_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default attribute selector Log Query status information about multiple VNF instances using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default and fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -153,7 +158,7 @@ PUT multiple vnfInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -167,7 +172,7 @@ PATCH multiple vnfInstances DELETE multiple vnfInstances Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -176,7 +181,7 @@ POST individual vnfInstance log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -185,7 +190,7 @@ GET individual vnfInstance log Trying to get information about an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -194,7 +199,7 @@ PUT individual vnfInstance log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -204,7 +209,7 @@ PATCH individual vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} #Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${body}= Get File jsons/patchBodyRequest.json #${body}= Format String ${template} vnfdId=${descriptor_id} @@ -213,7 +218,7 @@ PATCH individual vnfInstance Set Global Variable ${response} ${outputResponse} DELETE individual vnfInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -222,7 +227,7 @@ POST instantiate individual vnfInstance 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/instantiateVnfRequest.json ${body}= Format String ${template} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} @@ -231,28 +236,28 @@ POST instantiate individual vnfInstance GET instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -268,7 +273,7 @@ POST Scale vnfInstance 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Run Keyword If ${vnf_state} == 0 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/scale ${body} Run Keyword If ${vnf_state} == 1 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} @@ -283,7 +288,7 @@ POST Scale vnfInstance # 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}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} # ${template}= Get File jsons/scaleVnfRequest.json # ${body}= Format String ${template} scaleVnfRequesttype=${scaleVnfRequesttype} scaleVnfRequestAspect=${scaleVnfRequestAspect} # Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} @@ -293,7 +298,7 @@ GET Scale vnfInstance Log Trying to get a scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -302,7 +307,7 @@ PUT Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -311,7 +316,7 @@ PATCH Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -320,7 +325,7 @@ DELETE Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -330,7 +335,7 @@ POST Scale vnfInstance to level Log Trying to scale a vnf Instance to level Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/scaleVnfToLevelRequest.json ${body}= Format String ${template} newFlavourId=${newFlavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} @@ -338,28 +343,28 @@ POST Scale vnfInstance to level Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance to level log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance to level log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -368,7 +373,7 @@ POST Change VNF deployment flavour 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/changeVnfFlavourRequest.json ${body}= Format String ${template} newFlavourId=${newFlavourId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} @@ -376,14 +381,14 @@ POST Change VNF deployment flavour Set Global Variable ${response} ${outputResponse} GET Change VNF deployment flavour log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change VNF deployment flavour log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -397,7 +402,7 @@ PATCH Change VNF deployment flavour DELETE Change VNF deployment flavour Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -406,7 +411,7 @@ POST Terminate VNF Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/terminateVnfRequest.json ${body}= Format String ${template} terminationType=${terminationType} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} @@ -415,28 +420,28 @@ POST Terminate VNF GET Terminate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Terminate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -445,7 +450,7 @@ POST Heal VNF 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/healVnfRequest.json ${body}= Format String ${template} healingCause=${healingCause} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} @@ -454,28 +459,28 @@ POST Heal VNF GET Heal VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Heal VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -484,7 +489,7 @@ POST Change External VNF Connectivity Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} ${outputResponse}= Output response @@ -492,14 +497,14 @@ POST Change External VNF Connectivity GET Change External VNF Connectivity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change External VNF Connectivity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -513,7 +518,7 @@ PATCH Change External VNF Connectivity DELETE Change External VNF Connectivity Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -522,7 +527,7 @@ POST Operate VNF Log Trying to operate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/operateVnfRequest.json ${body}= Format String ${template} changeStateTo=${changeStateTo} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} @@ -531,28 +536,28 @@ POST Operate VNF GET Operate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Operate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -560,14 +565,14 @@ DELETE Operate VNF Post VNF LCM OP occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM OP occurrences 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response @@ -575,76 +580,81 @@ GET VNF LCM OP occurrences GET VNF LCM OP occurrences invalid attribute 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM OP occurrences invalid filter 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT VNF LCM OP occurrences 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH VNF LCM OP occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE VNF LCM OP occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Individual VNF LCM OP occurrences +Post Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Get Individual VNF LCM OP occurrences + +Get Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Put Individual VNF LCM OP occurrences + +Put Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} -Patch Individual VNF LCM OP occurrences + Set Global Variable ${response} ${outputResponse} + +Patch Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} -Delete Individual VNF LCM OP occurrences + Set Global Variable ${response} ${outputResponse} + +Delete Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} + Post Retry operation Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response @@ -652,7 +662,7 @@ Post Retry operation Get Retry operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response @@ -660,27 +670,27 @@ Get Retry operation Put Retry operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Retry operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Retry operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Rollback operation Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response @@ -688,7 +698,7 @@ Post Rollback operation Get Rollback operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response @@ -696,27 +706,27 @@ Get Rollback operation Put Rollback operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Rollback operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Rollback operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Fail operation Log mark as Failed a VNF lifecycle operation if that operation has experienced a failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response @@ -724,7 +734,7 @@ Post Fail operation Get Fail operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response @@ -732,28 +742,28 @@ Get Fail operation Put Fail operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Fail operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Fail operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Cancel operation task Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Cancel a VNF lifecycle operation Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} Log Validate Status code @@ -762,14 +772,14 @@ POST Cancel operation task GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -783,7 +793,7 @@ PATCH Cancel operation task DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -792,39 +802,61 @@ Post Create subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + + Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response @@ -833,42 +865,42 @@ Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -876,7 +908,7 @@ PUT subscriptions log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -884,7 +916,7 @@ PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -892,7 +924,7 @@ DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -900,14 +932,14 @@ Post Create Individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -915,7 +947,7 @@ Put Individual subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -923,14 +955,14 @@ Patch Individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1000,13 +1032,13 @@ GET test endpoint Check Subscription resource exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Get VNF LCM Operation occurrences with all_fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -1014,28 +1046,28 @@ Get VNF LCM Operation occurrences with all_fields attribute selector Get VNF LCM Operation occurrences with exclude_default attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_default and fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1067,6 +1099,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -1093,6 +1126,7 @@ Fetch Information from SOL001 descriptor file Set Global Variable @{Storage_IDs} @{Storage_labels} Get VNF Attributes from SOL001 + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml [Arguments] ${VNF_label} ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} @@ -1109,6 +1143,7 @@ Get VNF Attributes from SOL001 Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} @@ -1135,7 +1170,8 @@ Fetch Information from SOL006 descriptor file Set Global Variable ${Descriptor_Version} ${descriptor_version} Get VDU IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{VDU_labels}= Create List ${Storage_labels}= Create List FOR ${i} IN RANGE ${count} @@ -1148,6 +1184,7 @@ Get VDU IDs Get Internal CPs for each VDU [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} ${internal_CPs}= Create List FOR ${i} IN RANGE ${count} @@ -1156,7 +1193,8 @@ Get Internal CPs for each VDU Set Global Variable ${internalCP_IDs} ${internal_CPs} Get External CP IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{external_CPs}= Create List FOR ${i} IN RANGE ${count} Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} @@ -1164,7 +1202,8 @@ Get External CP IDs Set Global Variable ${externalCP_IDs} ${external_CPs} Get Virtual Link IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${VirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} @@ -1173,6 +1212,7 @@ Get Virtual Link IDs Get Instantiation Levels [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{Instantiation_Levels}= Create List FOR ${i} IN RANGE ${count} Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index d5e329d38cffd74f715d7c4069053150b5e5ece2..785ae77a4aa0bf6df074b645e49ea11e086777d6 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -30,7 +30,7 @@ GET status information about multiple VNF LCM operation occurrences ... Applicability: none ... Post-Conditions: none GET VNF LCM OP occurrences - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor @@ -70,7 +70,7 @@ GET status information about multiple VNF LCM Operation occurrences with "all_fi ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with all_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation occurrences with "exlude_default" @@ -83,7 +83,7 @@ GET status information about multiple VNF LCM Operation occurrences with "exlude ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation occurrences with "fields" @@ -96,7 +96,7 @@ GET status information about multiple VNF LCM Operation occurrences with "fields ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation occurrences with "exclude_fields" @@ -109,7 +109,7 @@ GET status information about multiple VNF LCM Operation occurrences with "exclud ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs PUT status information about multiple VNF LCM operation occurrences - Method not implemented @@ -184,5 +184,5 @@ GET status information about multiple VNF LCM Operation occurrences with "exlude ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default and fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - vnf_b_1_VNF: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF-B-2VDUs" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index 9bc19c2876c18e6cbb95367214a148ee32230565..835a6f17aacc8e4424716c7113a49be98ddb4242 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -5,7 +5,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json @@ -85,7 +86,7 @@ ${descriptorType} SOL006 ${check_multiple_instances} 0 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage diff --git a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ad05e0209c32e97f97667d15c8adfb850c2d8b62 100644 --- a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json +++ b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json @@ -0,0 +1,87 @@ +{ + "description": "This type represents a VNF identifier creation notification, which informs the receiver of the creation of a new \"Individual VNF instance\" resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has created an \"Individual VNF instance\" resource and the associated VNF instance identifier.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "vnfInstanceId", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"VnfIdentifierCreationNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "VnfIdentifierCreationNotification" + ] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "This type represents the links to resources that a notification can contain.\n", + "type": "object", + "required": [ + "vnfInstance", + "subscription" + ], + "properties": { + "vnfInstance": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..253ccce96b2de34faba43dd5093c2a3ab9e561ef 100644 --- a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json +++ b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json @@ -0,0 +1,87 @@ +{ + "description": "This type represents a VNF identifier deletion notification, which informs the receiver of the deletion of a new \"Individual VNF instance\" resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has deleted an \"Individual VNF instance\" resource and the associated VNF instance identifier.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "vnfInstanceId", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"VnfIdentifierDeletionNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "VnfIdentifierDeletionNotification" + ] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "This type represents the links to resources that a notification can contain.\n", + "type": "object", + "required": [ + "vnfInstance", + "subscription" + ], + "properties": { + "vnfInstance": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot index 0e98a839675237e464331b4b0116d13b56d66da5..7a7e7008654bc461d6c2fbc6dafc76a9c1bcbcea 100644 --- a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index b95e714b431c8390479e48af6c1980abd42d0fdf..ca839fbe23f2cd01ff4e23f316d2372c1ba5cf6e 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -115,7 +115,7 @@ PATCH Individual VNF Performance Job - Precondition failed GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -123,7 +123,7 @@ GET individual VNF Performance Job GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -131,7 +131,7 @@ GET individual VNF Performance Job with invalid resource identifier Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -139,7 +139,7 @@ Send Delete request for individual VNF Performance Job Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -147,7 +147,7 @@ Send Delete request for individual VNF Performance Job with invalid resource ide Send Post request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -155,7 +155,7 @@ Send Post request for individual VNF Performance Job Send Put request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -166,7 +166,7 @@ Send Put request for individual VNF Performance Job Send Patch request for individual VNF Performance Job Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/PMJobModification.json PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index 9f038e8bba314409bf00c0c77ec2f537cb253bf9..38845b3bd2dc7f3e5f49c983e4de2d19a022107c 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -83,7 +83,7 @@ DELETE Individual Performance Report - Method not implemented Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -91,21 +91,21 @@ Get Individual Performance Report Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -115,7 +115,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -125,7 +125,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -137,7 +137,7 @@ Check Postcondition VNF Individual Performance Report Exists Check Postcondition VNF Individual Performance Report is not Created Log Trying to get a new report Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index d0e7bc3902550b66201bf8491a79309f2ef0f1ad..cab48da3d3caf3ed0d297de33f4be5777c10983e 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -114,7 +114,7 @@ PATCH Individual Threshold - Precondition failed GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -122,28 +122,28 @@ GET Individual VNF Performance Threshold GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -151,7 +151,7 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -162,7 +162,7 @@ Send Put request for individual VNF Performance Threshold Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL002/VNFPerformanceManagement-API/NotificationConsumer.robot b/SOL002/VNFPerformanceManagement-API/NotificationConsumer.robot index ed697e43e5766b032e9deae17189adddd2ebeb26..2d557051e46ab62efd224b801cdde84e1b202f47 100644 --- a/SOL002/VNFPerformanceManagement-API/NotificationConsumer.robot +++ b/SOL002/VNFPerformanceManagement-API/NotificationConsumer.robot @@ -1,71 +1,71 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library JSONLibrary -Library OperatingSystem -Library String -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Performance Information Availability Notification - [Documentation] Test ID: 6.3.3.10.1 - ... Test title: VNF Performance Information Availability Notification - ... Test objective: The objective is to test that VNF Performance Information Availability Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Performance Information Availability Notification - Check HTTP Response Status Code Is 204 - -VNF Threshold Crossed Notification - [Documentation] Test ID: 6.3.3.10.2 - ... Test title: VNF Threshold Crossed Notification - ... Test objective: The objective is to test that VNF Threshold Crossed Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF performance job is created, and a subscription for Threshold Crossed Notification is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Threshold Crossed Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} - Integer response status 200 - Validate Json response body PmJob.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response['status']} ${status} - Log Status code validated - -Post VNF Performance Information Availability Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/PerformanceInformationAvaliableNotification.json - ${body}= Format String ${template} objectInstanceId=${objectInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Threshold Crossed Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/ThresholdCrossedNotification.json - ${body}= Format String ${template} thresholdId=${thresholdId} objectInstanceId=${objectInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Library String +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Performance Information Availability Notification + [Documentation] Test ID: 6.3.3.10.1 + ... Test title: VNF Performance Information Availability Notification + ... Test objective: The objective is to test that VNF Performance Information Availability Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Performance Information Availability Notification + Check HTTP Response Status Code Is 204 + +VNF Threshold Crossed Notification + [Documentation] Test ID: 6.3.3.10.2 + ... Test title: VNF Threshold Crossed Notification + ... Test objective: The objective is to test that VNF Threshold Crossed Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF performance job is created, and a subscription for Threshold Crossed Notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Post VNF Performance Information Availability Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/PerformanceInformationAvaliableNotification.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/ThresholdCrossedNotification.json + ${body}= Format String ${template} thresholdId=${thresholdId} objectInstanceId=${objectInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 1c7dc8e97141fa336dd300e33108f817da233b99..4c976169a81beecb500c55e6bc6e740eb2ee56c3 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -208,7 +208,7 @@ GET all VNF Performance Monitoring Jobs with exclude_default and fields attribut GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -216,7 +216,7 @@ GET all VNF Performance Monitoring Jobs GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -224,7 +224,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -232,7 +232,7 @@ GET VNF Performance Monitoring Jobs with all_fields attribute selector GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -241,7 +241,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -249,7 +249,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -258,7 +258,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,7 +266,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -274,7 +274,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter GET VNF Performance Monitoring Jobs with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -283,7 +283,7 @@ Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} @@ -293,7 +293,7 @@ Send Post Request Create new VNF Performance Monitoring Job Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -301,7 +301,7 @@ Send PUT Request for all VNF Performance Monitoring Jobs Send PATCH Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -309,7 +309,7 @@ Send PATCH Request for all VNF Performance Monitoring Jobs Send DELETE Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -317,7 +317,7 @@ Send DELETE Request for all VNF Performance Monitoring Jobs Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -365,7 +365,7 @@ Check HTTP Response Body Matches all_fields selector Check HTTP Response Body Matches filter Log Checking that attribute-based filter is matched - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] Check HTTP Response Status Code Is diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 7505e15f2c3d31ba138dd298bbe8e22636954a7e..474f0200265b64689accbfeb1179c85e720d9b1c 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -141,7 +141,7 @@ GET Performance Thresholds for Bad Request Response too big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -149,7 +149,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} @@ -157,7 +157,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -165,14 +165,14 @@ GET Performance Thresholds with invalid attribute-based filter GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json @@ -183,7 +183,7 @@ Send Post Request Create new Performance Threshold Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -192,7 +192,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -201,7 +201,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -209,7 +209,7 @@ Send DELETE Request for all Performance Thresholds Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -218,7 +218,7 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${FILTER_OK} ,${SEPERATOR} + @{words} = Split String ${FILTER_OK} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] Check HTTP Response Status Code Is diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index f7468404c334b522d504d6c43ff87f39d055f7ed..a5e14818d05d7daa5e00898a6c7d2df4211ad173 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -20,7 +20,7 @@ Get all VNF Performance Subscriptions ... request and response data structures, and response codes. Set headers {"Accept": "application/json"} Set headers {"Content-Type": "application/json"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -39,7 +39,7 @@ Get all VNF Performance Subscriptions ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -59,7 +59,7 @@ Get VNF Performance Subscriptions with invalid attribute-based filters ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -78,7 +78,7 @@ Get VNF Performance Subscriptions with invalid resource endpoint ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -104,7 +104,7 @@ Send Post Request for VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} ${output}= Output response @@ -135,7 +135,7 @@ Send Post Request for Duplicated VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} ${output}= Output response @@ -156,7 +156,7 @@ Send Post Request for Duplicated VNF Performance Subscription Send Put Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -166,7 +166,7 @@ Send Put Request for VNF Performance Subscriptions Send Patch Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -176,7 +176,7 @@ Send Patch Request for VNF Performance Subscriptions Send Delete Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -185,40 +185,40 @@ Send Delete Request for VNF Performance Subscriptions Get Individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Subscription with invalid resource identifier Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription with invalid resource identifier Log Trying to delete a subscription in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -227,7 +227,7 @@ Send Put request for individual VNF Performance Threshold Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -246,7 +246,7 @@ Check Postcondition VNF Performance Subscription is Unmodified (Implicit) Check Postcondition VNF Performance Subscription is not Created Log Trying to get a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index b3453720a67c52a6a040ae8c4813cfe969a079cc..c71b69f3269bf79c92c335386939e902d17d71dd 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -12,7 +12,8 @@ ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${NEG_AUTHORIZATION} Bearer negativetoken ${FIELD_USAGE} 1 -${AUTHORIZATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTH_USAGE} 1 ${VNFM_DUPLICATION} 1 ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 @@ -43,7 +44,7 @@ ${newThresholdId} newThresholdId ${POS_FILTER} objectInstanceIds=${objectInstanceIds} ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,reports -${SEPERATOR} = +${SEPARATOR} = ${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 ${erroneousReportId} erroneousReportId diff --git a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot index 58a7d9039124a3cbf90069d244a6b298197481eb..b8bffd4c69e5d96ad2d634c318fec76c270d1a40 100644 --- a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot +++ b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot @@ -86,8 +86,10 @@ Configure Notification Performance Information Available Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,8 +98,10 @@ Configure Notification Threshold Crossed Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFFaultManagement-API/Alarms.robot b/SOL003/VNFFaultManagement-API/Alarms.robot index 69001f4075e0230bb8181c1d90f94ebdddf01e39..c0dd85276f3405a8a3dd4111c2a7e15013c810d1 100644 --- a/SOL003/VNFFaultManagement-API/Alarms.robot +++ b/SOL003/VNFFaultManagement-API/Alarms.robot @@ -70,7 +70,7 @@ GET information about multiple alarms with "all_fields" attribute selector ... Post-Conditions: none GET Alarms Task with all_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with exclude_default attribute selector [Documentation] Test ID: 7.3.5.1.6 @@ -83,7 +83,7 @@ GET information about multiple alarms with exclude_default attribute selector ... Post-Conditions: none GET Alarms Task with exclude_default attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with fields attribute selector [Documentation] Test ID: 7.3.5.1.7 @@ -96,7 +96,7 @@ GET information about multiple alarms with fields attribute selector ... Post-Conditions: none GET Alarms Task with fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with "exclude_fields" attribute selector [Documentation] Test ID: 7.3.5.1.8 @@ -109,7 +109,7 @@ GET information about multiple alarms with "exclude_fields" attribute selector ... Post-Conditions: none GET Alarms Task with exclude_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms PUT Alarms - Method not implemented [Documentation] Test ID: 7.3.5.1.9 diff --git a/SOL003/VNFFaultManagement-API/ApiVersion.robot b/SOL003/VNFFaultManagement-API/ApiVersion.robot index b265a9a56fafaace854e7e3308c77821b30eae9f..6c7d8bddf0c6c4c904cbd04666ad14493c62962e 100644 --- a/SOL003/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL003/VNFFaultManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index b833c935478b792b47eae18e374d2b4511b96b15..6b9dcd2d7690b054fc346a37e701437811ac7d24 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -5,6 +5,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem +Library MockServerLibrary #Suite Teardown Terminate All Processes kill=true Library Process @@ -13,9 +14,14 @@ Library Process ${original_etag} 1234 *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Check created Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Integer response status 200 Check Postcondition FaultManagement Subscription Is Set @@ -37,13 +43,13 @@ Check Precondition VNF fault management individual alarm Exists Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check Individual Subscription deleted Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 404 @@ -72,7 +78,7 @@ Check HTTP Response Header ContentType is Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -85,7 +91,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Send POST request for fault management Alarms log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -93,7 +99,7 @@ Send POST request for fault management Alarms PATCH Fault management Alarms log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse} = Output response Set Global Variable ${response} ${outputResponse} @@ -101,7 +107,7 @@ PATCH Fault management Alarms PUT Fault management Alarms 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -109,7 +115,7 @@ PUT Fault management Alarms DELETE Fault management Alarms log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -117,7 +123,7 @@ DELETE Fault management Alarms GET Fault Management Alarms Log Query NFVO The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response @@ -126,7 +132,7 @@ GET Fault Management Alarms GET Fault Management Alarms With Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${nsInstanceId} ${outputResponse}= Output response @@ -135,7 +141,7 @@ GET Fault Management Alarms With Filters GET Fault Management Alarms With Invalid Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} ${outputResponse}= Output response @@ -144,7 +150,7 @@ GET Alarms Task with all_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -152,7 +158,7 @@ GET Alarms Task with exclude_default attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -160,7 +166,7 @@ GET Alarms Task with fields attribute selector Log Trying to get all alarms present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -168,14 +174,14 @@ GET Alarms Task with exclude_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Send POST request for fault management Individual Alarm 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -183,7 +189,7 @@ Send POST request for fault management Individual Alarm DELETE Fault Management Individual Alarm log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -191,7 +197,7 @@ DELETE Fault Management Individual Alarm PUT Fault Management Individual Alarm 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -200,7 +206,7 @@ GET Fault Management Individual Alarm Log Query VNF The GET method queries information about an alarm. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${etag} Output response headers ETag @@ -212,7 +218,7 @@ GET Fault Management Individual Alarm with invalid id Log Query NFVO The GET method queries information about an invalid alarm. Should return does not exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${invalidAlarmId} ${outputResponse}= Output response @@ -222,7 +228,7 @@ PATCH Fault Management Individual 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -233,7 +239,7 @@ PATCH Fault Management Individual Alarm - precondition failed 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -244,7 +250,7 @@ PATCH Fault Management Individual Alarm Conflict 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -254,41 +260,59 @@ POST Subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send POST Request for duplicated subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send POST Request for duplicated subscription not permitted Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 1 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -296,7 +320,7 @@ GET Subscriptions GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -304,42 +328,42 @@ GET Subscriptions with filter GET Subscriptions with Invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT Subscriptions log Trying to perform a PUT Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -347,7 +371,7 @@ PUT Subscriptions PATCH Subscriptions log Trying to perform a PATCH Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -355,7 +379,7 @@ PATCH Subscriptions DELETE Subscriptions log Trying to perform a DELETE Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -363,7 +387,7 @@ DELETE Subscriptions POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -371,7 +395,7 @@ POST Individual Subscription GET Individual Subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -379,7 +403,7 @@ GET Individual Subscription PUT Individual Subscription 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -387,7 +411,7 @@ PUT Individual Subscription PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -395,7 +419,7 @@ PATCH Individual Subscription DELETE Individual Subscription log Trying to perform a DELETE. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -407,7 +431,7 @@ Check HTTP Response Header Contain Link Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -418,7 +442,7 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -431,7 +455,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -444,7 +468,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -457,7 +481,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -470,7 +494,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFFaultManagement-API/NotificationConsumer.robot b/SOL003/VNFFaultManagement-API/NotificationConsumer.robot index b8cb18b900d5d60690bd76cab7f81ac46d7dce9e..17ea2227b76deb6104afd865e783cbaf9098f930 100644 --- a/SOL003/VNFFaultManagement-API/NotificationConsumer.robot +++ b/SOL003/VNFFaultManagement-API/NotificationConsumer.robot @@ -1,94 +1,94 @@ -*** Settings *** -Library String -Library OperatingSystem -Resource environment/variables.txt -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Fault Alarm Notification - [Documentation] Test ID: 7.3.5.7.1 - ... Test title: VNF Fault Alarm Notification - ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Notification. - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post Alarm Notification - Check HTTP Response Status Code Is 204 - -VNF Fault Alarm Cleared Notification - [Documentation] Test ID: 7.3.5.7.2 - ... Test title: VNF Fault Alarm Cleared Notification - ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Cleared Notification. - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post Alarm Cleared Notification - Check HTTP Response Status Code Is 204 - -VNF Fault Alarm List Reulit Notification - [Documentation] Test ID: 7.3.5.7.3 - ... Test title: VNF Fault Alarm List Rebuilt Notification - ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm List Rebuilt Notification. - ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post Alarm List Rebuilt Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body FmSubscriptions.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Log Validate Status code - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Alarm Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm Cleared Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmClearedNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm List Rebuilt Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmListRebuiltNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library OperatingSystem +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Fault Alarm Notification + [Documentation] Test ID: 7.3.5.7.1 + ... Test title: VNF Fault Alarm Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm Cleared Notification + [Documentation] Test ID: 7.3.5.7.2 + ... Test title: VNF Fault Alarm Cleared Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Cleared Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm List Reulit Notification + [Documentation] Test ID: 7.3.5.7.3 + ... Test title: VNF Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm List Rebuilt Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscriptions.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Log Validate Status code + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index 6a98f35f88f233fa25a26c47382b7dc286ed80fe..f41f45a648232cb744e525e62acdf4cb8697d506 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -6,6 +6,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new Fault Management alarm subscription diff --git a/SOL003/VNFFaultManagement-API/environment/variables.txt b/SOL003/VNFFaultManagement-API/environment/variables.txt index 8f264481e50b8ab3ffd3d6fc692e449baf259078..f8bfd19c33527b65c64c46af1a2cc6da4ca34ca3 100644 --- a/SOL003/VNFFaultManagement-API/environment/variables.txt +++ b/SOL003/VNFFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${ACCEPT} application/json ${ACCEPT_JSON} application/json @@ -57,4 +58,6 @@ ${callback_endpoint} /subscribe ${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${callbackResp} localhost \ No newline at end of file +${callbackResp} localhost + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file diff --git a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot b/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot index 78e8209e15cffeb6a3a1d640c869bdb00e49259b..ded07dadcaa6257a27531822276f3ad11239ac1b 100644 --- a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot +++ b/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot @@ -113,8 +113,10 @@ Configure Notification Alarm List Rebuilt Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -123,8 +125,10 @@ Configure Notification Alarm Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -133,8 +137,10 @@ Configure Notification Alarm Cleareance Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index 4c8aa20c19c459b8de13eea05751cc9234b1403a..819592ceb239228e6114854ebc0b370c890343e5 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/NotificationConsumer.robot b/SOL003/VNFIndicator-API/NotificationConsumer.robot index 3fccae93e2b65dec12c373b0d1a29f0424715e8a..cf38225629b77600747963a21018740d722ad921 100644 --- a/SOL003/VNFIndicator-API/NotificationConsumer.robot +++ b/SOL003/VNFIndicator-API/NotificationConsumer.robot @@ -1,46 +1,46 @@ -*** Settings *** -Library String -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library OperatingSystem -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Indicator Value Change Notification - [Documentation] Test ID: 7.3.6.7.1 - ... Test title: VNF Indicator Value Change Notification - ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification. - ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. - ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post VNF Indicator Value Change Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body VnfIndicatorSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post VNF Indicator Value Change Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Indicator Value Change Notification + [Documentation] Test ID: 7.3.6.7.1 + ... Test title: VNF Indicator Value Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification. + ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF Indicator Value Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VnfIndicatorSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Indicator Value Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 1623f460cfec6462007f7e5a5d8df28f97ec9810..7c6cbd5ecddad71a685acec70e11425c93ac9be7 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -14,7 +14,7 @@ Library String Get All VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -30,7 +30,7 @@ Get All VNF Indicators Subscriptions Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -46,7 +46,7 @@ Get VNF Indicators Subscriptions with filter Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -63,7 +63,7 @@ Get VNF Indicators Subscriptions with invalid filter Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -99,21 +99,19 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint - # Integer response status 201 - # Log Received 201 Created as expected - # ${headers}= Output response headers - # Should Contain ${headers} Location - # Log Response has header Location - # ${result}= Output response body - # Validate Json VnfIndicatorSubscription.schema.json ${result} - # Log Validation of VnfIndicatorSubscription OK + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint @@ -122,25 +120,25 @@ Send Post Request for Duplicated VNF indicator Subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 201 - # Log Received 201 Created as expected - # ${headers}= Output response headers - # Should Contain ${headers} Location - # Log Response has header Location - # ${result}= Output response body - # Validate Json VnfIndicatorSubscription.schema.json ${result} - # Log Validation of VnfIndicatorSubscription OK + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Indicator Subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -149,7 +147,7 @@ Send Put Request for VNF Indicator Subscriptions Send Patch Request for VNF Indicator Subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -158,7 +156,7 @@ Send Patch Request for VNF Indicator Subscriptions Send Delete Request for VNF Indicator Subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +193,7 @@ Check Postcondition VNF Indicator Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If Should Not Be Equal As Strings ${location} Location GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If Should Be Equal As Strings ${location} Location GET ${response['headers']['Location']} ${output}= Output response @@ -225,7 +223,7 @@ Check HTTP Response Header Contains Get all VNF indicators Log The GET method queries multiple VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -235,7 +233,7 @@ Get all VNF indicators Get VNF indicators with filter Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response @@ -244,7 +242,7 @@ Get VNF indicators with filter Get VNF indicators with invalid filter Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response @@ -254,7 +252,7 @@ Get all VNF indicators with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -264,7 +262,7 @@ Get all VNF indicators with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -282,7 +280,7 @@ Get all VNF indicators without authorization token Get all VNF indicators with invalid resource endpoint Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response @@ -291,7 +289,7 @@ Get all VNF indicators with invalid resource endpoint Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -299,7 +297,7 @@ Send POST Request for all VNF indicators Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -307,7 +305,7 @@ Send PUT Request for all VNF indicators Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -315,7 +313,7 @@ Send PATCH Request for all VNF indicators Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -327,15 +325,15 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - @{attr} = Split String ${POS_FIELDS} ,${VAR_SEPERATOR} - @{var_name} = Split String @{attr}[0] ,${SEPERATOR} - @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FIELDS} ${VAR_SEPARATOR} + @{var_name} = Split String @{attr}[0] ${SEPARATOR} + @{var_id} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -343,7 +341,7 @@ Get all indicators for a VNF instance Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -351,7 +349,7 @@ Get all indicators for a VNF instance with filter Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -359,7 +357,7 @@ Get all indicators for a VNF instance with invalid filter Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -367,7 +365,7 @@ Get all indicators for a VNF instance with invalid resource identifier Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -375,7 +373,7 @@ Send POST Request for indicators in VNF instance Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -383,7 +381,7 @@ Send PUT Request for indicators in VNF instance Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -391,7 +389,7 @@ Send PATCH Request for indicators in VNF instance Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -403,7 +401,7 @@ Check HTTP Response Body Includes Requested VNF Instances ID Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -411,7 +409,7 @@ Get Individual Indicator for a VNF instance Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -419,7 +417,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -427,7 +425,7 @@ Send POST Request for individual indicator in VNF instance Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -435,7 +433,7 @@ Send PUT Request for individual indicator in VNF instance Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -443,7 +441,7 @@ Send PATCH Request for individual indicator in VNF instance Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -465,7 +463,7 @@ Check Postcondition Indicator for VNF instance Exist GET Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -473,7 +471,7 @@ GET Individual VNF Indicator Subscription GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -481,7 +479,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -489,14 +487,14 @@ Send Delete Request for Individual VNF Indicator Subscription Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -504,7 +502,7 @@ Send Post Request for Individual VNF Indicator Subscription Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -514,7 +512,7 @@ Send Put Request for Individual VNF Indicator Subscription Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -527,8 +525,7 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted GET Individual VNF Indicator Subscription Check HTTP Response Status Code Is 404 -Create Sessions - Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run +Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} diff --git a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot b/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot index 79cd22af028338c242c5058daff753d9b3b224a6..ee235b0b1b89a5c7f5c58c3cee4bcd1f10cce533 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot @@ -49,8 +49,10 @@ Configure Notification Indicator Value Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 5d4253fc230fc7b168611778196dddda011b1be7..86318fb44dfdd9ff67f49a644ff49b79b897c7b5 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -3,9 +3,10 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json @@ -34,9 +35,6 @@ ${notification_response} [] ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${callback} http://172.22.1.7:${callback_port} -${callback_subscribe} /vnfind/subscribes - ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${erroneousSubscriptionId} erroneousSubscriptionId @@ -59,7 +57,7 @@ ${POS_FIELDS} name=vnfIndicator ${NEG_FIELDS} wrongName=any_value -${SEPERATOR} = -${VAR_SEPERATOR} & +${SEPARATOR} = +${VAR_SEPARATOR} & ${callbackResp} localhost \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/jsons/subscriptions.json b/SOL003/VNFIndicator-API/jsons/subscriptions.json index d48f9f99d93e26c87ee3b5fc177aa499f1548cfd..42d0689a0f9d60aec42c28ef437bfefe5a526959 100644 --- a/SOL003/VNFIndicator-API/jsons/subscriptions.json +++ b/SOL003/VNFIndicator-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ {{ - "callbackUri": "{callback}{callback_subscribe}" + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" }} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot index e19b65ac98d57e3751241a03251d4b6ab1672c7d..5c35bdd70afa6a316390193df10d3bc03299410c 100644 --- a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index af06dc10cd79223fcac2876def272b3574c1fbd3..92461b333583732f62ff7d1136be9ccbc7345ec0 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -11,7 +11,7 @@ POST Cancel operation task [Documentation] Test ID: 7.3.1.16.1 ... Test title: POST Cancel operation task ... Test objective: The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. - ... Pre-conditions: the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. + ... Pre-conditions: The "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none @@ -24,12 +24,12 @@ POST Cancel operation task Conflict [Documentation] Test ID: 7.3.1.16.2 ... Test title: POST Cancel operation task Conflict ... Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state - ... Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state + ... Pre-conditions: The "VNF LCM operation occurrence" is not in STARTING, PROCESSING or ROLLING_BACK state ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Cancel operation task + POST Cancel operation task with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -37,12 +37,12 @@ POST Cancel operation task Not Found [Documentation] Test ID: 7.3.1.16.3 ... Test title: POST Cancel operation task Not Found ... Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the resource is not found - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Cancel operation task + POST Cancel operation task not existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot index 9cdf4abd82f9597a29d782eabf91029b45d40789..28738b8e5888e7e49f0daf2a50e50bd977419e5a 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot @@ -52,17 +52,17 @@ Initialize System Create Sessions Precondition Checks - STARTING - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState STARTING Check Postcondition VNF Cancel - STARTING - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState ROLLED_BACK Check Postcondition VNF Cancel - PROCESSING - ROLLING_BACK - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index 4c74ec566b17544c3084c158f87befd73311accd..93a4003e08a9d345765a899c8b0b19fc5d5d5a15 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -29,7 +29,7 @@ POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Change VNF deployment flavour + POST Change VNF deployment flavour of NOT-INSTANTIATED VNF Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -42,7 +42,7 @@ POST Change deployment flavour of a vnfInstance Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Change VNF deployment flavour + POST Change VNF deployment flavour of not existing VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index 89132cbef4ba4bc2342d199cfd345a1e0d62969f..3d3cb58773a202132e07aa471339b3483af8cb21 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -30,7 +30,7 @@ Post Fail operation task Conflict (Not-FAILED_TEMP) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Fail operation + Post Fail operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -43,7 +43,7 @@ Post Fail operation task Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Fail operation + Post Fail operation not existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot index 1eff9a23fe98d5f45e42c37c4c241509e5c022cc..e7bdd1e7428e4748b4818c758d77a5a130f18fe2 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot @@ -31,7 +31,7 @@ Initialize System Create Sessions Check Postcondition VNF Fail - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot index f8858ab0f72a9992a5b4897646484b3f8082e27e..ca6daf95ba835959dcdfac6d842864027c78f19c 100644 --- a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot @@ -29,7 +29,7 @@ POST Heal a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Heal VNF + POST Heal VNF Not Instantiated Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -42,7 +42,7 @@ POST Heal a vnfInstance Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Heal VNF + POST Heal VNF Not Existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index cca0474cbb4e2e22e81136c5a091dd389584a8c9..b87e388bad3a350616de9e2b756ca39db8766fe1 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -109,7 +109,7 @@ DELETE Individual VNFInstance Conflict ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: Resources are not deleted - DELETE individual vnfInstance + DELETE individual vnfInstance in INSTANTIATED state Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails Check resource existence @@ -131,6 +131,6 @@ Get Information about an individual VNF Instance - Not Found Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 85bc89adc46f71cb9563bc30cd8a1c7b5cdf4433..823f35ca99d4ea17cbca8d93a21f967237568a29 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -6,77 +6,78 @@ Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** -Post Individual VNF LCM Operation occurrences - Method not implemented +Post Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.1 - ... Test title: Post Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: Post Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Individual VNF LCM Operation occurrences + Post Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -Get Individual VNF LCM Operation occurrences +Get Individual VNF LCM OP occurrence [Documentation] Test ID: 7.3.1.12.2 - ... Test title: Get Individual VNF LCM Operation occurrences - ... Test objective: The objective is to test that this method retrieve information about a VNF lifecycle management operation occurrence + ... Test title: Get Individual VNF LCM OP occurrence + ... Test objective: The objective is to test that this method retrieve a VNF lifecycle management operation occurrence and perform a JSON schema validation of the returned data structure ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Get Individual VNF LCM Operation occurrences + Get Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body Json Schema Is VnfLcmOpOcc Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor -PUT Individual VNF LCM Operation occurrences - Method not implemented +PUT Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.3 - ... Test title: PUT Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: PUT Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Put multiple VNF instances + Put Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -PATCH Individual VNF LCM Operation occurrences - Method not implemented +PATCH Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.4 - ... Test title: PATCH Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: PATCH Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Patch multiple VNF instances + Patch Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 - DELETE Individual VNF LCM Operation occurrences - Method not implemented +DELETE Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.5 - ... Test title: DELETE Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: DELETE Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Delete multiple VNF instances + Delete Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 - -Get Individual VNF LCM Operation occurrences - Not Found + +Get Individual VNF LCM Operation occurrence - Not Found [Documentation] Test ID: 7.3.1.12.6 - ... Test title: Get Individual VNF LCM Operation occurrences - Not Found + ... Test title: Get Individual VNF LCM Operation occurrence - Not Found ... Test objective: The objective is to test that the retrieval of VNF lifecycle management operation occurrence fails when instance is not present. ... Pre-conditions: none ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Get Individual VNF LCM Operation occurrences + Get Individual VNF LCM OP occurrence with invalid resource identifier Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 1bba6b87b4e0110498dd3e87dbfc93df3bc34a26..5a2275f778739041f9f5e1fc04e3fc34b7ec2dea 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -30,7 +30,7 @@ Instantiate a vnfInstance Conflict ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST instantiate individual vnfInstance + POST instantiate individual vnfInstance with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot index f9e48ae388812c2493225e802c61dfe63534d4de..3b2377c2ddc3fe6e80872d12d46684b38503902c 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot @@ -38,7 +38,7 @@ Send VNF Instantiation Request Log Instantiate a VNF Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/instantiateVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} diff --git a/SOL003/VNFLifecycleManagement-API/NotificationConsumer.robot b/SOL003/VNFLifecycleManagement-API/NotificationConsumer.robot index 9e27f5bc7040a2c204c662ca90fb04f892a1c3da..8310ce197f0383a3ae699ed358f40e1b1cdc009b 100644 --- a/SOL003/VNFLifecycleManagement-API/NotificationConsumer.robot +++ b/SOL003/VNFLifecycleManagement-API/NotificationConsumer.robot @@ -1,92 +1,92 @@ -*** Settings *** -Library String -Library OperatingSystem -Resource environment/variables.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF LCM Operation Occurrence Notification - [Documentation] Test ID: 7.3.1.36.1 - ... Test title: VNF LCM Operation Occurrence Notification - ... Test objective: The objective is to test that the POST request triggers VNF LCM Operation Occurrence Notification. - ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post VNF LCM Operation Occurrence Notification - Check HTTP Response Status Code Is 204 - -VNF Identifier Creation Notification - [Documentation] Test ID: 7.3.1.36.2 - ... Test title: VNF Identifier Creation Notification - ... Test objective: The objective is to test that the POST request triggers VNF Identifier Creation Notification. - ... Pre-conditions: A subscription for VNF identifier creation cotification is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post VNF Identifier Creation Notification - Check HTTP Response Status Code Is 204 - -VNF Identifier Deletion Notification - [Documentation] Test ID: 7.3.1.36.3 - ... Test title: VNF Identifier Deletion Notification - ... Test objective: The objective is to test that the POST request triggers VNF Identifier Deletion Notification. - ... Pre-conditions: A subscription for VNF identifier deletion notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post VNF LCM Operation Occurrence Notification - Check HTTP Response Status Code Is 204 -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body Subscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post VNF LCM Operation Occurrence Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Identifier Creation Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfIdentifierCreationNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Identifier Deletion Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfIdentifierDeletionNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library OperatingSystem +Resource environment/variables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF LCM Operation Occurrence Notification + [Documentation] Test ID: 7.3.1.36.1 + ... Test title: VNF LCM Operation Occurrence Notification + ... Test objective: The objective is to test that the POST request triggers VNF LCM Operation Occurrence Notification. + ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 + +VNF Identifier Creation Notification + [Documentation] Test ID: 7.3.1.36.2 + ... Test title: VNF Identifier Creation Notification + ... Test objective: The objective is to test that the POST request triggers VNF Identifier Creation Notification. + ... Pre-conditions: A subscription for VNF identifier creation cotification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF Identifier Creation Notification + Check HTTP Response Status Code Is 204 + +VNF Identifier Deletion Notification + [Documentation] Test ID: 7.3.1.36.3 + ... Test title: VNF Identifier Deletion Notification + ... Test objective: The objective is to test that the POST request triggers VNF Identifier Deletion Notification. + ... Pre-conditions: A subscription for VNF identifier deletion notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body Subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF LCM Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot index b956fd49bf149c8840f220c8189910668e541709..fd51a9ed61223157dc8da25c66008429291c5ead 100644 --- a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -97,8 +97,10 @@ Configure Notification VNF LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -119,8 +121,10 @@ Configure Notification VNF LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is @@ -141,8 +145,10 @@ Configure Notification VNF Identifier Creation Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -163,8 +169,10 @@ Configure Notification VNF Identifier Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index 462955700bde1eec0cb296633ea293f8eee97a9f..f0d227b3e58eac340510a596ab5f22c5e47fd4bf 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -31,7 +31,7 @@ POST Operate a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Operate VNF + POST Operate VNF with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -44,7 +44,7 @@ POST Operate a vnfInstance Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Operate VNF + POST Operate VNF not existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -100,6 +100,6 @@ DELETE Operate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index 63a4f79658aaf29cbffe2e370c386dbd9579ad77..8f52055f4feda9daca0b6a55c39d589a3f76d095 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -32,7 +32,7 @@ Post Retry operation task Conflict (Not-FAILED_TEMP) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Retry operation + Post Retry operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -45,7 +45,7 @@ Post Retry operation task Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Retry operation + Post Retry operation not existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -100,6 +100,6 @@ DELETE Retry operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot index bf4db381d3cce20eb4be062527cae3f5b24ce359..c512576c836472413bdc6f4a0b1bf4114ccb4404 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot @@ -42,12 +42,12 @@ Retry VNF LCM Operation - Unsuccessful *** Keywords *** Check Postcondition VNF Retry Successful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState COMPLETED Check Postcondition VNF Retry Unsuccessful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP diff --git a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot index 3e42be057e6a23f40d775365a56d26a1dc553349..d3787aecab70dbbdd913f0719a9f4c60dfc49b21 100644 --- a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot @@ -48,12 +48,12 @@ Initialize System Create Sessions Check Postcondition VNF Roll Back Successful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState ROLLED_BACK Check Postcondition VNF Roll Back Unsuccessful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index 88134209416fd46181e2df3814e234de49049761..34443682d30bf58c8a38c7c36f13894f49267ec2 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -31,7 +31,7 @@ POST Rollback operation task Conflict (Not-FAILED_TEMP) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Rollback operation + Post Rollback operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -44,7 +44,7 @@ POST Rollback operation task Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Rollback operation + Post Rollback operation not existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -99,6 +99,6 @@ DELETE Rollback operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot index e0b40633ea685d0aa29b7f600566fde25fe63a71..5d6da78eec3cc8ca7194d3ca133d9ff28330fbf1 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -30,7 +30,7 @@ POST Scale a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance + POST Scale vnfInstance with VNF NOT-INSTANTIATED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -43,7 +43,7 @@ POST Scale a vnfInstance Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance + POST Scale vnfInstance with not existing VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -99,6 +99,6 @@ DELETE Scale VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 7c483b568f19ba901e761b7741356f7216af0fa2..0b9f1c50db8296d53a4cea88adcbf4d0141731d8 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -29,7 +29,7 @@ POST Scale a vnfInstance to level Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance to level + POST Scale vnfInstance to level with VNF NOT-INSTANTIATED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -42,7 +42,7 @@ Scale a vnfInstance Not Found ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Scale vnfInstance to level + POST Scale vnfInstance to level with not existing VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot index 6c858da6778dcf28a3741d02d49289ef72298ea3..cc358f27c591738d00059a4b8979dfb1fa7f8242 100644 --- a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot @@ -13,18 +13,13 @@ Library MockServerLibrary Check subscriptions about one VNFInstance and operation type [Arguments] ${vnfInstanceId} ${notificationType} ${operationType}="" ${operationState}="" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${notificationType}=="VnfIdentifierCreationNotification" or ${notificationType}=="VnfIdentifierDeletionNotification" GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType} ... ELSE GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType}&operationTypes=${operationType}&operationStates=${operationState} Integer response status 200 Array response body minItems=1 ${body} Output response body [Return] ${body} - -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} Configure Notification Status Handler [Arguments] ${endpoint} ${status}="" diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index f3b21019581b63f29572efe901a68fccf10a39dd..a8ee0fba17d15a066d17e8bc83cacc0da4c663a4 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -5,7 +5,9 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot - +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription @@ -24,7 +26,7 @@ POST Create a new subscription Create a new Subscription - DUPLICATION [Documentation] Test ID: 7.3.1.17.2 ... Test title: POST Create a new subscription - DUPLICATION - ... Test objective: The objective is to test request to create a duplicate (same cakkbackurl and filter) subscription + ... Test objective: The objective is to test request to create a duplicate (same callbackurl and filter) subscription ... Pre-conditions: none ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot index 9df78c58b812a0e902ba849e9a5c167d56e18208..aa110655b57a022a0bb32effa3749b448381955b 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -30,8 +30,8 @@ POST Terminate a vnfInstance Conflict (Not-Instantiated) ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Terminate VNF - Check HTTP Response Status Code Is 202 + POST Terminate VNF in NOT-INSTANTIATED state + Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -87,6 +87,6 @@ DELETE Terminate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 39ff4a627acaaa440c560f3387c6686c86e9ea4f..aa04c1b31c8a69cda58be2b9e65c512f7ccf040c 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -7,16 +7,22 @@ Library OperatingSystem Library BuiltIn Library JSONLibrary Library Collections +Library Process Library JSONSchemaLibrary schemas/ -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Get Vnf Instance [Arguments] ${vnfInstanceId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}= Output response body [Return] ${body} @@ -54,7 +60,7 @@ Check VNF Instance [Arguments] ${vnfId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfId} Check VNF Status @@ -63,12 +69,12 @@ Check VNF Status Log VNF Status in the correct status Check operation resource state is FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FAILED_TEMP Check operation resource state is FINALLY_FAILED - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FINALLY_FAILED Get Vnf Scale Info @@ -103,7 +109,7 @@ Send VNF Scale Out Request 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfOutRequest.json ${json}= evaluate json.loads('''${body}''') json ${aspectId}= Set Variable ${json.aspectId} @@ -114,7 +120,7 @@ Send VNF Scale To Level Request 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfToLevelRequest.json ${json}= evaluate json.loads('''${body}''') json ${aspectId}= Set Variable ${json.aspectId} @@ -124,7 +130,7 @@ Send VNF Instance Resource Create Request Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/createVnfRequest.json ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersion= ${Descriptor_Version} flavourId=${Flavour_ID} @@ -132,14 +138,14 @@ Send VNF Instance Resource Create Request Send VNF Instance Resource Delete Request log Delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Send Change VNF Flavour Request 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeVnfFlavourRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} @@ -147,7 +153,7 @@ Send Change VNF Operational State Request 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/operateVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} @@ -155,7 +161,7 @@ Send Heal VNF Request 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/healVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} @@ -163,7 +169,7 @@ Send Change Ext Connectivity Request Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} @@ -171,7 +177,7 @@ Send Terminate VNF Request Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/terminateVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} @@ -179,28 +185,28 @@ Send Info Modification Request Log Trying to update information of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/patchBodyRequest.json ${response}= Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} Send Retry Operation Request Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry Send Roll back Operation Request Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback Send Fail Operation Request Log Fail a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail Send Cancel Operation Request Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} Create a new Grant - Synchronous mode @@ -209,7 +215,7 @@ Create a new Grant - Synchronous mode Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/grantRequest.json ${json_body}= evaluate json.loads('''${body}''') json Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} @@ -231,7 +237,7 @@ Create a new Grant - Asynchronous mode Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/grantRequest.json ${json_body}= evaluate json.loads('''${body}''') json Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} @@ -248,23 +254,41 @@ Create a new Grant - Asynchronous mode POST Cancel operation task Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Cancel a VNF lifecycle operation Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} Log Validate Status code ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +POST Cancel operation task with conflict + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Cancel a VNF lifecycle operation + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotStartingProcessingRollingback}/cancel ${CancelMode} + Log Validate Status code + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Cancel operation task not existing + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Cancel a VNF lifecycle operation + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/cancel ${CancelMode} + Log Validate Status code + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -278,7 +302,7 @@ PATCH Cancel operation task DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -287,7 +311,7 @@ POST Change External VNF Connectivity Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} ${outputResponse}= Output response @@ -295,14 +319,14 @@ POST Change External VNF Connectivity GET Change External VNF Connectivity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change External VNF Connectivity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -316,7 +340,7 @@ PATCH Change External VNF Connectivity DELETE Change External VNF Connectivity Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -325,24 +349,46 @@ POST Change VNF deployment flavour 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/changeVnfFlavourRequest.json ${body}= Format String ${template} newFlavourId=${Flavour_ID} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} + +POST Change VNF deployment flavour of NOT-INSTANTIATED VNF + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/change_flavour ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Change VNF deployment flavour of not existing VNF + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/change_flavour ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Change VNF deployment flavour log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change VNF deployment flavour log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -356,7 +402,7 @@ PATCH Change VNF deployment flavour DELETE Change VNF deployment flavour Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -365,7 +411,7 @@ POST Create a new vnfInstance Log Create VNF instance by POST to /vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/createVnfRequest.json ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersion= ${Descriptor_Version} @@ -377,7 +423,7 @@ GET multiple vnfInstances Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response @@ -387,7 +433,7 @@ GET multiple vnfInstances with bad attribute Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response @@ -397,7 +443,7 @@ GET multiple vnfInstances with bad filter Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response @@ -406,35 +452,35 @@ GET multiple vnfInstances with bad filter GET multiple vnfInstances with all_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default attribute selector Log Query status information about multiple VNF instances using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default and fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -443,7 +489,7 @@ PUT VNFInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${output}= Output response Set Suite Variable ${response} ${output} @@ -452,7 +498,7 @@ PATCH VNFInstances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${output}= Output response Set Suite Variable ${response} ${output} @@ -461,7 +507,7 @@ DELETE VNFInstances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${output}= Output response Set Suite Variable ${response} ${output} @@ -470,7 +516,7 @@ POST individual vnfInstance log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -479,7 +525,7 @@ GET individual vnfInstance log Trying to get information about an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -488,7 +534,7 @@ PUT individual vnfInstance log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -497,7 +543,7 @@ PATCH individual vnfInstance log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/patchBodyRequest.json ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version} @@ -507,44 +553,60 @@ PATCH individual vnfInstance DELETE individual vnfInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +DELETE individual vnfInstance in INSTANTIATED state + log Trying to delete an individual VNF instance + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} POST instantiate individual vnfInstance 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/instantiateVnfRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST instantiate individual vnfInstance with conflict + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/instantiateVnfRequest.json + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/instantiate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -552,17 +614,37 @@ POST Scale vnfInstance 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/scaleVnfRequest.json ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance with VNF NOT-INSTANTIATED + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfRequest.json + ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance with not existing VNF + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfRequest.json + ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance Log Trying to get a scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -571,7 +653,7 @@ PUT Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -580,7 +662,7 @@ PATCH Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -589,7 +671,7 @@ DELETE Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response @@ -598,36 +680,56 @@ POST Scale vnfInstance to level Log Trying to scale a vnf Instance to level Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/scaleVnfToLevelRequest.json ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance to level with VNF NOT-INSTANTIATED + Log Trying to scale a vnf Instance to level + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale_to_level ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance to level with not existing VNF + Log Trying to scale a vnf Instance to level + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/scale_to_level ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance to level log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance to level log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -636,37 +738,48 @@ POST Terminate VNF Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/terminateVnfRequest.json ${body}= Format String ${template} terminationType=${terminationType} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Terminate VNF in NOT-INSTANTIATED state + Log Trying to terminate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/terminate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Terminate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Terminate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -675,37 +788,59 @@ POST Heal VNF 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/healVnfRequest.json ${body}= Format String ${template} healingCause=${healingCause} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +POST Heal VNF Not Instantiated + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Heal VNF Not Existing + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Heal VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Heal VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -714,37 +849,59 @@ POST Operate VNF Log Trying to operate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/operateVnfRequest.json ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +POST Operate VNF with conflict + Log Trying to operate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/operate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Operate VNF not existing + Log Trying to operate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/operate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Operate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Operate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -752,14 +909,14 @@ DELETE Operate VNF Post VNF LCM Operation occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM Operation occurrences 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response @@ -767,120 +924,167 @@ GET VNF LCM Operation occurrences GET VNF LCM Operation occurrences invalid attribute 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM Operation occurrences invalid filter 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get VNF LCM Operation occurrences with all_fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_default and fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_default attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT VNF LCM Operation occurrences 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH VNF LCM Operation occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE VNF LCM Operation occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Individual VNF LCM Operation occurrences +Post Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Get Individual VNF LCM Operation occurrences - Log Query status information about multiple VNF lifecycle management operation occurrences. + +Get Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Get Individual VNF LCM OP occurrence with invalid resource identifier + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Put Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Patch Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Delete Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch multiple VNF instances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete multiple VNF instances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Retry operation Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} +Post Retry operation with conflict + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/retry + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Retry operation not existing + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} Get Retry operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response @@ -888,35 +1092,49 @@ Get Retry operation Put Retry operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Retry operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Retry operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Rollback operation Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Rollback operation with conflict + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/rollback + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Rollback operation not existing + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Rollback operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response @@ -924,35 +1142,52 @@ Get Rollback operation Put Rollback operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Rollback operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Rollback operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Fail operation Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +Post Fail operation with conflict + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/fail + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Fail operation not existing + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingvnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Get Fail operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response @@ -960,21 +1195,21 @@ Get Fail operation Put Fail operation 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Fail operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Fail operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -982,39 +1217,66 @@ Post Create subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_notification=${callback_notification} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_notification=${callback_notification} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/lccnSubscriptionRequest.json - ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_notification=${callback_notification} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response @@ -1023,42 +1285,42 @@ Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1066,7 +1328,7 @@ PUT subscriptions log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1074,7 +1336,7 @@ PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1082,7 +1344,7 @@ DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1090,14 +1352,14 @@ Post Create Individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1105,7 +1367,7 @@ Put Individual subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1113,14 +1375,14 @@ Patch Individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1202,6 +1464,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -1228,7 +1491,8 @@ Fetch Information from SOL001 descriptor file Set Global Variable @{Storage_IDs} @{Storage_labels} Get VNF Attributes from SOL001 - [Arguments] ${VNF_label} + [Arguments] ${VNF_label} + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} @@ -1245,6 +1509,7 @@ Get VNF Attributes from SOL001 Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} @@ -1271,7 +1536,8 @@ Fetch Information from SOL006 descriptor file Set Global Variable ${Descriptor_Version} ${descriptor_version} Get VDU IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{VDU_labels}= Create List ${Storage_labels}= Create List FOR ${i} IN RANGE ${count} @@ -1284,6 +1550,7 @@ Get VDU IDs Get Internal CPs for each VDU [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} ${internal_CPs}= Create List FOR ${i} IN RANGE ${count} @@ -1292,7 +1559,8 @@ Get Internal CPs for each VDU Set Global Variable ${internalCP_IDs} ${internal_CPs} Get External CP IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{external_CPs}= Create List FOR ${i} IN RANGE ${count} Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} @@ -1300,7 +1568,8 @@ Get External CP IDs Set Global Variable ${externalCP_IDs} ${external_CPs} Get Virtual Link IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${VirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} @@ -1309,6 +1578,7 @@ Get Virtual Link IDs Get Instantiation Levels [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{Instantiation_Levels}= Create List FOR ${i} IN RANGE ${count} Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} @@ -1346,4 +1616,4 @@ Match the VNF LCM Operation Occurence Response Attributes with Descriptors List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']} List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['virtualStorageDescId']} - \ No newline at end of file + diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 07f88d6a455ad062141618098a3a247704867c5a..65458896aae1c25d9bea66540511d61918e51215 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -28,7 +28,7 @@ GET status information about multiple VNF LCM Operation OCC ... Applicability: none ... Post-Conditions: none GET VNF LCM Operation occurrences - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC Bad Request Invalid attribute-based filtering parameters @@ -67,7 +67,7 @@ GET status information about multiple VNF LCM Operation OCC with "all_fields" ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with all_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "exlude_default" @@ -80,7 +80,7 @@ GET status information about multiple VNF LCM Operation OCC with "exlude_default ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "fields" @@ -93,7 +93,7 @@ GET status information about multiple VNF LCM Operation OCC with "fields" ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "exclude_fields" @@ -106,7 +106,7 @@ GET status information about multiple VNF LCM Operation OCC with "exclude_fields ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs PUT status information about multiple VNF LCM Operation OCC - Method not implemented @@ -155,7 +155,7 @@ GET status information about multiple VNF LCM Operation OCC to get Paged Respons ... Applicability: none ... Post-Conditions: none GET VNF LCM Operation occurrences - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Header Contain Link GET status information about multiple VNF LCM Operation OCC - Bad Request Response too Big @@ -181,5 +181,5 @@ GET status information about multiple VNF LCM Operation OCC with "exclude_defaul ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default and fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - vnf_b_1_VNF: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF-B-2VDUs" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 9d110b13abe439add8fed75525b9f4fb8a2d6eda..d8e12f693db43407d4cd18239d19df650ae53ab4 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -5,7 +5,8 @@ ${VNFM_SCHEMA} https ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${CONTENT_TYPE} application/json -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTH_USAGE} 1 ${CONTENT_TYPE_PATCH} application/merge-patch+json @@ -28,12 +29,18 @@ ${ARTIFACT_ID} artifactId ${WRONG_ACCEPT} application/json ${SYNC_MODE} 0 - +${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d + ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} @@ -44,8 +51,6 @@ ${requestedFlavour} test ${sub_filter} filter ${sub_filter_invalid} filter_invalid -${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - ${fields} criteria,objectInstanceIds ${vnfInstanceName} Test-VnfInstance @@ -103,7 +108,7 @@ ${descriptorType} SOL001 ${check_descriptors} 1 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage diff --git a/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json index 7624e81f29fbabff698e2e2d0e632f6ffbd31880..9ba2f50477c152925e056e5008c266ddaff8fe3f 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json @@ -6,5 +6,5 @@ ] }} }}, - "callbackUri": "{callback_uri}{callback_notification}" + "callbackUri": "{callback_uri}{callback_endpoint}" }} diff --git a/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/Subscriptions.schema.json similarity index 100% rename from SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json rename to SOL003/VNFLifecycleManagement-API/schemas/Subscriptions.schema.json diff --git a/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json index 85468696c8604ab56d09f03651ade2f14d6a1c17..bf0bfcd302dbb18b3d4f92c7d596bea8c5a3936c 100644 --- a/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json +++ b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json @@ -347,11 +347,11 @@ "type": "string" }, "vnfProvider": { - "description": "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n", + "description": "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId\" attribute.\n", "type": "string" }, "vnfProductName": { - "description": "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n", + "description": "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId\" attribute.\n", "type": "string" }, "vnfSoftwareVersion": { @@ -565,4 +565,4 @@ } } } - } \ No newline at end of file + } diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index b9291d316ad4f860b3009ffae0c8b4f37ed4b755..37846692b2601d06947f6861aeaef49f40f9f658 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index c377d7001b8440b1046a79e72f33f6663c77c5e2..31cde48e9c12d806330518431c0b21e9044bb6a5 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -6,8 +6,8 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Library Collections -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml Documentation This resource represents grants. The client can use this resource to obtain permission ... from the NFVO to perform a particular VNF lifecycle operation. @@ -116,7 +116,7 @@ Send Request Grant Request in Synchronous mode Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} @@ -129,7 +129,7 @@ Send Request Grant Request in Asynchronous mode Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} @@ -142,7 +142,7 @@ Send Request for a new Grant Forbiden Operation Log The grant request should be rejected Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request ${template}= Get File jsons/grantRejectedRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} @@ -172,7 +172,7 @@ Check HTTP Response Body Json Schema Is Get an individual grant - Successful log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${response['headers']['Location']} Log Validate Status code Integer response status 200 @@ -180,7 +180,7 @@ Get an individual grant - Successful Get Grants Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -188,7 +188,7 @@ Get Grants Put Grants 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -196,7 +196,7 @@ Put Grants Patch Grants Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -204,7 +204,7 @@ Patch Grants Delete Grants Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -216,6 +216,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} @@ -230,6 +231,7 @@ Fetch Information from SOL001 descriptor file Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 554ce5a39289ffe5b1e0c374ebf543fa6d907abb..77235ac6391b27878d1d06567a2e093f8b8e4626 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -5,8 +5,8 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library Collections Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml Documentation This resource represents an individual grant. The client can use this resource to read the grant. ... It is determined by means outside the scope of the present document, such as configuration or policy, ... how long an individual grant is available. @@ -106,14 +106,14 @@ DELETE an individual grant - Method not implemented Get individual grant log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 @@ -121,7 +121,7 @@ Post individual Grant log Trying to read an individual grant Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -129,7 +129,7 @@ Post individual Grant Put individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -137,7 +137,7 @@ Put individual Grant Patch individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -145,7 +145,7 @@ Patch individual Grant Delete individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -176,6 +176,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VirtualLink_labels}= Create List @{CP_labels}= Create List @@ -193,6 +194,7 @@ Fetch Information from SOL001 descriptor file Set Global Variable @{CP_IDs} @{CP_labels} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} @@ -206,7 +208,8 @@ Fetch Information from SOL006 descriptor file END Get VDU IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{VDU_labels}= Create List @{Compute_labels}= Create List FOR ${i} IN RANGE ${count} @@ -217,7 +220,8 @@ Get VDU IDs Set Global Variable ${Compute_IDs} ${Compute_labels} Get External CP IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{external_CPs}= Create List FOR ${i} IN RANGE ${count} Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} @@ -225,7 +229,8 @@ Get External CP IDs Set Global Variable ${externalCP_IDs} ${external_CPs} Get Virtual Link IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${VirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} diff --git a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - vnf_b_1_VNF: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF-B-2VDUs" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index c9405aec8f1a2f8763ea801bcb07bd8cdaae4385..1355aa15903c689bc10816a60754684e14160fdb 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${ACCEPT} application/json ${AUTH_USAGE} 1 @@ -46,6 +47,7 @@ ${flavourId} string ${descriptorType} SOL001 ${check_descriptors} 1 +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp diff --git a/SOL003/VNFPackageManagement-API/ApiVersion.robot b/SOL003/VNFPackageManagement-API/ApiVersion.robot index 41eeca71b215944f2afb10f879a8218f98e4b2c4..2f7e5495d4c33564cbc431439ae7588b12636d01 100644 --- a/SOL003/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL003/VNFPackageManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot index 29e2aeb8bbe327033828feb89353946c8075b643..2635c198a6dd08fa64783fb04cf17e2db82626e1 100644 --- a/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot @@ -1,208 +1,208 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false - -*** Test Cases *** -Get Manifest in Individual VNF Package - [Documentation] Test ID: 7.3.3.10.1 - ... Test title: Get Manifest in Individual VNF Package - ... Test objective: The objective is to test that the Get request read the content of manifest within a NVF Package and perform a validation that returned content is in plain text format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get Manifest in Individual VNF Package with security information - [Documentation] Test ID: 7.3.3.10.2 - ... Test title: Get Manifest in Individual VNF Package with security information - ... Test objective: The objective is to test the retrieval of manifest for an individual VNF package shall also security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get Manifest in Individual VNF Package - Not acceptable - [Documentation] Test ID: 7.3.3.10.3 - ... Test title: Get Manifest in Individual VNF Package - Not acceptable - ... Test objective: The objective is to test that retriveal of the of manifest for an individual VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get Manifest in Individual VNF Package - Conflict - [Documentation] Test ID: 7.3.3.10.4 - ... Test title: Get Manifest in Individual VNF Package - Conflict - ... Test objective: The objective is to test that the retrieval of the manifest for an individual VNF package fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the VNF package for which the VNFD is requested is different from ONBOARDED. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.5 - ... Test title: POST Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new resource - ... Pre-conditions: none - ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -PUT Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.6 - ... Test title: PUT Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -PATCH Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.7 - ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -DELETE Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.8 - ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: Resource is not deleted by the failed operation - Send DELETE Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - - -Get Manifest in Individual OnBoarded VNF Package - [Documentation] Test ID: 7.3.3.10.9 - ... Test title: Get Manifest in Individual OnBoarded VNF Package - ... Test objective: The objective is to test that the Get request read the content of manifest within a OnBoarded NVF Package and perform a validation that returned content is in plain text format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual OnBoarded VNF Package - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get Manifest in Individual OnBoarded VNF Package with security information - [Documentation] Test ID: 7.3.3.10.10 - ... Test title: Get Manifest in Individual OnBoarded VNF Package with security information - ... Test objective: The objective is to test the retrieval of manifest for an individual OnBoarded VNF package shall also security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual OnBoarded VNF Package with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get Manifest in Individual OnBoarded VNF Package - Not acceptable - [Documentation] Test ID: 7.3.3.10.11 - ... Test title: Get Manifest in Individual OnBoarded VNF Package - Not acceptable - ... Test objective: The objective is to test that retriveal of the of manifest for an individual OnBoarded VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual OnBoarded VNF Package - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get Manifest in Individual OnBoarded VNF Package - Conflict - [Documentation] Test ID: 7.3.3.10.12 - ... Test title: Get Manifest in Individual OnBoarded VNF Package - Conflict - ... Test objective: The objective is to test that the retrieval of the manifest for an individual OnBoarded VNF package fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the VNF package for which the VNFD is requested is different from ONBOARDED. - ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST Manifest in Individual OnBoarded VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.13 - ... Test title: POST Manifest in Individual OnBoarded VNF Package - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new resource - ... Pre-conditions: none - ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for Manifest in individual OnBoarded VNF Package - Check HTTP Response Status Code Is 405 - -PUT Manifest in Individual OnBoarded VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.14 - ... Test title: PUT Manifest in Individual OnBoarded VNF Package - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for Manifest in individual OnBoarded VNF Package - Check HTTP Response Status Code Is 405 - -PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.15 - ... Test title: PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for Manifest in individual OnBoarded VNF Package - Check HTTP Response Status Code Is 405 - -DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented - [Documentation] Test ID: 7.3.3.10.16 - ... Test title: DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete resource - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: Resource is not deleted by the failed operation - Send DELETE Request for Manifest in individual OnBoarded VNF Package +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +Get Manifest in Individual VNF Package + [Documentation] Test ID: 7.3.3.10.1 + ... Test title: Get Manifest in Individual VNF Package + ... Test objective: The objective is to test that the Get request read the content of manifest within a NVF Package and perform a validation that returned content is in plain text format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual VNF Package with security information + [Documentation] Test ID: 7.3.3.10.2 + ... Test title: Get Manifest in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of manifest for an individual VNF package shall also security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual VNF Package - Not acceptable + [Documentation] Test ID: 7.3.3.10.3 + ... Test title: Get Manifest in Individual VNF Package - Not acceptable + ... Test objective: The objective is to test that retriveal of the of manifest for an individual VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual VNF Package - Conflict + [Documentation] Test ID: 7.3.3.10.4 + ... Test title: Get Manifest in Individual VNF Package - Conflict + ... Test objective: The objective is to test that the retrieval of the manifest for an individual VNF package fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the VNF package for which the VNFD is requested is different from ONBOARDED. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.5 + ... Test title: POST Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new resource + ... Pre-conditions: none + ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.6 + ... Test title: PUT Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.7 + ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.8 + ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Resource is not deleted by the failed operation + Send DELETE Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + + +Get Manifest in Individual OnBoarded VNF Package + [Documentation] Test ID: 7.3.3.10.9 + ... Test title: Get Manifest in Individual OnBoarded VNF Package + ... Test objective: The objective is to test that the Get request read the content of manifest within a OnBoarded NVF Package and perform a validation that returned content is in plain text format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual OnBoarded VNF Package with security information + [Documentation] Test ID: 7.3.3.10.10 + ... Test title: Get Manifest in Individual OnBoarded VNF Package with security information + ... Test objective: The objective is to test the retrieval of manifest for an individual OnBoarded VNF package shall also security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual OnBoarded VNF Package - Not acceptable + [Documentation] Test ID: 7.3.3.10.11 + ... Test title: Get Manifest in Individual OnBoarded VNF Package - Not acceptable + ... Test objective: The objective is to test that retriveal of the of manifest for an individual OnBoarded VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual OnBoarded VNF Package - Conflict + [Documentation] Test ID: 7.3.3.10.12 + ... Test title: Get Manifest in Individual OnBoarded VNF Package - Conflict + ... Test objective: The objective is to test that the retrieval of the manifest for an individual OnBoarded VNF package fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the VNF package for which the VNFD is requested is different from ONBOARDED. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.13 + ... Test title: POST Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new resource + ... Pre-conditions: none + ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.14 + ... Test title: PUT Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.15 + ... Test title: PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.16 + ... Test title: DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Resource is not deleted by the failed operation + Send DELETE Request for Manifest in individual OnBoarded VNF Package Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/NotificationConsumer.robot b/SOL003/VNFPackageManagement-API/NotificationConsumer.robot index b61fe131537935ee524625a147382baa0970f493..0cc88c3de4cdca0b70f559e4e1a37f4e2a71714a 100644 --- a/SOL003/VNFPackageManagement-API/NotificationConsumer.robot +++ b/SOL003/VNFPackageManagement-API/NotificationConsumer.robot @@ -1,70 +1,70 @@ -*** Settings *** -Library String -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library OperatingSystem -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Package Onboarding Notification - [Documentation] Test ID: 7.3.3.12.1 - ... Test title: VNF Package Onboarding Notification - ... Test objective: The objective is to test that the POST request triggers VNF Package Onboarding notification. - ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Post VNF Package Onboarding Notification - Check HTTP Response Status Code Is 204 - -VNF Package Change Notification - [Documentation] Test ID: 7.3.3.12.2 - ... Test title: VNF Package Change Notification - ... Test objective: The objective is to test that the POST request triggers VNF Package Change notification. - ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Post VNF Package Change Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body PkgmSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post VNF Package Onboarding Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfPackageOnboardingNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Package Change Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VnfPackageChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Package Onboarding Notification + [Documentation] Test ID: 7.3.3.12.1 + ... Test title: VNF Package Onboarding Notification + ... Test objective: The objective is to test that the POST request triggers VNF Package Onboarding notification. + ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Onboarding Notification + Check HTTP Response Status Code Is 204 + +VNF Package Change Notification + [Documentation] Test ID: 7.3.3.12.2 + ... Test title: VNF Package Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Package Change notification. + ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Package Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfPackageOnboardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Package Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfPackageChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot b/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot index 13830fc38ed669423be1acc071338d15b46f9ad1..148e6e3d70028227bc97949775b6186a4a56656c 100644 --- a/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot +++ b/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot @@ -118,8 +118,10 @@ Configure Notification Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Delete Handler @@ -128,8 +130,10 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -138,8 +142,10 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot index 35a1ad73a95d6194d0c125c553737ef11c397949..4fe69be4164bdc8fdf5955566ab4505248a8c3c7 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -1,389 +1,389 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false - -*** Test Cases *** -Get VNF Package Artifact - [Documentation] Test ID: 7.3.3.11.1 - ... Test title: Get VNF Package Artifact - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter - [Documentation] Test ID: 7.3.3.11.2 - ... Test title: Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - [Documentation] Test ID: 7.3.3.11.3 - ... Test title: Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter - [Documentation] Test ID: 7.3.3.11.4 - ... Test title: Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "include_signatures" parameter - [Documentation] Test ID: 7.3.3.11.5 - ... Test title: Get VNF Package Artifact with "include_signatures" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with include_signatures parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 7.3.3.11.6 - ... Test title: Get VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the GET request read the whole content of the archive containing the artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - Get Artifact in VNF Package with Range Request - Check HTTP Response Status Code Is 206 - Check HTTP Response Header Content-Range Is Present and Matches the requested range - Check HTTP Response Header Content-Length Is Present and Matches the requested range length - -Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - [Documentation] Test ID: 7.3.3.11.7 - ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" - [Documentation] Test ID: 7.3.3.11.8 - ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets - [Documentation] Test ID: 7.3.3.11.9 - ... Test title: Get VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 7.3.3.11.10 - ... Test title: Get VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - GET Artifact of VNF Package in onboarding state different from ONBOARDED - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -GET VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 7.3.3.11.11 - ... Test title: GET VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when using a range request that does not match any available byte range in the file. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - -POST VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.12 - ... Test title: POST VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact - ... Pre-conditions: none - ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PUT VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.13 - ... Test title: PUT VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PATCH VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.14 - ... Test title: PATCH VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -DELETE VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.15 - ... Test title: DELETE VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -Get OnBoarded VNF Package Artifact - [Documentation] Test ID: 7.3.3.11.16 - ... Test title: Get OnBoarded VNF Package Artifact - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package Artifact files successfully, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get OnBoarded VNF Package Artifact with "exclude_all_mano_artifacts" parameter - [Documentation] Test ID: 7.3.3.11.17 - ... Test title: Get OnBoarded VNF Package Artifact with "exclude_all_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package Artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get OnBoarded VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - [Documentation] Test ID: 7.3.3.11.18 - ... Test title: Get OnBoarded VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get OnBoarded VNF Package Artifact with "select_non_mano_artifact_sets" parameter - [Documentation] Test ID: 7.3.3.11.19 - ... Test title: Get OnBoarded VNF Package Artifact with "select_non_mano_artifact_sets" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get OnBoarded VNF Package Artifact with "include_signatures" parameter - [Documentation] Test ID: 7.3.3.11.20 - ... Test title: Get OnBoarded VNF Package Artifact with "include_signatures" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with include_signatures parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 7.3.3.11.21 - ... Test title: Get OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with Range Request - Check HTTP Response Status Code Is 206 - Check HTTP Response Header Content-Range Is Present and Matches the requested range - Check HTTP Response Header Content-Length Is Present and Matches the requested range length - -Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - [Documentation] Test ID: 7.3.3.11.22 - ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" - [Documentation] Test ID: 7.3.3.11.23 - ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get OnBoarded VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets - [Documentation] Test ID: 7.3.3.11.24 - ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get OnBoarded VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 7.3.3.11.25 - ... Test title: Get OnBoarded VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - GET Artifact of OnBoarded VNF Package in onboarding state different from ONBOARDED - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -GET OnBoarded VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 7.3.3.11.26 - ... Test title: GET OnBoarded VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when using a range request that does not match any available byte range in the file. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET OnBoarded VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - -POST OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.27 - ... Test title: POST OnBoarded VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact - ... Pre-conditions: none - ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for OnBoarded VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PUT OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.28 - ... Test title: PUT OnBoarded VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for OnBoarded VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PATCH OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.29 - ... Test title: PATCH OnBoarded VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for OnBoarded VNF Package Artifact - Check HTTP Response Status Code Is 405 - -DELETE OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.11.30 - ... Test title: DELETE OnBoarded VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for OnBoarded VNF Package Artifact +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +Get VNF Package Artifact + [Documentation] Test ID: 7.3.3.11.1 + ... Test title: Get VNF Package Artifact + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.2 + ... Test title: Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.3 + ... Test title: Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter + [Documentation] Test ID: 7.3.3.11.4 + ... Test title: Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "include_signatures" parameter + [Documentation] Test ID: 7.3.3.11.5 + ... Test title: Get VNF Package Artifact with "include_signatures" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with include_signatures parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 7.3.3.11.6 + ... Test title: Get VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the GET request read the whole content of the archive containing the artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + Get Artifact in VNF Package with Range Request + Check HTTP Response Status Code Is 206 + Check HTTP Response Header Content-Range Is Present and Matches the requested range + Check HTTP Response Header Content-Length Is Present and Matches the requested range length + +Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + [Documentation] Test ID: 7.3.3.11.7 + ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" + [Documentation] Test ID: 7.3.3.11.8 + ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets + [Documentation] Test ID: 7.3.3.11.9 + ... Test title: Get VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 7.3.3.11.10 + ... Test title: Get VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact of VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 7.3.3.11.11 + ... Test title: GET VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when using a range request that does not match any available byte range in the file. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +POST VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.12 + ... Test title: POST VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact + ... Pre-conditions: none + ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.13 + ... Test title: PUT VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.14 + ... Test title: PATCH VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.15 + ... Test title: DELETE VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +Get OnBoarded VNF Package Artifact + [Documentation] Test ID: 7.3.3.11.16 + ... Test title: Get OnBoarded VNF Package Artifact + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package Artifact files successfully, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "exclude_all_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.17 + ... Test title: Get OnBoarded VNF Package Artifact with "exclude_all_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package Artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.18 + ... Test title: Get OnBoarded VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "select_non_mano_artifact_sets" parameter + [Documentation] Test ID: 7.3.3.11.19 + ... Test title: Get OnBoarded VNF Package Artifact with "select_non_mano_artifact_sets" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "include_signatures" parameter + [Documentation] Test ID: 7.3.3.11.20 + ... Test title: Get OnBoarded VNF Package Artifact with "include_signatures" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with include_signatures parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 7.3.3.11.21 + ... Test title: Get OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the GET request read the whole content of the archive containing the OnBoarded VNF Package artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with Range Request + Check HTTP Response Status Code Is 206 + Check HTTP Response Header Content-Range Is Present and Matches the requested range + Check HTTP Response Header Content-Length Is Present and Matches the requested range length + +Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + [Documentation] Test ID: 7.3.3.11.22 + ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" + [Documentation] Test ID: 7.3.3.11.23 + ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get OnBoarded VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets + [Documentation] Test ID: 7.3.3.11.24 + ... Test title: Get OnBoarded VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get OnBoarded VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 7.3.3.11.25 + ... Test title: Get OnBoarded VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact of OnBoarded VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET OnBoarded VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 7.3.3.11.26 + ... Test title: GET OnBoarded VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the OnBoarded VNF Package artifact files fails when using a range request that does not match any available byte range in the file. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET OnBoarded VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +POST OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.27 + ... Test title: POST OnBoarded VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact + ... Pre-conditions: none + ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.28 + ... Test title: PUT OnBoarded VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.29 + ... Test title: PATCH OnBoarded VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.30 + ... Test title: DELETE OnBoarded VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for OnBoarded VNF Package Artifact Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot index dc8a2c3b7642a73863803e15dfa2b5664530fb9b..ded06fca30c167e6118f89d6f0d989fe0c2f3aaa 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot @@ -43,7 +43,7 @@ GET Individual VNF Package Content with Range Request and NFVO not supporting Ra ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package file ... Post-Conditions: none - GET Individual VNF Package Content with Range Request + GET Individual VNF Package Content with explicit Range Request Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip @@ -94,7 +94,7 @@ POST Individual VNF Package Content - Method not implemented ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send POST Request for individual VNF Package + Send POST Request for individual VNF Package Content Check HTTP Response Status Code Is 405 PUT Individual VNF Package Content - Method not implemented @@ -106,7 +106,7 @@ PUT Individual VNF Package Content - Method not implemented ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PUT Request for individual VNF Package + Send PUT Request for individual VNF Package Content Check HTTP Response Status Code Is 405 PATCH Individual VNF Package Content - Method not implemented @@ -118,7 +118,7 @@ PATCH Individual VNF Package Content - Method not implemented ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PATCH Request for individual VNF Package + Send PATCH Request for individual VNF Package Content Check HTTP Response Status Code Is 405 DELETE Individual VNF Package Content - Method not implemented @@ -130,7 +130,7 @@ DELETE Individual VNF Package Content - Method not implemented ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send DELETE Request for individual VNF Package + Send DELETE Request for individual VNF Package Content Check HTTP Response Status Code Is 405 GET Individual OnBoarded VNF Package Content diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 04def23c7788ed8507443519981451abdfd7519b..c2475eff0c33ffb4a3d299811efe9882d78e2f4b 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -9,14 +9,14 @@ Library Collections Library JSONSchemaLibrary schemas/ Library Process Library String -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** Get all VNF Packages Log Trying to get all VNF Packages present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -42,22 +42,22 @@ Check HTTP Response Body Does Not Contain userDefinedData GET VNF Packages with attribute-based filter Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_id} = Split String @{attr}[0] ,${SEPERATOR} - @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_id} = Split String @{attr}[0] ${SEPARATOR} + @{var_provider} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -65,7 +65,7 @@ GET VNF Packages with invalid attribute-based filter GET VNF Packages with all_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -86,7 +86,7 @@ Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector GET VNF Packages with exclude_default attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using exclude_default filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -105,7 +105,7 @@ GET VNF Packages with fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -124,7 +124,7 @@ GET VNF Packages with fields and exclude_default attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -143,7 +143,7 @@ GET VNF Packages with exclude_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -161,7 +161,7 @@ Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields select GET all VNF Packages with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_package ${output}= Output response Set Suite Variable ${response} ${output} @@ -169,7 +169,7 @@ GET all VNF Packages with invalid resource endpoint Send POST Request for all VNF Packages Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -177,7 +177,7 @@ Send POST Request for all VNF Packages Send PUT Request for all VNF Packages Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -185,7 +185,7 @@ Send PUT Request for all VNF Packages Send PATCH Request for all VNF Packages Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -193,7 +193,7 @@ Send PATCH Request for all VNF Packages Send DELETE Request for all VNF Packages Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -201,7 +201,7 @@ Send DELETE Request for all VNF Packages GET Individual VNF Package Log Trying to get a VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -214,7 +214,7 @@ Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package GET Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using wrong authorization bearer Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -222,7 +222,7 @@ GET Individual VNF Package with invalid resource identifier Send POST Request for individual VNF Package Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -230,7 +230,7 @@ Send POST Request for individual VNF Package Send PUT Request for individual VNF Package Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -238,7 +238,7 @@ Send PUT Request for individual VNF Package Send PATCH Request for individual VNF Package Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -246,7 +246,7 @@ Send PATCH Request for individual VNF Package Send DELETE Request for individual VNF Package Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -254,7 +254,7 @@ Send DELETE Request for individual VNF Package GET Individual VNF Package Content Log Trying to get a VNF Package Content Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -267,16 +267,26 @@ GET Individual VNF Package Content with Range Request Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} + +GET Individual VNF Package Content with explicit Range Request + Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Header Content-Range Is Present and Matches the requested range Log Check Content-Range HTTP Header Should Contain ${response['headers']} Content-Range - Should Be Equal As Strings ${response['headers']['Content-Range']} ${range} + Should Be Equal As Strings ${response['headers']['Content-Range']} bytes ${range}/${full_length} Log Header Content-Range is present Check HTTP Response Header Content-Length Is Present and Matches the requested range length @@ -289,8 +299,8 @@ GET Individual VNF Package Content with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -298,7 +308,7 @@ GET Individual VNF Package Content with invalid Range Request GET Individual VNF Package Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -306,7 +316,7 @@ GET Individual VNF Package Content with invalid resource identifier GET Content for VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -314,7 +324,7 @@ GET Content for VNF Package in onboarding state different from ONBOARDED Send POST Request for individual VNF Package Content Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -322,7 +332,7 @@ Send POST Request for individual VNF Package Content Send PUT Request for individual VNF Package Content Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -330,7 +340,7 @@ Send PUT Request for individual VNF Package Content Send PATCH Request for individual VNF Package Content Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -338,7 +348,7 @@ Send PATCH Request for individual VNF Package Content Send DELETE Request for individual VNF Package Content Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -346,7 +356,7 @@ Send DELETE Request for individual VNF Package Content Get all VNF Package Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -354,7 +364,7 @@ Get all VNF Package Subscriptions Get VNF Package Subscriptions with attribute-based filters Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -362,7 +372,7 @@ Get VNF Package Subscriptions with attribute-based filters Get VNF Package Subscriptions with invalid attribute-based filters Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -370,7 +380,7 @@ Get VNF Package Subscriptions with invalid attribute-based filters Get VNF Package Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -380,29 +390,43 @@ Send Post Request for VNF Package Subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} callbackUri=${callbackUri} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Post Request for Duplicated VNF Package Subscription Log Trying to create a subscription with an already created content Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} callbackUri=${callbackUri} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Package Subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -410,7 +434,7 @@ Send Put Request for VNF Package Subscriptions Send Patch Request for VNF Package Subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -418,7 +442,7 @@ Send Patch Request for VNF Package Subscriptions Send Delete Request for VNF Package Subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -426,7 +450,7 @@ Send Delete Request for VNF Package Subscriptions Get single file VNFD in Individual VNF Package in Plain Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -434,7 +458,7 @@ Get single file VNFD in Individual VNF Package in Plain Format Get VNFD in Individual VNF Package in Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -443,7 +467,7 @@ Get single file VNFD in Individual VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -452,7 +476,7 @@ Get multi file VNFD in Individual VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -464,7 +488,7 @@ Check HTTP Response Header Content-Type Is Any of Get multi file VNFD in Individual VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -473,7 +497,7 @@ Get VNFD in Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -482,7 +506,7 @@ Get VNFD in Individual VNF Package Content with conflict due to onboarding state Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -490,7 +514,7 @@ Get VNFD in Individual VNF Package Content with conflict due to onboarding state Send POST Request for VNFD in individual VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -498,7 +522,7 @@ Send POST Request for VNFD in individual VNF Package Send PUT Request for VNFD in individual VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -506,7 +530,7 @@ Send PUT Request for VNFD in individual VNF Package Send PATCH Request for VNFD in individual VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -514,21 +538,21 @@ Send PATCH Request for VNFD in individual VNF Package Send DELETE Request for VNFD in individual VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -536,8 +560,8 @@ GET Individual VNF Package Artifact in octet stream format GET Individual VNF Package Artifact with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -546,22 +570,22 @@ GET Individual VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -569,7 +593,7 @@ GET Artifact for VNF Package in onboarding state different from ONBOARDED Send POST Request for individual VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -577,7 +601,7 @@ Send POST Request for individual VNF Package Artifact Send PUT Request for individual VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -585,7 +609,7 @@ Send PUT Request for individual VNF Package Artifact Send PATCH Request for individual VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -593,7 +617,7 @@ Send PATCH Request for individual VNF Package Artifact Send DELETE Request for individual VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -619,7 +643,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription @@ -634,7 +658,7 @@ Check Postcondition VNF Package Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${location} == Location ... GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If ${location} == Location @@ -645,7 +669,7 @@ Check Postcondition VNF Package Subscription Is Set Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -662,7 +686,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual VNF Package Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -670,7 +694,7 @@ Get Individual VNF Package Subscription GET individual VNF Package Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -678,7 +702,7 @@ GET individual VNF Package Subscription with invalid resource identifier Send Delete request for individual VNF Package Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -686,19 +710,19 @@ Send Delete request for individual VNF Package Subscription Send Delete request for individual VNF Package Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -707,7 +731,7 @@ Send Put request for individual VNF Package Subscription Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -745,7 +769,7 @@ Check HTTP Response Header Contain Link Get all OnBoarded VNF Packages Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -753,7 +777,7 @@ Get all OnBoarded VNF Packages GET OnBoarded VNF Packages with attribute-based filter Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -761,7 +785,7 @@ GET OnBoarded VNF Packages with attribute-based filter GET OnBoarded VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -769,7 +793,7 @@ GET OnBoarded VNF Packages with invalid attribute-based filter GET OnBoarded VNF Packages with all_fields attribute selector Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -777,7 +801,7 @@ GET OnBoarded VNF Packages with all_fields attribute selector GET OnBoarded VNF Packages with exclude_default attribute selector Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using exclude_default filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -786,7 +810,7 @@ GET OnBoarded VNF Packages with fields attribute selector Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -795,7 +819,7 @@ GET OnBoarded VNF Packages with exclude_fields attribute selector Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -803,7 +827,7 @@ GET OnBoarded VNF Packages with exclude_fields attribute selector GET OnBoarded all VNF Packages with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_package ${output}= Output response Set Suite Variable ${response} ${output} @@ -811,7 +835,7 @@ GET OnBoarded all VNF Packages with invalid resource endpoint Send OnBoarded POST Request for all VNF Packages Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -819,7 +843,7 @@ Send OnBoarded POST Request for all VNF Packages Send OnBoarded PUT Request for all VNF Packages Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -827,7 +851,7 @@ Send OnBoarded PUT Request for all VNF Packages Send OnBoarded PATCH Request for all VNF Packages Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -835,7 +859,7 @@ Send OnBoarded PATCH Request for all VNF Packages Send OnBoarded DELETE Request for all VNF Packages Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -843,7 +867,7 @@ Send OnBoarded DELETE Request for all VNF Packages GET Individual OnBoarded VNF Package Log Trying to get a OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -851,7 +875,7 @@ GET Individual OnBoarded VNF Package GET Individual OnBoarded VNF Package with invalid resource identifier Log Trying to perform a negative get, using wrong authorization bearer Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -859,7 +883,7 @@ GET Individual OnBoarded VNF Package with invalid resource identifier Send POST Request for individual OnBoarded VNF Package Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -867,7 +891,7 @@ Send POST Request for individual OnBoarded VNF Package Send PUT Request for individual OnBoarded VNF Package Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -875,7 +899,7 @@ Send PUT Request for individual OnBoarded VNF Package Send PATCH Request for individual OnBoarded VNF Package Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -883,7 +907,7 @@ Send PATCH Request for individual OnBoarded VNF Package Send DELETE Request for individual OnBoarded VNF Package Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -891,7 +915,7 @@ Send DELETE Request for individual OnBoarded VNF Package Get single file VNFD in Individual OnBoarded VNF Package in Plain Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -899,7 +923,7 @@ Get single file VNFD in Individual OnBoarded VNF Package in Plain Format Get VNFD in Individual OnBoarded VNF Package in Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -908,7 +932,7 @@ Get single file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -917,7 +941,7 @@ Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -925,7 +949,7 @@ Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Get multi file VNFD in Individual OnBoarded VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -934,7 +958,7 @@ Get VNFD in Individual OnBoarded VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -943,7 +967,7 @@ Get VNFD in Individual OnBoarded VNF Package Content with conflict due to onboar Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -951,7 +975,7 @@ Get VNFD in Individual OnBoarded VNF Package Content with conflict due to onboar Send POST Request for VNFD in individual OnBoarded VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -959,7 +983,7 @@ Send POST Request for VNFD in individual OnBoarded VNF Package Send PUT Request for VNFD in individual OnBoarded VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -967,7 +991,7 @@ Send PUT Request for VNFD in individual OnBoarded VNF Package Send PATCH Request for VNFD in individual OnBoarded VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -975,7 +999,7 @@ Send PATCH Request for VNFD in individual OnBoarded VNF Package Send DELETE Request for VNFD in individual OnBoarded VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -983,7 +1007,7 @@ Send DELETE Request for VNFD in individual OnBoarded VNF Package GET Individual OnBoarded VNF Package Content Log Trying to get a VNF Package Content Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -992,8 +1016,8 @@ GET Individual OnBoarded VNF Package Content with Range Request Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -1002,8 +1026,8 @@ GET Individual OnBoarded VNF Package Content with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -1011,7 +1035,7 @@ GET Individual OnBoarded VNF Package Content with invalid Range Request GET Individual OnBoarded VNF Package Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -1019,21 +1043,21 @@ GET Individual OnBoarded VNF Package Content with invalid resource identifier GET Content for OnBoarded VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfdOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1041,8 +1065,8 @@ GET Individual OnBoarded VNF Package Artifact in octet stream format GET Individual OnBoarded VNF Package Artifact with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1051,22 +1075,22 @@ GET Individual OnBoarded VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for OnBoarded VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1074,7 +1098,7 @@ GET Artifact for OnBoarded VNF Package in onboarding state different from ONBOAR Send POST Request for individual OnBoarded VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1082,7 +1106,7 @@ Send POST Request for individual OnBoarded VNF Package Artifact Send PUT Request for individual OnBoarded VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1090,7 +1114,7 @@ Send PUT Request for individual OnBoarded VNF Package Artifact Send PATCH Request for individual OnBoarded VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1098,7 +1122,7 @@ Send PATCH Request for individual OnBoarded VNF Package Artifact Send DELETE Request for individual OnBoarded VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1107,7 +1131,7 @@ Get multi file VNFD in Individual OnBoarded VNF Package with security informatio Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1116,7 +1140,7 @@ Get multi file VNFD in Individual VNF Package with security information Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1124,7 +1148,7 @@ Get multi file VNFD in Individual VNF Package with security information GET Individual VNF Package Artifact with security information Log Trying to get a VNF Package Artifact Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1132,21 +1156,21 @@ GET Individual VNF Package Artifact with security information GET Individual OnBoarded VNF Package Artifact with security information Log Trying to get a VNF Package Artifact Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact with encrypted artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndEncryptedArtifactID}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact with encrypted artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndEncryptedArtifactID}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1154,7 +1178,7 @@ GET Individual OnBoarded VNF Package Artifact with encrypted artifact GET Individual VNF Package Artifact with incompatable header Log Trying to get a VNF Package Artifact Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1162,7 +1186,7 @@ GET Individual VNF Package Artifact with incompatable header GET Individual OnBoarded VNF Package Artifact with incompatable header Log Trying to get a VNF Package Artifact Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1170,7 +1194,7 @@ GET Individual OnBoarded VNF Package Artifact with incompatable header Get Manifest in Individual VNF Package Log Trying to get content of manifest file from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1179,7 +1203,7 @@ Get Manifest in Individual VNF Package with security information Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue with security certificates Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1188,7 +1212,7 @@ Get Manifest in Individual VNF Package with conflict due to onboarding state Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1196,7 +1220,7 @@ Get Manifest in Individual VNF Package with conflict due to onboarding state Send POST Request for Manifest in individual VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1204,7 +1228,7 @@ Send POST Request for Manifest in individual VNF Package Send PUT Request for Manifest in individual VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1212,7 +1236,7 @@ Send PUT Request for Manifest in individual VNF Package Send PATCH Request for Manifest in individual VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1220,7 +1244,7 @@ Send PATCH Request for Manifest in individual VNF Package Send DELETE Request for Manifest in individual VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1228,7 +1252,7 @@ Send DELETE Request for Manifest in individual VNF Package Get Manifest in Individual OnBoarded VNF Package Log Trying to get content of manifest file from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1237,7 +1261,7 @@ Get Manifest in Individual OnBoarded VNF Package with security information Log Trying to get a manifest from a given OnBoarded VNF Package present in the NFVO Catalogue with security certificates Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1246,7 +1270,7 @@ Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding Log Trying to get a manifest from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1254,7 +1278,7 @@ Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding Send POST Request for Manifest in individual OnBoarded VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1262,7 +1286,7 @@ Send POST Request for Manifest in individual OnBoarded VNF Package Send PUT Request for Manifest in individual OnBoarded VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1270,7 +1294,7 @@ Send PUT Request for Manifest in individual OnBoarded VNF Package Send PATCH Request for Manifest in individual OnBoarded VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1278,7 +1302,7 @@ Send PATCH Request for Manifest in individual OnBoarded VNF Package Send DELETE Request for Manifest in individual OnBoarded VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1286,7 +1310,7 @@ Send DELETE Request for Manifest in individual OnBoarded VNF Package Get Artifact in VNF Package Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1294,7 +1318,7 @@ Get Artifact in VNF Package Get Artifact in VNF Package with exclude_all_mano_artifacts parameter Log Trying to get Artifact in VNF Package with exclude_all_mano_artifacts Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1302,7 +1326,7 @@ Get Artifact in VNF Package with exclude_all_mano_artifacts parameter Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter Log Trying to get Artifact in VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1311,7 +1335,7 @@ Get Artifact in VNF Package with select_non_mano_artifact_sets parameter Log Trying to get Artifact in VNF Package with security certificates Pass Execution If ${NFVO_non-MANO_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1319,7 +1343,7 @@ Get Artifact in VNF Package with select_non_mano_artifact_sets parameter Get Artifact in VNF Package with include_signatures parameter Log Trying to get Artifact in VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1327,8 +1351,8 @@ Get Artifact in VNF Package with include_signatures parameter Get Artifact in VNF Package with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1336,7 +1360,7 @@ Get Artifact in VNF Package with Range Request Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1344,14 +1368,14 @@ Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_m Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact of VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1360,8 +1384,8 @@ GET VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1369,7 +1393,7 @@ GET VNF Package Artifact with invalid Range Request Send POST Request for VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1377,7 +1401,7 @@ Send POST Request for VNF Package Artifact Send PUT Request for VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1385,7 +1409,7 @@ Send PUT Request for VNF Package Artifact Send PATCH Request for VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1393,7 +1417,7 @@ Send PATCH Request for VNF Package Artifact Send DELETE Request for VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1401,7 +1425,7 @@ Send DELETE Request for VNF Package Artifact Get Artifact in OnBoarded VNF Package Log Trying to get Artifact in OnBoarded VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1409,7 +1433,7 @@ Get Artifact in OnBoarded VNF Package Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter Log Trying to get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1417,7 +1441,7 @@ Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts parameter Log Trying to get Artifact in OnBoarded VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1426,7 +1450,7 @@ Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets paramet Log Trying to get Artifact in OnBoarded VNF Package with security certificates Pass Execution If ${NFVO_non-MANO_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1434,7 +1458,7 @@ Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets paramet Get Artifact in OnBoarded VNF Package with include_signatures parameter Log Trying to get Artifact in OnBoarded VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1442,8 +1466,8 @@ Get Artifact in OnBoarded VNF Package with include_signatures parameter Get Artifact in OnBoarded VNF Package with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1451,7 +1475,7 @@ Get Artifact in OnBoarded VNF Package with Range Request Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets Log Trying to get Artifact in OnBoarded VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1459,14 +1483,14 @@ Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and se Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts Log Trying to get Artifact in OnBoarded VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact of OnBoarded VNF Package in onboarding state different from ONBOARDED Log Trying to get a OnBoarded VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfPkgId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1475,8 +1499,8 @@ GET OnBoarded VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the OnBoarded VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1484,7 +1508,7 @@ GET OnBoarded VNF Package Artifact with invalid Range Request Send POST Request for OnBoarded VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1492,7 +1516,7 @@ Send POST Request for OnBoarded VNF Package Artifact Send PUT Request for OnBoarded VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1500,7 +1524,7 @@ Send PUT Request for OnBoarded VNF Package Artifact Send PATCH Request for OnBoarded VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1508,7 +1532,7 @@ Send PATCH Request for OnBoarded VNF Package Artifact Send DELETE Request for OnBoarded VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1517,7 +1541,7 @@ GET OnBoarded VNF Packages with fields and exclude_default attribute selector Log Trying to get all OnBoarded VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -1538,6 +1562,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} @@ -1550,6 +1575,7 @@ Fetch Information from SOL001 descriptor file Set Global Variable ${Descriptor_Version} ${descriptor_version} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} diff --git a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - vnf_b_1_VNF: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF-B-2VDUs" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL003/VNFPackageManagement-API/environment/variables.txt b/SOL003/VNFPackageManagement-API/environment/variables.txt index b5779a0e8f6fa744b0578a97642243528f610032..18ab0c53a07d6b272e647cb138ca11227801acb6 100644 --- a/SOL003/VNFPackageManagement-API/environment/variables.txt +++ b/SOL003/VNFPackageManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json @@ -56,7 +57,7 @@ ${erroneousVnfdId} erroneousVnfdId ${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based -${SEPERATOR} = +${SEPARATOR} = ${ACCEPT_PLAIN} text/plain @@ -72,25 +73,27 @@ ${vndIdZipVnfd} f5b220d4-6177-4ebb-a554-a43311e16075 ${artifactPath} artifactPath ${CONTENT_TYPE_OCTET} application/octet-stream ${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO -${range} bytes=0-1023 -${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes +${range} 0-1023 +${full_length} 2000 # Size of the requested artifact to be downloaded via partial downloads +${length} 1024 # Size of the requested range +${erroneousRange} 10000000-1000000000 # Requesting a out of range number of bytes ${vnfPackageOctetStreamId} octetStreamPkgId ${vnfdOctetStreamId} octetStreamVnfdId ${vndEncryptedArtifactID} encryptedId -${length} 1024 - ${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW # Positive case, suing compiant fields name for filtering get request ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field ${fields} softwareImages,additionalArtifacts -${VAR_SEPERATOR} & +${VAR_SEPARATOR} & ${callbackResp} localhost ${descriptorType} SOL001 ${check_descriptors} 1 +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder + ${Descriptor_ID} ${Provider} ${Product_Name} diff --git a/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json b/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json deleted file mode 100644 index c01e92b484e9305f89fbd1a54db3d69ea514695c..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json +++ /dev/null @@ -1,414 +0,0 @@ -[ - { - "id": "ABCDEFGHIJKL", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQR" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVW", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUVWX", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLM", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGH", - "ABCDEF" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY", - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTU" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEF", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDE", - "ABCDE", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOP" - ] - } - ] - }, - { - "vnfProductName": "ABCDE", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNO", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJK", - "vnfdVersions": [ - "ABCD" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCD", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKL" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRST" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQR", - "ABCDEFGHIJKLMNOP" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLM", - "ABCDEFGHIJK" - ], - "vnfPkgId": [ - "ABCDEFGH", - "ABCDEFGHIJKLMNOPQ", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDE", - "callbackUri": "ABCDEFGHIJKLM", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQRSTU" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGH", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUV", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDE", - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMN", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOP", - "vnfdVersions": [ - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVW" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMNOP", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGH", - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOP" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLM", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDEFGH" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLM", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKL" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDEF", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQ" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification", - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKL", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJK", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHI", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHI", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKL", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTU", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMN" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQRST" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOP", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKLMN" - ], - "operationalState": "ENABLED", - "usageState": [ - 773, - [ - {}, - [ - false, - true - ], - null, - null - ] - ] - } - } -] \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/jsons/subscriptions.json b/SOL003/VNFPackageManagement-API/jsons/subscriptions.json index 35c8671ebcb58f0153df774ed4457d3b2022eedb..42d0689a0f9d60aec42c28ef437bfefe5a526959 100644 --- a/SOL003/VNFPackageManagement-API/jsons/subscriptions.json +++ b/SOL003/VNFPackageManagement-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ {{ - "callbackUri": "{callbackUri}" + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" }} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot index 88ba224c79d7d7c35ff35d7d8a5afbe5849daf64..38ce2dbc4d0b72ed9fd9203ffe89fefa576c693e 100644 --- a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index d8324e537ca3e09b63abb031ebd90ee66bd5ea39..bbe425897991b040c26be786a06969cbe96ce5dd 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -113,7 +113,7 @@ PATCH Individual VNF Performance Job - Precondition failed GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -121,7 +121,7 @@ GET individual VNF Performance Job GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -129,7 +129,7 @@ GET individual VNF Performance Job with invalid resource identifier Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -137,7 +137,7 @@ Send Delete request for individual VNF Performance Job Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -145,7 +145,7 @@ Send Delete request for individual VNF Performance Job with invalid resource ide Send Post request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -153,7 +153,7 @@ Send Post request for individual VNF Performance Job Send Put request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -164,7 +164,7 @@ Send Put request for individual VNF Performance Job Send Patch request for individual VNF Performance Job Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/PMJobModifications.json PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} @@ -174,7 +174,7 @@ Send Patch request for individual VNF Performance Job Check Postcondition VNF Performance Job is not Created Log Trying to get a new Pm Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 48017858d91da98cf5c2be2cf5b4c8d8bb7ff6f0..e029d6cbefb313117bc79bc466a3f57053ef024a 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -83,7 +83,7 @@ DELETE Individual Performance Report - Method not implemented Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -91,21 +91,21 @@ Get Individual Performance Report Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -115,7 +115,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -125,7 +125,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index 1790d9cd41ef3d7b4652dab7af6cc44b098a73a3..39af0c1aa1cbd321a93f2212d550d4619e382273 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -113,7 +113,7 @@ PATCH Individual Threshold - Precondition failed GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -121,28 +121,28 @@ GET Individual VNF Performance Threshold GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -162,7 +162,7 @@ Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/ThresholdModifications.json PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response diff --git a/SOL003/VNFPerformanceManagement-API/NotificationConsumer.robot b/SOL003/VNFPerformanceManagement-API/NotificationConsumer.robot index 55d99d44df9f5177092853021f233082152df8a5..ea8f9283a5af108e509e6745712ed965ef3f61ce 100644 --- a/SOL003/VNFPerformanceManagement-API/NotificationConsumer.robot +++ b/SOL003/VNFPerformanceManagement-API/NotificationConsumer.robot @@ -1,69 +1,69 @@ -*** Settings *** -Library String -Library OperatingSystem -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library JSONLibrary -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -Performance Information Available Notification - [Documentation] Test ID: 7.3.4.10.1 - ... Test title: Performance Information Available Notification - ... Test objective: The objective is to test that the POST request triggers Performance Information Available Notification. - ... Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post Performance Information Available Notification - Check HTTP Response Status Code Is 204 - -Threshold Crossed Notification - [Documentation] Test ID: 7.3.4.10.2 - ... Test title: Threshold Crossed Notification - ... Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification - ... Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Post Threshold Crossed Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} - Integer response status 200 - Validate Json response body PmJob.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - ${status}= Convert To Integer ${expected_status} - Should Be Equal As Strings ${response['status']} ${status} - Log Status code validated - -Post Performance Information Available Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body} = Get File jsons/PerformanceInformationAvailableNotification.json - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Threshold Crossed Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body} = Get File jsons/ThresholdCrossedNotification.json - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library OperatingSystem +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Performance Information Available Notification + [Documentation] Test ID: 7.3.4.10.1 + ... Test title: Performance Information Available Notification + ... Test objective: The objective is to test that the POST request triggers Performance Information Available Notification. + ... Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Performance Information Available Notification + Check HTTP Response Status Code Is 204 + +Threshold Crossed Notification + [Documentation] Test ID: 7.3.4.10.2 + ... Test title: Threshold Crossed Notification + ... Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification + ... Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal As Strings ${response['status']} ${status} + Log Status code validated + +Post Performance Information Available Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/PerformanceInformationAvailableNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/ThresholdCrossedNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 5ef0d5a244f9af6db401beaa49a5e3e9e011d240..15f98c68b3ed6e605cb40bb5fb6551c8f0539e7a 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -212,7 +212,7 @@ GET all VNF Performance Monitoring Jobs with fields and exclude_default attribut GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -220,7 +220,7 @@ GET all VNF Performance Monitoring Jobs GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -228,7 +228,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -236,7 +236,7 @@ GET VNF Performance Monitoring Jobs with all_fields attribute selector GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -245,7 +245,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -254,7 +254,7 @@ GET VNF Performance Monitoring Jobs with fields and exclude_default attribute se Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -263,7 +263,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -271,7 +271,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -279,7 +279,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter GET VNF Performance Monitoring Jobs with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -288,7 +288,7 @@ Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} @@ -298,7 +298,7 @@ Send Post Request Create new VNF Performance Monitoring Job Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -306,7 +306,7 @@ Send PUT Request for all VNF Performance Monitoring Jobs Send PATCH Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -314,7 +314,7 @@ Send PATCH Request for all VNF Performance Monitoring Jobs Send DELETE Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -326,7 +326,7 @@ Check Postcondition VNF Performance Monitoring Jobs Exist Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -374,7 +374,7 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] Check HTTP Response Body Does Not Contain reports diff --git a/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot b/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot index fc6f7035bf32879e2319a8b68503b98d3855d72b..e21a8b578226e7ab3571b4492feeb6183e1084fa 100644 --- a/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot +++ b/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot @@ -85,8 +85,10 @@ Configure Notification Performance Information Available Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -95,8 +97,10 @@ Configure Notification Threshold Crossed Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index 1555adaa82d76dbf0f9432fa1ad442e44109e583..efcc68988ceafd735f308212439f96361b1fd140 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -140,7 +140,7 @@ GET Performance Thresholds - Bad Request Response too Big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -148,7 +148,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} @@ -156,7 +156,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,14 +164,14 @@ GET Performance Thresholds with invalid attribute-based filter GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json @@ -182,7 +182,7 @@ Send Post Request Create new Performance Threshold Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -191,7 +191,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -200,7 +200,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -212,7 +212,7 @@ Check Postcondition Thresholds Exist Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/environment/variables.txt b/SOL003/VNFPerformanceManagement-API/environment/variables.txt index f61232c978c38c71ab5d192ad43421364c66182a..84c9f84d4eb56da47a7fba12f8583b647a56a2e2 100644 --- a/SOL003/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL003/VNFPerformanceManagement-API/environment/variables.txt @@ -4,7 +4,8 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION} Bearer negativetoken ${CONTENT_TYPE_JSON} application/json @@ -55,7 +56,7 @@ ${notification_response} [] ${POS_FILTER} objectInstanceIds=${objectInstanceIds} ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,objectInstanceIds -${SEPERATOR} = +${SEPARATOR} = ${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index 45cf503da29fc9e68de87de00b6badeadf7ae3c4..851231ae03909dddc2d865f00b1bbf2e5e4f0cc4 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot index 47465a390b7fe4ad766ceb543b1c89b58a6761dc..e02be2df57eb312c8a0d411da96d9b9a233e4cf7 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot @@ -1,47 +1,47 @@ -*** Settings *** -Library String -Resource environment/variables.txt -Library OperatingSystem -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -Vr Quota Availibility Notification - [Documentation] Test ID: 7.3.7.4.1 - ... Test title: Vr Quota Availibility Notification - ... Test objective: The objective is to test that Vr Quota Availibility Notification is delivered with success to the notification consumer - ... Pre-conditions: The VNF has subscribed to the Vr Quota Availibility resource - ... Reference: Clause 11.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Vr Quota Avail Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body VrQuotaAvailSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Vr Quota Avail Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/VrQuotaAvailNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Vr Quota Availibility Notification + [Documentation] Test ID: 7.3.7.4.1 + ... Test title: Vr Quota Availibility Notification + ... Test objective: The objective is to test that Vr Quota Availibility Notification is delivered with success to the notification consumer + ... Pre-conditions: The VNF has subscribed to the Vr Quota Availibility resource + ... Reference: Clause 11.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Vr Quota Avail Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VrQuotaAvailSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Vr Quota Avail Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VrQuotaAvailNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index 1b7cfe68a282630edcf98debb7df55434689b3d0..30d90c4f98d743ded4a0e6217e194e670720ecfa 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -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 Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create new Virtualised Resources Quota Available Notification subscription diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 237409f6437f11a58d98526ce520b19026b4490d..8ba214350a2f3c11ea302316c219d1290ab436da 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -17,7 +17,7 @@ Create Sessions Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 @@ -52,7 +52,7 @@ Check Postcondition VNF Virtualised Resources Quota Available Notification indiv Send Post request for Virtualised Resources Quota Available Notification Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -60,7 +60,7 @@ Send Post request for Virtualised Resources Quota Available Notification Individ Put Virtualised Resources Quota Available Notification individual Subscription 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -68,7 +68,7 @@ Put Virtualised Resources Quota Available Notification individual Subscription Patch Virtualised Resources Quota Available Notification individual subscription log Trying to perform a Patch. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -76,7 +76,7 @@ Patch Virtualised Resources Quota Available Notification individual subscription Get Virtualised Resources Quota Available Notification individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -84,7 +84,7 @@ Get Virtualised Resources Quota Available Notification individual subscription Delete Virtualised Resources Quota Available Notification individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -93,41 +93,59 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send Post request for new Virtualised Resources Quota Available Notification subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send Post request for new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} GET Virtualised Resources Quota Available Notification Subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response @@ -136,7 +154,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions GET Virtualised Resources Quota Available Notification Subscriptions with Filter Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response @@ -145,7 +163,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions with Filter Get Virtualised Resources Quota Available Notification subscriptions with Bad Request Invalid attribute-based filtering parameters Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -154,7 +172,7 @@ Send Put request for Virtualised Resources Quota Available Notification subscrip log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -163,7 +181,7 @@ Send Patch request for Virtualised Resources Quota Available Notification subscr log Trying to perform a Patch. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -172,7 +190,7 @@ Send Delete request for Virtualised Resources Quota Available Notification subsc log Trying to perform a Delete. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt index 742e6b3b6aa1bc19d33f7b1b1917f1a354fa7b1b..a705ad7514a1000a7577b6ad67f6e69ea304e205 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${AUTH_USAGE} 1 ${ACCEPT} application/json diff --git a/SOL005/NSDManagement-API/ApiVersion.robot b/SOL005/NSDManagement-API/ApiVersion.robot index aa117f09badf7639a627d8f927c1e3e60231ab3d..483496f5b3743763103bd1d9c26a4712f7f1af9e 100644 --- a/SOL005/NSDManagement-API/ApiVersion.robot +++ b/SOL005/NSDManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSDManagement-API/NSD.robot b/SOL005/NSDManagement-API/NSD.robot index 2b8d3708f39ed584dfac66f540aa8d2c0dd6a4f0..6bdb58d6c6ed0df387ef252992856db91656e75a 100644 --- a/SOL005/NSDManagement-API/NSD.robot +++ b/SOL005/NSDManagement-API/NSD.robot @@ -1,160 +1,160 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource NSDManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem - -*** Test Cases *** -Get single file NSD in Plain Format - [Documentation] Test ID: 5.3.1.11.1 - ... Test title: Get single file NSD in Plain Format - ... Test objective: The objective is to test the retrieval of the NSD in plain format within a NSD archive and perform a validation that returned content is in plain format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a single file - ... Post-Conditions: none - Get single file NSD in Plain Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get NSD in Zip Format - [Documentation] Test ID: 5.3.1.11.2 - ... Test title: Get NSD in Zip Format - ... Test objective: The objective is to test the retrieval of the NSD in zip format within a NSD archive and perform a validation that returned content is in zip format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD in Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get single file NSD in Plain or Zip Format - [Documentation] Test ID: 5.3.1.11.3 - ... Test title: Get single file NSDin Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the single file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a single file - ... Post-Conditions: none - Get single file NSD in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is Any of text/plain application/zip - -Get multi file NSD in Plain or Zip Format - [Documentation] Test ID: 5.3.1.11.4 - ... Test title: Get multi file NSD in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the multi file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a multi file - ... Post-Conditions: none - Get multi file NSD in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get multi file NSD in Plain Format - [Documentation] Test ID: 5.3.1.11.5 - ... Test title: Get multi file NSD in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file NSD within a NSD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a multi file - ... Post-Conditions: none - Get multi file NSD in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get NSD Content with invalid resource identifier - [Documentation] Test ID: 5.3.1.11.6 - ... Test title: Get NSD Content with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails when using an invalid resource identifier - ... Pre-conditions: none - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD with invalid resource identifier - Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get NSD with conflict due to onboarding state - [Documentation] Test ID: 5.3.1.11.7 - ... Test title: Get NSD with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails due to a conflict when the NSD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the NSD is different from ONBOARDED. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get NSD with security information - [Documentation] Test ID: 5.3.1.11.8 - ... Test title: Get NSD with security information - ... Test objective: The objective is to test the retrieval of the NSD within a NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -POST NSD - Method not implemented - [Documentation] Test ID: 5.3.1.11.9 - ... Test title: POST NSD - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor - ... Pre-conditions: none - ... Reference: Clause 5.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for NSD - Check HTTP Response Status Code Is 405 - -PUT NSD - Method not implemented - [Documentation] Test ID: 5.3.1.11.10 - ... Test title: PUT NSD - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor - ... Pre-conditions: none - ... Reference: Clause 5.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for NSD - Check HTTP Response Status Code Is 405 - -PATCH NSD - Method not implemented - [Documentation] Test ID: 5.3.1.11.11 - ... Test title: PATCH NSD - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor - ... Pre-conditions: none - ... Reference: Clause 5.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for NSD - Check HTTP Response Status Code Is 405 - -DELETE NSD - Method not implemented - [Documentation] Test ID: 5.3.1.11.12 - ... Test title: DELETE NSD - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor - ... Pre-conditions: none - ... Reference: Clause 5.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for NSD +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get single file NSD in Plain Format + [Documentation] Test ID: 5.3.1.11.1 + ... Test title: Get single file NSD in Plain Format + ... Test objective: The objective is to test the retrieval of the NSD in plain format within a NSD archive and perform a validation that returned content is in plain format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a single file + ... Post-Conditions: none + Get single file NSD in Plain Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get NSD in Zip Format + [Documentation] Test ID: 5.3.1.11.2 + ... Test title: Get NSD in Zip Format + ... Test objective: The objective is to test the retrieval of the NSD in zip format within a NSD archive and perform a validation that returned content is in zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD in Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get single file NSD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.11.3 + ... Test title: Get single file NSDin Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the single file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a single file + ... Post-Conditions: none + Get single file NSD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is Any of text/plain application/zip + +Get multi file NSD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.11.4 + ... Test title: Get multi file NSD in Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the multi file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a multi file + ... Post-Conditions: none + Get multi file NSD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get multi file NSD in Plain Format + [Documentation] Test ID: 5.3.1.11.5 + ... Test title: Get multi file NSD in Plain Format + ... Test objective: The objective is to test that the retrieval of the multi file NSD within a NSD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a multi file + ... Post-Conditions: none + Get multi file NSD in Plain Format + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD Content with invalid resource identifier + [Documentation] Test ID: 5.3.1.11.6 + ... Test title: Get NSD Content with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails when using an invalid resource identifier + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.11.7 + ... Test title: Get NSD with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails due to a conflict when the NSD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the NSD is different from ONBOARDED. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD with security information + [Documentation] Test ID: 5.3.1.11.8 + ... Test title: Get NSD with security information + ... Test objective: The objective is to test the retrieval of the NSD within a NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +POST NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.9 + ... Test title: POST NSD - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for NSD + Check HTTP Response Status Code Is 405 + +PUT NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.10 + ... Test title: PUT NSD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for NSD + Check HTTP Response Status Code Is 405 + +PATCH NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.11 + ... Test title: PATCH NSD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for NSD + Check HTTP Response Status Code Is 405 + +DELETE NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.12 + ... Test title: DELETE NSD - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for NSD Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDArchiveManifest.robot b/SOL005/NSDManagement-API/NSDArchiveManifest.robot index cc759e25a953f914e3171491ee2372c32028af63..7a09f534f1f07f5463d5e181768dc34777132b37 100644 --- a/SOL005/NSDManagement-API/NSDArchiveManifest.robot +++ b/SOL005/NSDManagement-API/NSDArchiveManifest.robot @@ -1,95 +1,95 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource NSDManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem - -*** Test Cases *** -Get NSD Archive Manifest - [Documentation] Test ID: 5.3.1.12.1 - ... Test title: Get NSD Archive Manifest - ... Test objective: The objective is to test that GET method reads the content of the manifest file within an NSD archive - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD Archive Manifest - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get NSD Archive Manifest with security information - [Documentation] Test ID: 5.3.1.12.2 - ... Test title: Get NSD Archive Manifest with security information - ... Test objective: The objective is to test the retrieval of content of the manifest file within an NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD Archive Manifest with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get NSD Archive Manifest with conflict due to onboarding state - [Documentation] Test ID: 5.3.1.12.3 - ... Test title: Get NSD Archive Manifest with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of content of the manifest file within an NSD archive fails due to a conflict when the NSD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the NSD is different from ONBOARDED. - ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NSD Archive Manifest with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST NSD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.12.4 - ... Test title: POST NSD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for NSD Archive Manifest - Check HTTP Response Status Code Is 405 - -PUT NSD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.12.5 - ... Test title: PUT NSD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for NSD Archive Manifest - Check HTTP Response Status Code Is 405 - -PATCH NSD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.12.6 - ... Test title: PATCH NSD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for NSD Archive Manifest - Check HTTP Response Status Code Is 405 - -DELETE NSD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.12.7 - ... Test title: DELETE NSD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for NSD Archive Manifest +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get NSD Archive Manifest + [Documentation] Test ID: 5.3.1.12.1 + ... Test title: Get NSD Archive Manifest + ... Test objective: The objective is to test that GET method reads the content of the manifest file within an NSD archive + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get NSD Archive Manifest with security information + [Documentation] Test ID: 5.3.1.12.2 + ... Test title: Get NSD Archive Manifest with security information + ... Test objective: The objective is to test the retrieval of content of the manifest file within an NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get NSD Archive Manifest with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.12.3 + ... Test title: Get NSD Archive Manifest with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of content of the manifest file within an NSD archive fails due to a conflict when the NSD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the NSD is different from ONBOARDED. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.4 + ... Test title: POST NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +PUT NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.5 + ... Test title: PUT NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +PATCH NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.6 + ... Test title: PATCH NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +DELETE NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.7 + ... Test title: DELETE NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for NSD Archive Manifest Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 9320d4be926946e3d712a2bfeb4b51504e2537af..9eeb0abdf133493d30ca936305f2531cc75bf080 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -10,14 +10,14 @@ Library JSONSchemaLibrary schemas/ Library RequestsLibrary Library Process Library String -Variables descriptors/SOL006/NSD/nsd_SOL006.yaml -Variables descriptors/SOL001/NSD/nsd_SOL001.yaml +#Variables descriptors/SOL006/NSD/nsd_SOL006.yaml +#Variables descriptors/SOL001/NSD/nsd_SOL001.yaml *** Keywords *** GET all Network Service Descriptors Information Log The GET method queries multiple NS descriptors Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -25,20 +25,20 @@ GET all Network Service Descriptors Information GET Network Service Descriptors Information with attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?${NSD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body NsdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${NSD_NAME} ,${SEPERATOR} + @{words} = Split String ${NSD_NAME} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['nsdName']} @{words}[1] GET Network Service Descriptors Information with invalid attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -47,7 +47,7 @@ Get all Network Service Descriptors Information with malformed authorization tok Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response REST.Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response @@ -66,7 +66,7 @@ Get all Network Service Descriptors Information with expired or revoked authoriz Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response @@ -75,7 +75,7 @@ Get all Network Service Descriptors Information with expired or revoked authoriz GET all Network Service Descriptors Information with all_fields attribute selector Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters "all_fields" Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -89,7 +89,7 @@ Check HTTP Response Body NsdInfos Matches the requested all_fields selector GET all Network Service Descriptors Information with exclude_default attribute selector Log Trying to get all NSDs present in the NFVO Catalogue, using exclude_default filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -103,7 +103,7 @@ Check HTTP Response Body NsdInfos Matches the requested exclude_default selector GET all Network Service Descriptors Information with fields attribute selector Log Trying to get all NSDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -111,7 +111,7 @@ GET all Network Service Descriptors Information with fields attribute selector GET all Network Service Descriptors Information with exclude_default and fields attribute selector Log Trying to get all NSDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_default&fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -126,7 +126,7 @@ GET all Network Service Descriptors Information with exclude_fields attribute se Log Trying to get all NSD Managements present in the NFVO Catalogue, using filter params Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -142,7 +142,7 @@ Send Post Request to create new Network Service Descriptor Resource Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/createNsdInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ Send Post Request to create new Network Service Descriptor Resource Check Postcondition NsdInfo Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -161,7 +161,7 @@ Send PUT Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -170,7 +170,7 @@ Send PATCH Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -179,7 +179,7 @@ Send DELETE Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -191,11 +191,12 @@ Check Postcondition Network Service Descriptors Exist GET Individual Network Service Descriptor Information Log The GET method reads information about an individual NS descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} - + Set Suite Variable ${usageState} ${response['body']['nsdUsageState']} + Check HTTP Response Body NsdInfo Identifier matches the requested Network Service Descriptor Information Log Going to validate info retrieved Should Be Equal ${response['body']['id']} ${nsdInfoId} @@ -204,7 +205,7 @@ Check HTTP Response Body NsdInfo Identifier matches the requested Network Servic GET Individual Network Service Descriptor Information with invalid resource identifier Log Trying to perform a GET on an erroneous nsDescriptorInfoId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId} Integer response status 404 ${output}= Output response @@ -216,7 +217,7 @@ Send PATCH to disable Individual Network Service Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationDisable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -237,7 +238,7 @@ Send PATCH to enable Individual Network Service Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -248,7 +249,7 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -259,7 +260,7 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${wrong_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -267,21 +268,21 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d Send DELETE Request for Individual Network Service Descriptor Log Trying to perform a DELETE nsdInfo. The nsdInfo should be in "NOT_USED" usageState and in "DISABLED" operationalState. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${disabledNsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition Network Service Descriptor is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${disabledNsdInfoId} Integer response status 404 Send DELETE Request for Individual Network Service Descriptor in operational state ENABLED Log Trying to perform a DELETE nsdInfo in ENABLED operational state Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -293,7 +294,7 @@ Send POST Request for Individual Network Service Descriptor Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -302,7 +303,7 @@ Send PUT Request for Individual Network Service Descriptor Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -330,7 +331,7 @@ Check HTTP Response Header Content-Length Is Present and Matches the requested r Get NSD Content in Zip Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -338,7 +339,7 @@ Get NSD Content in Zip Format Get NSD Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -346,7 +347,7 @@ Get NSD Content with invalid resource identifier Get NSD Content with conflict due to onboarding state Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -356,7 +357,7 @@ GET NSD Content with Range Request Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -366,22 +367,22 @@ GET NSD Content with invalid Range Request Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to upload NSD Content as zip file in asynchronous mode - Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} Set Suite Variable ${response} ${response} Send PUT Request to upload NSD Content as zip file in synchronous mode - Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -404,8 +405,8 @@ Check Postcondition NSD Content is uploaded and available in the NFVO Send PUT Request to upload NSD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD - Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} Log ${response} ${response}= Create Dictionary status=${response.status_code} headers=${response.headers} body=${response.json()} @@ -414,7 +415,7 @@ Send PUT Request to upload NSD Content with conflict due to onboarding state Send POST Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -422,7 +423,7 @@ Send POST Request for NSD Content Send PATCH Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -430,7 +431,7 @@ Send PATCH Request for NSD Content Send DELETE Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -438,7 +439,7 @@ Send DELETE Request for NSD Content GET all PNF Descriptors Information Log The GET method queries multiple PNF descriptors Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -446,20 +447,20 @@ GET all PNF Descriptors Information GET PNF Descriptors Information with attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?${PNFD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body PnfdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${PNFD_NAME} ,${SEPERATOR} + @{words} = Split String ${PNFD_NAME} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['pnfdName']} @{words}[1] GET PNF Descriptors Information with invalid attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -467,7 +468,7 @@ GET PNF Descriptors Information with invalid attribute-based filter GET all PNF Descriptors Information with all_fields attribute selector Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters "all_fields" Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -481,7 +482,7 @@ Check HTTP Response Body PnfdInfos Matches the requested all_fields selector GET all PNF Descriptors Information with exclude_default attribute selector Log Trying to get all PNFDs present in the NFVO Catalogue, using exclude_default filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -495,7 +496,7 @@ Check HTTP Response Body PnfdInfos Matches the requested exclude_default selecto GET all PNF Descriptors Information with fields attribute selector Log Trying to get all PNFDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -503,7 +504,7 @@ GET all PNF Descriptors Information with fields attribute selector GET all PNF Descriptors Information with exclude_default and fields attribute selector Log Trying to get all PNFDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_default&fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -518,7 +519,7 @@ GET all PNF Descriptors Information with exclude_fields attribute selector Log Trying to get all PNF present in the NFVO Catalogue, using filter params Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -534,7 +535,7 @@ Send Post Request to create new PNF Descriptor Resource Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/createPnfdInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -542,7 +543,7 @@ Send Post Request to create new PNF Descriptor Resource Check Postcondition PnfdInfo Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -553,7 +554,7 @@ Send PUT Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -562,7 +563,7 @@ Send PATCH Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -571,7 +572,7 @@ Send DELETE Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -579,7 +580,7 @@ Send DELETE Request for all PNF Descriptors GET Individual PNF Descriptor Information Log The GET method reads information about an individual PNF descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -592,7 +593,7 @@ Check HTTP Response Body PnfdInfo Identifier matches the requested PNF Descripto GET Individual PNF Descriptor Information with invalid resource identifier Log Trying to perform a GET on an erroneous nsDescriptorInfoId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${erroneous_pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -603,7 +604,7 @@ Send PATCH to update Individual PNF Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/PnfdInfoModification.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -619,7 +620,7 @@ Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failu Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${wrong_etag}"} ${body}= Get File jsons/PnfdInfoModification.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -627,14 +628,14 @@ Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failu Send DELETE Request for Individual PNF Descriptor Log Trying to perform a DELETE pnfdInfo. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition PNF Descriptor is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} Integer response status 404 @@ -642,7 +643,7 @@ Send POST Request for Individual PNF Descriptor Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -651,7 +652,7 @@ Send PUT Request for Individual PNF Descriptor Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -659,7 +660,7 @@ Send PUT Request for Individual PNF Descriptor Get PNFD Content Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -668,7 +669,7 @@ Get PNFD Content with Range Request Log Trying to get a NSD present in the NFVO Catalogue with range request Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -677,7 +678,7 @@ Get PNFD Content with invalid Range Request Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -685,7 +686,7 @@ Get PNFD Content with invalid Range Request Get PNFD Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${erroneous_pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -693,15 +694,15 @@ Get PNFD Content with invalid resource identifier Get PNFD Content with conflict due to onboarding state Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${onboardingStatePnfdId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to upload PNFD Content as zip file Log Trying to perform a PUT. This method upload the content of a PNFD - Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File ${contentZipFile} + Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipPnfd} ${response}= Put Request pnfd ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -710,16 +711,17 @@ Send PUT Request to upload PNFD Content as zip file Send PUT Request to upload PNFD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a PNFD Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File ${contentFilePnfd} - REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${creatingNsdInfoId}/pnfd_content ${body} + Set Headers {"Content-Type": "application/zip"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get Binary File ${contentZipPnfd} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${creatingPnfdInfoId}/pnfd_content ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -727,7 +729,7 @@ Send POST Request for PNFD Content Send PATCH Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -735,7 +737,7 @@ Send PATCH Request for PNFD Content Send DELETE Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -748,7 +750,7 @@ Get all NSD Management Subscriptions ... specified in the Tables 5.4.8.3.2-1 and 5.4.8.3.2-2. Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -756,7 +758,7 @@ Get all NSD Management Subscriptions Get NSD Management Subscriptions with attribute-based filters Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -765,7 +767,7 @@ Get NSD Management Subscriptions with attribute-based filters Get NSD Management Subscriptions with invalid attribute-based filters Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -774,7 +776,7 @@ Get NSD Management Subscriptions with invalid attribute-based filters Get NSD Management Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -788,13 +790,19 @@ Send Post Request for NSD Management Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send POST Request for Duplicated NSD Management Subscription @@ -803,13 +811,19 @@ Send POST Request for Duplicated NSD Management Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/subscriptions.json - ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint @@ -817,7 +831,7 @@ Send Put Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -827,7 +841,7 @@ Send Patch Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -836,7 +850,7 @@ Send Delete Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -865,7 +879,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NSD Management Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription @@ -880,7 +894,7 @@ Check Postcondition NSD Management Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -889,7 +903,7 @@ Check Postcondition NSD Management Subscription Is Set Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -907,7 +921,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual NSD Management Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -915,7 +929,7 @@ Get Individual NSD Management Subscription GET individual NSD Management Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -923,7 +937,7 @@ GET individual NSD Management Subscription with invalid resource identifier Send Delete request for individual NSD Management Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -936,19 +950,19 @@ Check Postcondition NSD Management Subscription is Deleted Send Delete request for individual NSD Management Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -957,7 +971,7 @@ Send Put request for individual NSD Management Subscription Set Suite Variable ${response} ${output} Send Patch request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -981,7 +995,6 @@ Check HTTP Response Header Contains Etag Set Suite Variable ${original_etag} ${response['headers]['ETag']} Create Sessions - Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri} @@ -999,7 +1012,7 @@ Check HTTP Response Header Contain Link Check PostCondition GET Individual Network Service Descriptor Information Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} Should Be Equal As Strings ${response['status']} 200 @@ -1009,7 +1022,7 @@ Wait for individual grant successful notification Get single file NSD in Plain Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1017,7 +1030,7 @@ Get single file NSD in Plain Format Get NSD in Zip Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1026,7 +1039,7 @@ Get single file NSD in Plain or Zip Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1035,7 +1048,7 @@ Get multi file NSD in Plain or Zip Format Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1043,7 +1056,7 @@ Get multi file NSD in Plain or Zip Format Get multi file NSD in Plain Format Log Trying to get a negative case performing a get on a NSD present in the NFVO Catalogue. Accept will be text/plain but NSD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1052,7 +1065,7 @@ Get NSD with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1061,7 +1074,7 @@ Get NSD with conflict due to onboarding state Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1069,7 +1082,7 @@ Get NSD with conflict due to onboarding state Send POST Request for NSD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1077,7 +1090,7 @@ Send POST Request for NSD Send PUT Request for NSD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1085,7 +1098,7 @@ Send PUT Request for NSD Send PATCH Request for NSD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1093,7 +1106,7 @@ Send PATCH Request for NSD Send DELETE Request for NSD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1101,14 +1114,14 @@ Send DELETE Request for NSD Get NSD with security information Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} Get NSD Archive Manifest Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1116,7 +1129,7 @@ Get NSD Archive Manifest Get NSD Archive Manifest with security information Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1125,7 +1138,7 @@ Get NSD Archive Manifest with conflict due to onboarding state Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1133,7 +1146,7 @@ Get NSD Archive Manifest with conflict due to onboarding state Send POST Request for NSD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1141,7 +1154,7 @@ Send POST Request for NSD Archive Manifest Send PUT Request for NSD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1149,7 +1162,7 @@ Send PUT Request for NSD Archive Manifest Send PATCH Request for NSD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1157,7 +1170,7 @@ Send PATCH Request for NSD Archive Manifest Send DELETE Request for NSD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1165,7 +1178,7 @@ Send DELETE Request for NSD Archive Manifest Get single file PNFD in Plain Format Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1173,7 +1186,7 @@ Get single file PNFD in Plain Format Get PNFD in Zip Format Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1182,7 +1195,7 @@ Get single file PNFD in Plain or Zip Format Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1191,7 +1204,7 @@ Get multi file PNFD in Plain or Zip Format Log Trying to get a VNFD from a given PNFD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1199,7 +1212,7 @@ Get multi file PNFD in Plain or Zip Format Get multi file PNFD in Plain Format Log Trying to get a negative case performing a get on a PNFD present in the NFVO Catalogue. Accept will be text/plain but PNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1208,7 +1221,7 @@ Get PNFD with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_PNFDInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1217,7 +1230,7 @@ Get PNFD with conflict due to onboarding state Log Trying to get a VNFD from a given PNFD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${onboardingStatePnfdId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1225,7 +1238,7 @@ Get PNFD with conflict due to onboarding state Get PNFD with security information Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1233,7 +1246,7 @@ Get PNFD with security information Send POST Request for PNFD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1241,7 +1254,7 @@ Send POST Request for PNFD Send PUT Request for PNFD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1249,7 +1262,7 @@ Send PUT Request for PNFD Send PATCH Request for PNFD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -1257,14 +1270,14 @@ Send PATCH Request for PNFD Send DELETE Request for PNFD Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd ${output}= Output response Set Suite Variable ${response} ${output} Get PNFD Archive Manifest Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1272,7 +1285,7 @@ Get PNFD Archive Manifest Get PNFD Archive Manifest with security information Log Trying to get a PNFD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1281,7 +1294,7 @@ Get PNFD Archive Manifest with conflict due to onboarding state Log Trying to get a PNFD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1289,7 +1302,7 @@ Get PNFD Archive Manifest with conflict due to onboarding state Send POST Request for PNFD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1297,7 +1310,7 @@ Send POST Request for PNFD Archive Manifest Send PUT Request for PNFD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1305,7 +1318,7 @@ Send PUT Request for PNFD Archive Manifest Send PATCH Request for PNFD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1313,7 +1326,7 @@ Send PATCH Request for PNFD Archive Manifest Send DELETE Request for PNFD Archive Manifest Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1330,6 +1343,7 @@ PARSE the NS Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file Fetch Information from SOL001 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml ${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptorId} ${designer}= Get Variable Value ${topology_template.node_templates.properties.designer} ${version}= Get Variable Value ${topology_template.node_templates.properties.version} @@ -1343,6 +1357,7 @@ Fetch Information from SOL001 NS descriptor file Set Global Variable ${NS_InvariantID} ${invariantId} Fetch Information from SOL006 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml ${nsd_id}= Get Variable Value ${nfv.nsd[0].id} Set Global Variable ${NS_DescriptorID} ${nsd_id} diff --git a/SOL005/NSDManagement-API/NSDManagementNotification.robot b/SOL005/NSDManagement-API/NSDManagementNotification.robot index 0648fb1980705bbbb18423f849ed43bab2949ac8..df9d2d0e070b118558263f7d77ff9397e3eb06aa 100644 --- a/SOL005/NSDManagement-API/NSDManagementNotification.robot +++ b/SOL005/NSDManagement-API/NSDManagementNotification.robot @@ -222,8 +222,10 @@ Configure PNFD Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Deletion Handler @@ -232,8 +234,10 @@ Configure NSD Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Operational State Change Handler @@ -242,8 +246,10 @@ Configure NSD Operational State Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure PNFD Onboarding Handler @@ -252,8 +258,10 @@ Configure PNFD Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification PNFD Onboarding Failure Handler @@ -262,8 +270,10 @@ Configure Notification PNFD Onboarding Failure Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Onboarding Handler @@ -272,8 +282,10 @@ Configure NSD Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification NSD Onboarding Failure Handler @@ -282,8 +294,10 @@ Configure Notification NSD Onboarding Failure Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSDManagement-API/NotificationConsumer.robot b/SOL005/NSDManagement-API/NotificationConsumer.robot index 59492691d17979c98fd74058737520a753ae6ab6..d769f58f136bca694990781c9c0b2052591b6cb6 100644 --- a/SOL005/NSDManagement-API/NotificationConsumer.robot +++ b/SOL005/NSDManagement-API/NotificationConsumer.robot @@ -1,190 +1,190 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library OperatingSystem -Library JSONLibrary -Library String -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri -Resource NSDManagementKeywords.robot - -*** Test Cases *** -NSD Onboarding Notification - [Documentation] Test ID: 5.3.1.15.1 - ... Test title: NSD Onboarding Notification - ... Test objective: The objective is to test that NSD Onboarding Notification is delivered with success to the notification consumer. - ... Pre-conditions: A NSD management subscription for onboarding notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NSD Onboarding Notification - Check HTTP Response Status Code Is 204 - -NSD Onboarding Failure Notification - [Documentation] Test ID: 5.3.1.15.2 - ... Test title: NSD Onboarding Failure Notification - ... Test objective: The objective is to test that NSD Onboarding Failure Notification is delivered with success to the notification consumer. - ... Pre-conditions: A NSD management subscription for onboarding failure notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NSD Onboarding Failure Notification - Check HTTP Response Status Code Is 204 - -NSD Change Notification - [Documentation] Test ID: 5.3.1.15.3 - ... Test title: NSD Change Notification - ... Test objective: The objective is to test that NSD Change Notification is delivered with success to the notification consumer. - ... Pre-conditions: A NSD management subscription for change notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NSD Change Notification - Check HTTP Response Status Code Is 204 - -NSD Deletion Notification - [Documentation] Test ID: 5.3.1.15.4 - ... Test title: NSD Deletion Notification - ... Test objective: The objective is to test that NSD Deletion Notification is delivered with success to the notification consumer. - ... Pre-conditions: A NSD management subscription for deletion notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NSD Deletion Notification - Check HTTP Response Status Code Is 204 - -Pnfd Onboarding Notification - [Documentation] Test ID: 5.3.1.15.5 - ... Test title: Pnfd Onboarding Notification - ... Test objective: The objective is to test that Pnfd Onboarding Notification is delivered with success to the notification consumer. - ... Pre-conditions: A Pnfd management subscription for onboarding notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Pnfd Onboarding Notification - Check HTTP Response Status Code Is 204 - -Pnfd Onboarding Failure Notification - [Documentation] Test ID: 5.3.1.15.6 - ... Test title: Pnfd Onboarding Failure Notification - ... Test objective: The objective is to test that Pnfd Onboarding Failure Notification is delivered with success to the notification consumer. - ... Pre-conditions: A Pnfd management subscription for onboarding failure notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Pnfd Onboarding Failure Notification - Check HTTP Response Status Code Is 204 - -Pnfd Deletion Notification - [Documentation] Test ID: 5.3.1.15.7 - ... Test title: pnfd Deletion Notification - ... Test objective: The objective is to test that Pnfd Deletion Notification is delivered with success to the notification consumer. - ... Pre-conditions: A Pnfd management subscription for deletion notification is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Pnfd Deletion Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body PkgmSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post NSD Onboarding Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File - ${template} = Get File jsons/notifications/NsdOnBoardingNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post NSD Onboarding Failure Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File - ${template} = Get File jsons/notifications/NsdOnBoardingFailureNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post NSD Change Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File - ${template} = Get File jsons/notifications/NsdChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post NSD Deletion Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File - ${template} = Get File jsons/notifications/NsdDeletionNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Pnfd Onboarding Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/notifications/PnfdOnBoardingNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Pnfd Onboarding Failure Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/notifications/PnfdOnBoardingFailureNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Pnfd Deletion Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/notifications/pnfdDeletionNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri +Resource NSDManagementKeywords.robot + +*** Test Cases *** +NSD Onboarding Notification + [Documentation] Test ID: 5.3.1.15.1 + ... Test title: NSD Onboarding Notification + ... Test objective: The objective is to test that NSD Onboarding Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for onboarding notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Onboarding Notification + Check HTTP Response Status Code Is 204 + +NSD Onboarding Failure Notification + [Documentation] Test ID: 5.3.1.15.2 + ... Test title: NSD Onboarding Failure Notification + ... Test objective: The objective is to test that NSD Onboarding Failure Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for onboarding failure notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Onboarding Failure Notification + Check HTTP Response Status Code Is 204 + +NSD Change Notification + [Documentation] Test ID: 5.3.1.15.3 + ... Test title: NSD Change Notification + ... Test objective: The objective is to test that NSD Change Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for change notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Change Notification + Check HTTP Response Status Code Is 204 + +NSD Deletion Notification + [Documentation] Test ID: 5.3.1.15.4 + ... Test title: NSD Deletion Notification + ... Test objective: The objective is to test that NSD Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for deletion notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Deletion Notification + Check HTTP Response Status Code Is 204 + +Pnfd Onboarding Notification + [Documentation] Test ID: 5.3.1.15.5 + ... Test title: Pnfd Onboarding Notification + ... Test objective: The objective is to test that Pnfd Onboarding Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for onboarding notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Onboarding Notification + Check HTTP Response Status Code Is 204 + +Pnfd Onboarding Failure Notification + [Documentation] Test ID: 5.3.1.15.6 + ... Test title: Pnfd Onboarding Failure Notification + ... Test objective: The objective is to test that Pnfd Onboarding Failure Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for onboarding failure notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Onboarding Failure Notification + Check HTTP Response Status Code Is 204 + +Pnfd Deletion Notification + [Documentation] Test ID: 5.3.1.15.7 + ... Test title: pnfd Deletion Notification + ... Test objective: The objective is to test that Pnfd Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for deletion notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Deletion Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post NSD Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdOnBoardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Onboarding Failure Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdOnBoardingFailureNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/PnfdOnBoardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Onboarding Failure Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/PnfdOnBoardingFailureNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/pnfdDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/PNFD.robot b/SOL005/NSDManagement-API/PNFD.robot index 342fefbcd290e3bd29c4eaa6f3cf97f2647f3237..04a83b634cad5b0425ca44435409dd2aed2553d8 100644 --- a/SOL005/NSDManagement-API/PNFD.robot +++ b/SOL005/NSDManagement-API/PNFD.robot @@ -1,161 +1,161 @@ -*** Settings *** -Documentation This Clause defines the content of the individual NS descriptor, i.e. PNFD content -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource NSDManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem - -*** Test Cases *** -Get single file PNFD in Plain Format - [Documentation] Test ID: 5.3.1.13.1 - ... Test title: Get single file PNFD in Plain Format - ... Test objective: The objective is to test the retrieval of the PNFD in plain format within a PNFD archive and perform a validation that returned content is in plain format - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The PNFD is implemented as a single file - ... Post-Conditions: none - Get single file PNFD in Plain Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get PNFD in Zip Format - [Documentation] Test ID: 5.3.1.13.2 - ... Test title: Get PNFD in Zip Format - ... Test objective: The objective is to test the retrieval of the PNFD in zip format within a PNFD archive and perform a validation that returned content is in zip format - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD in Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get single file PNFD in Plain or Zip Format - [Documentation] Test ID: 5.3.1.13.3 - ... Test title: Get single file PNFDin Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the single file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The PNFD is implemented as a single file - ... Post-Conditions: none - Get single file PNFD in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is Any of text/plain application/zip - -Get multi file PNFD in Plain or Zip Format - [Documentation] Test ID: 5.3.1.13.4 - ... Test title: Get multi file PNFD in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the multi file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The PNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file PNFD in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get multi file PNFD in Plain Format - [Documentation] Test ID: 5.3.1.13.5 - ... Test title: Get multi file PNFD in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file PNFD within a PNFD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The PNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file PNFD in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get PNFD Content with invalid resource identifier - [Documentation] Test ID: 5.3.1.13.6 - ... Test title: Get PNFD Content with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails when using an invalid resource identifier - ... Pre-conditions: none - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD with invalid resource identifier - Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get PNFD with conflict due to onboarding state - [Documentation] Test ID: 5.3.1.13.7 - ... Test title: Get PNFD with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get PNFD with security information - [Documentation] Test ID: 5.3.1.13.8 - ... Test title: Get PNFD with security information - ... Test objective: The objective is to test the retrieval of the PNFD within a PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -POST PNFD - Method not implemented - [Documentation] Test ID: 5.3.1.13.9 - ... Test title: POST PNFD - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new PNFD - ... Pre-conditions: none - ... Reference: Clause 5.4.7a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for PNFD - Check HTTP Response Status Code Is 405 - -PUT PNFD - Method not implemented - [Documentation] Test ID: 5.3.1.13.10 - ... Test title: PUT PNFD - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD - ... Pre-conditions: none - ... Reference: Clause 5.4.7a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for PNFD - Check HTTP Response Status Code Is 405 - -PATCH PNFD - Method not implemented - [Documentation] Test ID: 5.3.1.13.11 - ... Test title: PATCH PNFD - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD - ... Pre-conditions: none - ... Reference: Clause 5.4.7a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for PNFD - Check HTTP Response Status Code Is 405 - -DELETE PNFD - Method not implemented - [Documentation] Test ID: 5.3.1.13.12 - ... Test title: DELETE PNFD - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete PNFD - ... Pre-conditions: none - ... Reference: Clause 5.4.7a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for PNFD +*** Settings *** +Documentation This Clause defines the content of the individual NS descriptor, i.e. PNFD content +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get single file PNFD in Plain Format + [Documentation] Test ID: 5.3.1.13.1 + ... Test title: Get single file PNFD in Plain Format + ... Test objective: The objective is to test the retrieval of the PNFD in plain format within a PNFD archive and perform a validation that returned content is in plain format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a single file + ... Post-Conditions: none + Get single file PNFD in Plain Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get PNFD in Zip Format + [Documentation] Test ID: 5.3.1.13.2 + ... Test title: Get PNFD in Zip Format + ... Test objective: The objective is to test the retrieval of the PNFD in zip format within a PNFD archive and perform a validation that returned content is in zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD in Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get single file PNFD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.13.3 + ... Test title: Get single file PNFDin Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the single file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a single file + ... Post-Conditions: none + Get single file PNFD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is Any of text/plain application/zip + +Get multi file PNFD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.13.4 + ... Test title: Get multi file PNFD in Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the multi file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file PNFD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get multi file PNFD in Plain Format + [Documentation] Test ID: 5.3.1.13.5 + ... Test title: Get multi file PNFD in Plain Format + ... Test objective: The objective is to test that the retrieval of the multi file PNFD within a PNFD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file PNFD in Plain Format + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD Content with invalid resource identifier + [Documentation] Test ID: 5.3.1.13.6 + ... Test title: Get PNFD Content with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails when using an invalid resource identifier + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.13.7 + ... Test title: Get PNFD with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD with security information + [Documentation] Test ID: 5.3.1.13.8 + ... Test title: Get PNFD with security information + ... Test objective: The objective is to test the retrieval of the PNFD within a PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +POST PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.9 + ... Test title: POST PNFD - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for PNFD + Check HTTP Response Status Code Is 405 + +PUT PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.10 + ... Test title: PUT PNFD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for PNFD + Check HTTP Response Status Code Is 405 + +PATCH PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.11 + ... Test title: PATCH PNFD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for PNFD + Check HTTP Response Status Code Is 405 + +DELETE PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.12 + ... Test title: DELETE PNFD - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for PNFD Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/PNFDArchiveManifest.robot b/SOL005/NSDManagement-API/PNFDArchiveManifest.robot index a2adf90a4094aa7b3412f26bb70a1abb9b36f863..8ab2a18746664d966a4375016268b0f5d7ba79d0 100644 --- a/SOL005/NSDManagement-API/PNFDArchiveManifest.robot +++ b/SOL005/NSDManagement-API/PNFDArchiveManifest.robot @@ -1,95 +1,95 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource NSDManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem - -*** Test Cases *** -Get PNFD Archive Manifest - [Documentation] Test ID: 5.3.1.14.1 - ... Test title: Get PNFD Archive Manifest - ... Test objective: The objective is to test that GET method reads the content of the manifest file within an PNFD archive - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD Archive Manifest - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get PNFD Archive Manifest with security information - [Documentation] Test ID: 5.3.1.14.2 - ... Test title: Get PNFD Archive Manifest with security information - ... Test objective: The objective is to test the retrieval of content of the manifest file within an PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter - ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD Archive Manifest with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get PNFD Archive Manifest with conflict due to onboarding state - [Documentation] Test ID: 5.3.1.14.3 - ... Test title: Get PNFD Archive Manifest with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of content of the manifest file within an PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED. - ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get PNFD Archive Manifest with conflict due to onboarding state - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST PNFD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.14.4 - ... Test title: POST PNFD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.7b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for PNFD Archive Manifest - Check HTTP Response Status Code Is 405 - -PUT PNFD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.14.5 - ... Test title: PUT PNFD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.7b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for PNFD Archive Manifest - Check HTTP Response Status Code Is 405 - -PATCH PNFD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.14.6 - ... Test title: PATCH PNFD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.7b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for PNFD Archive Manifest - Check HTTP Response Status Code Is 405 - -DELETE PNFD Archive Manifest - Method not implemented - [Documentation] Test ID: 5.3.1.14.7 - ... Test title: DELETE PNFD Archive Manifest - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest - ... Pre-conditions: none - ... Reference: Clause 5.4.7b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for PNFD Archive Manifest +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get PNFD Archive Manifest + [Documentation] Test ID: 5.3.1.14.1 + ... Test title: Get PNFD Archive Manifest + ... Test objective: The objective is to test that GET method reads the content of the manifest file within an PNFD archive + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get PNFD Archive Manifest with security information + [Documentation] Test ID: 5.3.1.14.2 + ... Test title: Get PNFD Archive Manifest with security information + ... Test objective: The objective is to test the retrieval of content of the manifest file within an PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get PNFD Archive Manifest with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.14.3 + ... Test title: Get PNFD Archive Manifest with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of content of the manifest file within an PNFD archive fails due to a conflict when the PNFD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the PNFD is different from ONBOARDED. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.4 + ... Test title: POST PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +PUT PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.5 + ... Test title: PUT PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +PATCH PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.6 + ... Test title: PATCH PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +DELETE PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.7 + ... Test title: DELETE PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for PNFD Archive Manifest Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml b/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml index a2a363b27113f2a4aa78dc15a4e30dfec4f83b01..a1c3a8d51b4cb2a5cc8b097def3d9c194dbb4dc6 100644 --- a/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml +++ b/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml @@ -1,6 +1,10 @@ tosca_definitions_version: "tosca_simple_yaml_1_2" tosca_default_namespace: "toscanfv" description: "Referenxce NSD descriptor " + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_nsd_types.yaml + metadata: descriptor_id: "NSD_WITH_2_VNF" vendor: "ETSI" diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index b1441c67c40da1f670dd66ca7066f0da2371bb64..38f419fdb1ca2b66bacad62dfb2a0633f076f67d 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -2,12 +2,13 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken ${apiMajorVersion} v1 ${apiName} nsd ${FIELD_USAGE} 1 @@ -44,7 +45,7 @@ ${newSubscriptionId} newSubsciptionId ${origResponse} httpresponse -${POS_FIELDS} name=nsdOnboardingState +${POS_FIELDS} nsdOnboardingState=ONBOARDED ${NEG_FIELDS} wrongName=any_value ${nsdInfoId} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 ${nsdInfoIdPlain} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 @@ -64,10 +65,10 @@ ${NFVO_RANGE_OK} 1 ${range} bytes=0-1023 ${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes ${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 -${contentZipFile} files/nsdContent.zip -${contentPlainFile} files/nsdContent.yaml +${contentZipNsd} files/nsd.zip +${contentFileNsd} files/nsd.yml ${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 -${BAD_AUTHORIZATION} Bear sometoken +${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${original_etag} 1234 ${wrong_etag} abcd ${usageState} state @@ -75,15 +76,17 @@ ${length} 1024 ${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f ${NSD_NAME} nsdName=onBoardedNSD ${PNFD_NAME} pnfdName=onBoardedPNFD -${SEPERATOR} = +${SEPARATOR} = ${pnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 +${creatingPnfdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 ${erroneous_pnfdInfoId} erroneous_pnfdInfoId ${enabledPnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 ${erroneous_pnfdId} erroneousPnfdId ${onboardingStatePnfdId} 8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2 -${contentFilePnfd} files/pnfdContent.zip +${contentZipPnfd} files/pnfd.zip +${contentFilePnfd} files/pnfd.yml ${creatingPnfdId} 2e4ce0ef-3ea8-49f9-92dd-8771866015bb ${userDefinedDataSet} some diff --git a/SOL005/NSDManagement-API/files/nsd.zip b/SOL005/NSDManagement-API/files/nsd.zip new file mode 100644 index 0000000000000000000000000000000000000000..3da59324d05257bf196313ef7c3fddcb70eebdd8 Binary files /dev/null and b/SOL005/NSDManagement-API/files/nsd.zip differ diff --git a/SOL005/NSDManagement-API/files/pnfd.zip b/SOL005/NSDManagement-API/files/pnfd.zip new file mode 100644 index 0000000000000000000000000000000000000000..b7c575541e64bd2f2b3d9fa979c7e6ef4d877139 Binary files /dev/null and b/SOL005/NSDManagement-API/files/pnfd.zip differ diff --git a/SOL005/NSDManagement-API/files/pnfdContent.zip b/SOL005/NSDManagement-API/files/pnfdContent.zip deleted file mode 100644 index 16151601c098de41c91ba4301540a3bfb355cbdb..0000000000000000000000000000000000000000 Binary files a/SOL005/NSDManagement-API/files/pnfdContent.zip and /dev/null differ diff --git a/SOL005/NSDManagement-API/jsons/subscriptions.json b/SOL005/NSDManagement-API/jsons/subscriptions.json index a82df503c1ea79cf12b8959f86662853c96c2e63..b94f3efea9967fe38bebc25174d9ac74881bea59 100644 --- a/SOL005/NSDManagement-API/jsons/subscriptions.json +++ b/SOL005/NSDManagement-API/jsons/subscriptions.json @@ -1,5 +1,5 @@ {{ - "callbackUri": "{notifCallbackUri}", + "callbackUri": "{callback_uri}{callback_endpoint}", "filter": {{ "nsdId": "{nsdId}", "nsdName": "{nsdName}", diff --git a/SOL005/NSFaultManagement-API/ApiVersion.robot b/SOL005/NSFaultManagement-API/ApiVersion.robot index 5b8291f740ab351dcdd9a583d6b1f836ca710123..663f8b96d950f0761d0074cb0fc7f0a6c9add238 100644 --- a/SOL005/NSFaultManagement-API/ApiVersion.robot +++ b/SOL005/NSFaultManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index d67a251d2d18a501781683dcea5c3c4e36c1cf19..406c95fc11580ef9468885581f6c19fe037b3269 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -18,7 +18,7 @@ Create Sessions Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 @@ -60,7 +60,7 @@ Check Operation Occurrence Id POST Alarms log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -68,7 +68,7 @@ POST Alarms PATCH Alarms log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse} = Output response Set Global Variable ${response} ${outputResponse} @@ -76,7 +76,7 @@ PATCH Alarms PUT Alarms 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -84,7 +84,7 @@ PUT Alarms DELETE Alarms log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -92,7 +92,7 @@ DELETE Alarms GET Alarms Log Query NFVO The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response @@ -101,7 +101,7 @@ GET Alarms GET Alarms With Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${nsInstanceId} ${outputResponse}= Output response @@ -110,7 +110,7 @@ GET Alarms With Filters GET Alarms With Invalid Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} ${outputResponse}= Output response @@ -118,35 +118,35 @@ GET Alarms With Invalid Filters GET Alarms Task with all_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} POST Individual Alarm 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -154,7 +154,7 @@ POST Individual Alarm DELETE Individual Alarm log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -162,7 +162,7 @@ DELETE Individual Alarm PUT Individual Alarm 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -171,7 +171,7 @@ GET Individual Alarm Log Query NFVO The GET method queries information about an alarm. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response @@ -181,7 +181,7 @@ GET Invalid Individual Alarm Log Query NFVO The GET method queries information about an invalid alarm. Should return does not exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${invalidAlarmId} ${outputResponse}= Output response @@ -191,7 +191,7 @@ PATCH Individual 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -202,7 +202,7 @@ PATCH Individual Alarm Conflict 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response @@ -212,19 +212,27 @@ POST Subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/fmSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint # Post Create subscription - DUPLICATION # Log Trying to create a subscription with an already created content # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test # Set Headers {"Accept": "${ACCEPT}"} # Set Headers {"Content-Type": "${CONTENT_TYPE}"} - # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} # ${template}= Get File jsons/fmSubscriptionRequest.json # ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} @@ -236,7 +244,7 @@ POST Subscription # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 NVFO permits duplication. Skipping the test # Set Headers {"Accept": "${ACCEPT}"} # Set Headers {"Content-Type": "${CONTENT_TYPE}"} - # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} # ${template}= Get File jsons/fmSubscriptionRequest.json # ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} @@ -246,7 +254,7 @@ POST Subscription GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -254,7 +262,7 @@ GET Subscriptions GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -262,7 +270,7 @@ GET Subscriptions with filter GET Subscriptions with Invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -270,35 +278,35 @@ GET Subscriptions with Invalid filter Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT Subscriptions log Trying to perform a PUT Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -306,7 +314,7 @@ PUT Subscriptions PATCH Subscriptions log Trying to perform a PATCH Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -314,7 +322,7 @@ PATCH Subscriptions DELETE Subscriptions log Trying to perform a DELETE Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -322,7 +330,7 @@ DELETE Subscriptions POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -330,7 +338,7 @@ POST Individual Subscription GET Individual Subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -338,7 +346,7 @@ GET Individual Subscription PUT Individual Subscription 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -346,7 +354,7 @@ PUT Individual Subscription PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -354,7 +362,7 @@ PATCH Individual Subscription DELETE Individual Subscription log Trying to perform a DELETE. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -435,7 +443,7 @@ Check HTTP Response Header Contains Location GET Alarm With Filter "id" Log Query NFVO The GET method queries information about multiple alarms with filter "id". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?id=${alarmId} ${outputResponse}= Output response @@ -447,7 +455,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyNestedNsInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyNestedNsInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyNestedNsInstanceId=${faultyNestedNsInstanceId} ${outputResponse}= Output response @@ -461,7 +469,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyNsVirtualLinkInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId=${faultyNsVirtualLinkInstanceId} ${outputResponse}= Output response @@ -475,7 +483,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyVnfInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyVnfInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyVnfInstanceId=${faultyVnfInstanceId} ${outputResponse}= Output response @@ -489,7 +497,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyResource_faultyResourceType" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyResource.faultyResourceType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} ${outputResponse}= Output response @@ -503,7 +511,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "eventType" Log Query VNF The GET method queries information about multiple alarms with filters "eventType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?eventType=${eventType} ${outputResponse}= Output response @@ -517,7 +525,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "perceivedSeverity" Log Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?perceivedSeverity=${perceivedSeverity} ${outputResponse}= Output response @@ -531,7 +539,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "probableCause" Log Query VNF The GET method queries information about multiple alarms with filters "probableCause". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?probableCause=${probableCause} ${outputResponse}= Output response @@ -545,7 +553,7 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -556,7 +564,7 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -569,7 +577,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -582,7 +590,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -595,7 +603,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -608,7 +616,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSFaultManagement-API/NotificationConsumer.robot b/SOL005/NSFaultManagement-API/NotificationConsumer.robot index eaeb2cc10afc1fb828e01d55ae1dd4dd9952d72a..5964b816e632d1942a5e71e41d284db73bd19c2a 100644 --- a/SOL005/NSFaultManagement-API/NotificationConsumer.robot +++ b/SOL005/NSFaultManagement-API/NotificationConsumer.robot @@ -1,93 +1,93 @@ -*** Settings *** -Library String -Library OperatingSystem -Resource environment/variables.txt -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -NS Fault Alarm Notification - [Documentation] Test ID: 5.3.3.7.1 - ... Test title: NS Fault Alarm Notification - ... Test objective: The objective is to test that NS Fault Alarm Notification is delivered with success to the notification consumer - ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm Notification - Check HTTP Response Status Code Is 204 - -NS Fault Alarm Cleared Notification - [Documentation] Test ID: 5.3.3.7.2 - ... Test title: NS Fault Alarm Cleared Notification - ... Test objective: The objective is to test that NS Fault Alarm Cleared Notification is delivered with success to the notification consumer - ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm cleared notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm Cleared Notification - Check HTTP Response Status Code Is 204 - -NS Fault Alarm List Rebuilt Notification - [Documentation] Test ID: 5.3.3.7.3 - ... Test title: NS Fault Alarm List Rebuilt Notification - ... Test objective: The objective is to test that NS Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer - ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Alarm List Rebuilt Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body FmSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Alarm Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm Cleared Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmClearedNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Alarm List Rebuilt Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/AlarmListRebuiltNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library String +Library OperatingSystem +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +NS Fault Alarm Notification + [Documentation] Test ID: 5.3.3.7.1 + ... Test title: NS Fault Alarm Notification + ... Test objective: The objective is to test that NS Fault Alarm Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification + Check HTTP Response Status Code Is 204 + +NS Fault Alarm Cleared Notification + [Documentation] Test ID: 5.3.3.7.2 + ... Test title: NS Fault Alarm Cleared Notification + ... Test objective: The objective is to test that NS Fault Alarm Cleared Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm cleared notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +NS Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 5.3.3.7.3 + ... Test title: NS Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test that NS Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot index 97421160ea335abcccb43cc18607d4a3aac21efe..90910ca8db0316fe176c0b58662beee516b520c5 100644 --- a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot @@ -114,9 +114,10 @@ Configure Notification Alarm List Rebuilt Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -125,9 +126,10 @@ Configure Notification Alarm Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -136,9 +138,10 @@ Configure Notification Alarm Cleareance Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index b8e00065ea82e08ac9b6f70c0239de8b3c7e82ba..4850c4b0769984d3cf78c6f321bd1491bca12bb9 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -6,6 +6,9 @@ Library OperatingSystem Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new alarm subscription diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 0ae86d8e17b572b33847990b3eb096a45f5a229f..2214bef51b62be6207947a4dac22cfbafee75597 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the VNFM ${NFVO_PORT} 8080 # Listening port of the VNFM ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 diff --git a/SOL005/NSLifecycleManagement-API/ApiVersion.robot b/SOL005/NSLifecycleManagement-API/ApiVersion.robot index fcbaad59ff89db637ea944711d4994b691cd1b33..d21b76e5e84a122fec09c32d23b7523b53dd5058 100644 --- a/SOL005/NSLifecycleManagement-API/ApiVersion.robot +++ b/SOL005/NSLifecycleManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index a1dda903c871fa2fee041a9efdf8713b6d576f07..9ae07218f74a7807e61ee683f73d739e5d142983 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot index 697c949f2532f630649119894f86925af5b2973b..f700f388fcbe2c41f1b2383ebeba6fcade072178 100644 --- a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot index 7ee91bf854f508be3527ca6b9f3903183ce4a79f..4ab717c411793a05e1d598fd5fa15ca8d9874e10 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index 7fdf881d8c99a1a072a63a727011d5e17793a0a2..e168b373e8af774531fd3331b8b01751becc38f6 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -81,7 +81,7 @@ DELETE Individual NSInstance Conflict ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: Check Postcondition NS Instance is not deleted - DELETE IndividualNSInstance + DELETE IndividualNSInstance Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Check Postcondition NS Instance is not deleted \ No newline at end of file + Check Postcondition NS Conflict Instance is not deleted \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot similarity index 84% rename from SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot rename to SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot index a6a087ca6e9493c7927ec65108074d176a395b4d..da479341cd0eb14f025f8912e227e04324e2278c 100644 --- a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 5eefe233d417c98bfe873f9ade33ec4302e176e1..1e4f02baf3e1ec4485ad450379c0026ac5d1e584 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -8,10 +8,10 @@ Library OperatingSystem Library MockServerLibrary Library Collections Library String -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml -Variables descriptors/SOL006/NSD/nsd_SOL006.yaml -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL001/NSD/nsd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL006/NSD/nsd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL001/NSD/nsd_SOL001.yaml *** Keywords *** Initialize System @@ -31,50 +31,50 @@ Create Sessions Check subscription existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check Instance Deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 404 Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Fail is not supported? Also In Sol002 Check Cancel not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Cancel is not supported? Also In Sol002 Check Continue not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Continue is not supported? Also In Sol002 Check retry not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if retry is not supported? Also In Sol002 Check Rollback not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if rollback is not supported? Also In Sol002 Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} String response body operationState FAILED_TEMP Check resource not [Arguments] ${status} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} Should Not Be Equal As Strings response body operationState ${status} @@ -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} @@ -107,9 +107,10 @@ Configure Notification Status Handler Run Keyword If '${status}' != "" set to dictionary ${json["notificationStatus"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${endpoint} - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{headers} = Create Dictionary "Content-Type"="application/json" - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check resource operationState is @@ -117,54 +118,70 @@ 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":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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":"${AUTHORIZATION}"} - Log ${fresh_resource} - ${instanceId}= Set Variable If ${fresh_resource} == 0 ${nsInstanceId} ${response['body']['id']} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${instanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 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":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/scaleNsToLevelRequest.json ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale_to_level ${body} @@ -173,7 +190,7 @@ Launch another LCM operation Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 200 @@ -186,7 +203,7 @@ Check HTTP Response Status Code Is Check Postcondition NS Instance is deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${disabledNsdId} Integer response status 404 @@ -204,10 +221,17 @@ Check HTTP Response Body Json Schema Is Check Postcondition NS Instance is not deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 200 - + +Check Postcondition NS Conflict Instance is not deleted + 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/${ConflictNsInstanceId} + Integer response status 200 + Check HTTP Response Header ContentType is [Arguments] ${expected_contentType} Log Validate content type @@ -218,7 +242,7 @@ POST New nsInstance Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/CreateNsRequest.json ${body}= Format String ${template} nsdId=${NS_DescriptorID} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} @@ -238,6 +262,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml @{VDU_labels}= Create List @{VNF_labels}= Create List @{VirtualLink_labels}= Create List @@ -265,6 +290,7 @@ Fetch Information from SOL001 descriptor file Get VNF Attributes from SOL001 [Arguments] ${VNF_label} + Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} @@ -280,6 +306,7 @@ Get VNF Attributes from SOL001 Set Global Variable ${Flavour_ID} ${flavour_id} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} @@ -306,7 +333,8 @@ Fetch Information from SOL006 descriptor file Set Global Variable ${Descriptor_Version} ${descriptor_version} Get VDU IDs - [Arguments] ${count} + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{VDU_labels}= Create List ${Storage_labels}= Create List FOR ${i} IN RANGE ${count} @@ -319,6 +347,7 @@ Get VDU IDs Get Internal CPs for each VDU [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} ${internal_CPs}= Create List FOR ${i} IN RANGE ${count} @@ -328,6 +357,7 @@ Get Internal CPs for each VDU Get External CP IDs [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{external_CPs}= Create List FOR ${i} IN RANGE ${count} Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} @@ -336,6 +366,7 @@ Get External CP IDs Get Virtual Link IDs [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{VirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} @@ -344,6 +375,7 @@ Get Virtual Link IDs Get Instantiation Levels [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @{Instantiation_Levels}= Create List FOR ${i} IN RANGE ${count} Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} @@ -369,7 +401,7 @@ POST New nsInstance with DISABLED nsd Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreateNsRequest.json ${body}= Format String ${template} nsdId=${disabledNsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${body} @@ -380,7 +412,7 @@ GET NsInstances Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -390,7 +422,7 @@ GET NsInstance Invalid Attribute-Based filtering parameter Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -399,7 +431,7 @@ GET NsInstance Invalid Attribute Selector Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -407,35 +439,35 @@ GET NsInstance Invalid Attribute Selector Get NSInstances with all_fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with exclude_default attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with fields and exclude_default attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with exclude_fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -444,7 +476,7 @@ PUT NSInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -453,7 +485,7 @@ PATCH NSInstances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -462,7 +494,7 @@ DELETE NSInstances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -471,7 +503,7 @@ POST IndividualNSInstance Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nonExistentNsId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -480,7 +512,7 @@ GET IndividualNSInstance Log Trying to get information about an individual NS instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${Etag}= Output response headers ETag ${outputResponse}= Output response @@ -491,7 +523,7 @@ PUT IndividualNSInstance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -500,14 +532,14 @@ PATCH IndividualNSInstance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE IndividualNSInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -515,7 +547,7 @@ DELETE IndividualNSInstance DELETE IndividualNSInstance Conflict log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${ConflictNsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -523,7 +555,7 @@ DELETE IndividualNSInstance Conflict DELETE Instantiate NSInstance log Trying to delete an instantiate NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -532,7 +564,7 @@ DELETE Instantiate NSInstance log Trying to patch an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -541,7 +573,7 @@ PUT Instantiate NSInstance log Trying to put an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -550,7 +582,7 @@ GET Instantiate NSInstance log Trying to get an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -559,7 +591,7 @@ GET Instantiate NSInstance Log Trying to Instantiate a ns Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/InstantiateNs.json ${body}= Format String ${template} nsFlavourId=${nsFlavourId} vimAccountId=${vimAccountId} nsdId=${nsdId} sapdId=${SAP_IDs[0]} @@ -569,7 +601,7 @@ GET Instantiate NSInstance DELETE Scale NSInstance log Trying to delete an Scale NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -578,7 +610,7 @@ DELETE Scale NSInstance log Trying to patch an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -587,7 +619,7 @@ PUT Scale NSInstance log Trying to put an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -596,7 +628,7 @@ GET Scale NSInstance log Trying to get an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -605,7 +637,7 @@ POST scale nsInstance Log Trying to Instantiate a scale NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/ScaleNs.json ${body}= Format String ${template} scaleType=${scaleType} scaleTimeout=${scaleTimeout} scaleVnfType=${scaleVnfType} scaleGroupDescriptor=${scaleGroupDescriptor} scaleMemberVnfIndex=${scaleMemberVnfIndex} vnfInstantiationLevelId=${InstantiationLevel_IDs[0]} @@ -615,7 +647,7 @@ POST scale nsInstance DELETE Update NSInstance log Trying to delete an Update NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -624,7 +656,7 @@ DELETE Update NSInstance log Trying to patch an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -633,7 +665,7 @@ PUT Update NSInstance log Trying to put an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -642,7 +674,7 @@ GET Update NSInstance log Trying to get an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -651,7 +683,7 @@ POST Update NSInstance Log Trying to Instantiate a Update NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template} = Get File jsons/UpdateNsRequest.json @@ -662,7 +694,7 @@ POST Update NSInstance DELETE Heal NSInstance log Trying to Delete an Heal NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -671,7 +703,7 @@ DELETE Heal NSInstance log Trying to patch an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -680,7 +712,7 @@ PUT Heal NSInstance log Trying to put an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -689,7 +721,7 @@ GET Heal NSInstance log Trying to get an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -698,7 +730,7 @@ POST Heal NSInstance Log Trying to Instantiate a Heal NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/HealNsRequest.json ${body}= Format String ${template} nsDegreeHealing=${nsDegreeHealing} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${body} @@ -707,7 +739,7 @@ POST Heal NSInstance DELETE Terminate NSInstance log Trying to Delete an Terminate NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -716,7 +748,7 @@ PATCH Terminate NSInstance log Trying to patch an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -725,7 +757,7 @@ PUT Terminate NSInstance log Trying to put an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -734,7 +766,7 @@ GET Terminate NSInstance log Trying to Get an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -743,7 +775,7 @@ POST Terminate NSInstance Log Trying to Instantiate a Terminate NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/TerminateNsRequest.json Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${body} ${outputResponse}= Output response @@ -752,7 +784,7 @@ POST Terminate NSInstance POST NS LCM OP Occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -760,7 +792,7 @@ POST NS LCM OP Occurrences PUT NS LCM OP Occurrences 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -768,7 +800,7 @@ PUT NS LCM OP Occurrences PATCH NS LCM OP Occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -776,7 +808,7 @@ PATCH NS LCM OP Occurrences DELETE NS LCM OP Occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -784,7 +816,7 @@ DELETE NS LCM OP Occurrences GET NS LCM OP Occurrences Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response @@ -793,7 +825,7 @@ GET NS LCM OP Occurrences GET NS LCM OP Occurrences Invalid attribute-based filtering parameters Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?${NEG_FILTER} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -801,42 +833,42 @@ GET NS LCM OP Occurrences Invalid attribute-based filtering parameters GET NS LCM OP Occurrences Invalid attribute selector Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?${NEG_SELECTOR} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get NS LCM OP Occurrences with all_fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with exclude_default attribute selector Log Query status information about multiple NS lifecycle management operation occurrences using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with fields and exclude_default attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with exclude_fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -844,7 +876,7 @@ Get NS LCM OP Occurrences with exclude_fields attribute selector POST Individual NS LCM OP Occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -852,7 +884,7 @@ POST Individual NS LCM OP Occurrence PUT Individual NS LCM OP Occurrence 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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -860,7 +892,7 @@ PUT Individual NS LCM OP Occurrence PATCH Individual NS LCM OP Occurrence log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -868,7 +900,7 @@ PATCH Individual NS LCM OP Occurrence DELETE Individual NS LCM OP Occurrence log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -876,7 +908,7 @@ DELETE Individual NS LCM OP Occurrence GET Individual NS LCM OP Occurrence Log Query status information about individual NS lifecycle management operation occurrence. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response @@ -884,14 +916,14 @@ GET Individual NS LCM OP Occurrence GET Retry operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Retry operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -905,14 +937,14 @@ PATCH Retry operation task DELETE Retry operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Retry operation task Log Retry a NS lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response @@ -920,14 +952,14 @@ POST Retry operation task GET Rollback operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Rollback operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -941,14 +973,14 @@ PATCH Rollback operation task DELETE Rollback operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Rollback operation task Log Rollback a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response @@ -956,14 +988,14 @@ POST Rollback operation task GET Continue operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Continue operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -977,14 +1009,14 @@ PATCH Continue operation task DELETE Continue operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Continue operation task Log Continue a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response @@ -992,14 +1024,14 @@ POST Continue operation task GET Fail operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Fail operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1013,14 +1045,14 @@ PATCH Fail operation task DELETE Fail operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Fail operation task Log Fail a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response @@ -1028,14 +1060,14 @@ POST Fail operation task GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1049,14 +1081,14 @@ PATCH Cancel operation task DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Cancel operation task Log Cancel a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response @@ -1066,7 +1098,7 @@ PUT subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1075,7 +1107,7 @@ PATCH subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1084,7 +1116,7 @@ DELETE subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1093,45 +1125,63 @@ POST subscriptions Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/LccnSubscriptionRequest.json ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + Clear Requests ${callback_endpoint} + POST subscriptions DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/LccnSubscriptionRequest.json ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} POST subscriptions NO DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File ${template}= Get File jsons/LccnSubscriptionRequest.json ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response @@ -1140,28 +1190,28 @@ GET Subscriptions Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?all_fields ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1169,7 +1219,7 @@ Get subscriptions with exclude_fields attribute selector GET subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1177,7 +1227,7 @@ GET subscriptions with filter Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1186,7 +1236,7 @@ POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1195,7 +1245,7 @@ PUT Individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1204,7 +1254,7 @@ PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1212,7 +1262,7 @@ PATCH Individual Subscription GET Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1220,7 +1270,7 @@ GET Individual subscription DELETE Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1295,6 +1345,7 @@ PARSE the NS Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file Fetch Information from SOL001 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml @{NsVirtualLink_labels}= Create List @{NsCP_labels}= Create List FOR ${key} IN @{topology_template.node_templates.keys()} @@ -1311,6 +1362,7 @@ Fetch Information from SOL001 NS descriptor file Get NS Attributes from SOL001 [Arguments] ${NS_label} + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml ${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.descriptorId} ${designer}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.designer} ${version}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.version} @@ -1324,6 +1376,7 @@ Get NS Attributes from SOL001 Set Global Variable ${NS_InvariantID} ${invariantId} Fetch Information from SOL006 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml ${nsd_id}= Get Variable Value ${nfv.nsd[0].id} ${VNFcount}= Get Length ${nfv.vnfd} ${SAPcount}= Get Length ${nfv.nsd[0].sapd} @@ -1340,6 +1393,7 @@ Fetch Information from SOL006 NS descriptor file Get SAP IDs [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml @{SAPlabels}= Create List FOR ${i} IN RANGE ${count} Append To List ${SAPlabels} ${nfv.nsd[0].sapd[${i}]['id']} @@ -1347,6 +1401,7 @@ Get SAP IDs Set Global Variable ${SAP_IDs} ${SAPlabels} Get NS Virtual Link IDs + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml [Arguments] ${count} @{NsVirtualLink_labels}= Create List FOR ${i} IN RANGE ${count} @@ -1374,3 +1429,28 @@ 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + diff --git a/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot b/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot index 5944b173e7a58bd614b66aa390062de016f5a600..09fc94e3e97d9a65d0f5de4f9b5f37228884adc6 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationConsumer.robot @@ -1,97 +1,97 @@ -*** Settings *** -Library String -Resource environment/variables.txt -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Library JSONSchemaLibrary schemas/ -Resource NSLCMOperationKeywords.robot - -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -Ns Lcm Operation Occurrence Notification - [Documentation] Test ID: 5.3.2.26.1 - ... Test title: Ns Lcm Operation Occurrence Notification - ... Test objective: The objective is to test that Ns Lcm Operation Occurrence Notification is delivered with success to the notification consumer. - ... Pre-conditions: A subscription for NS LCM Operation Occurrence notifications is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Ns Lcm Operation Occurrence Notification - Check HTTP Response Status Code Is 204 - -Ns Identifier Creation Notification - [Documentation] Test ID: 5.3.2.26.2 - ... Test title: Ns Identifier Creation Notification - ... Test objective: The objective is to test that Ns Identifier Creation Notification is delivered with success to the notification consumer. - ... Pre-conditions: A subscription for Ns Identifier Creation notification is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Ns Identifier Creation Notification - Check HTTP Response Status Code Is 204 - -Ns Identifier Deletion Notification - [Documentation] Test ID: 5.3.2.26.3 - ... Test title: Ns Identifier Deletion Notification - ... Test objective: The objective is to test that Ns Identifier Deletion Notification is delivered with success to the notification consumer. - ... Pre-conditions: A subscription for Ns Identifier Deletion notification is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post Ns Identifier Deletion Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body subscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post Ns Lcm Operation Occurrence Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File - Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File - ${template} = Get File jsons/NsLcmOperationOccurrenceNotification.json - ${body}= Format String ${template} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} subscriptionId=${subscriptionId} vnfdId=${Descriptor_ID} nsdId=${NS_DescriptorID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Ns Identifier Creation Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/NsIdentifierCreationNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post Ns Identifier Deletion Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${template} = Get File jsons/NsIdentifierDeletionNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +*** Settings *** +Library String +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Resource NSLCMOperationKeywords.robot + +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Ns Lcm Operation Occurrence Notification + [Documentation] Test ID: 5.3.2.26.1 + ... Test title: Ns Lcm Operation Occurrence Notification + ... Test objective: The objective is to test that Ns Lcm Operation Occurrence Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for NS LCM Operation Occurrence notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Ns Lcm Operation Occurrence Notification + Check HTTP Response Status Code Is 204 + +Ns Identifier Creation Notification + [Documentation] Test ID: 5.3.2.26.2 + ... Test title: Ns Identifier Creation Notification + ... Test objective: The objective is to test that Ns Identifier Creation Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns Identifier Creation notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Ns Identifier Creation Notification + Check HTTP Response Status Code Is 204 + +Ns Identifier Deletion Notification + [Documentation] Test ID: 5.3.2.26.3 + ... Test title: Ns Identifier Deletion Notification + ... Test objective: The objective is to test that Ns Identifier Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns Identifier Deletion notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Ns Identifier Deletion Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + 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}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Ns Lcm Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/NsLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} subscriptionId=${subscriptionId} vnfdId=${Descriptor_ID} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Ns Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Ns Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot index fcabe5b102403995722e537053eb293110c064ef..fee4daecd4081e6d90644dc9e329eee1ac0c9ef0 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -97,9 +97,10 @@ Configure Notification NS LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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} - &{headers}= Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -120,9 +121,10 @@ Configure Notification NS LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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} - &{headers}= Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS Identifier Creation Notification Http POST Request Body Json Schema Is @@ -143,9 +145,10 @@ Configure Notification NS Identifier Creation Handler 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} - &{headers}= Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -166,9 +169,10 @@ Configure Notification NS Identifier Deletion Handler 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} - &{headers}= Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot index dd49111b0111cce3110912690404fd3dab9c9361..49ea4c5fe615c49f873f29c09b5801a4ddf35cc0 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/Subscriptions.robot b/SOL005/NSLifecycleManagement-API/Subscriptions.robot index d2d0010cef0ac999d0ca08dab0a3c135148f6f70..bce367fd3ec983d30f6e1d72b45eef2c37402e0e 100644 --- a/SOL005/NSLifecycleManagement-API/Subscriptions.robot +++ b/SOL005/NSLifecycleManagement-API/Subscriptions.robot @@ -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 Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot index 802a35ac0e25f45454240963517801d57ad6dd67..1ff34c64ca1864859acbc072630157a3e548876a 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot @@ -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 + diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot index f64a83120863c0f5f717b3cccde1506691dca23f..61b7aa8ae54a57a75758d9e1d3639e6b6b1e553a 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot @@ -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 diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml index 484f963765f12d873a007726b08b134e6509e9ee..ee6a14946a2b390db8afae5e87ed9125f864a491 100644 --- a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml @@ -1,6 +1,10 @@ tosca_definitions_version: "tosca_simple_yaml_1_2" tosca_default_namespace: "toscanfv" description: "Referenxce NSD descriptor " + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_nsd_types.yaml + metadata: descriptor_id: "NSD_WITH_1_VNF" vendor: "ETSI" diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index 3a90f45bf32fdb008af0ea698fc1affa8bc4da12..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - VNF_B: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF_B" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index b1eb55915c10094bf6ac286840cfab5100022a95..6cb07cd188cb691189a83afd42cc22296cb0c19a 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -6,7 +6,8 @@ ${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT_JSON} application/json @@ -82,7 +83,7 @@ ${check_descriptors} 1 ${descriptorType} SOL006 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage diff --git a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json index a8026a8109ee679fc97c2e00eafd76e493fb0216..2367086716f45d628e3219cb7a25edb971138e8c 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json @@ -1,6 +1,6 @@ -{{ +{ "nsdId": "{nsdId}", "nsName": "{nsInstanceName}", "vimAccountId": "{vimAccountId}", "nsDescription": "{nsInstanceDescription}" -}} \ No newline at end of file +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json index 5d0c060fa55820dcc9c3eba73843c52b29f209e8..b89a44d19ef6417f8d024aa4acb203e87d240d6f 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json @@ -1,5 +1,5 @@ -{{ - "nsFlavourId": "floavour_id", +{ + "nsFlavourId": "flavour_id", "sapData":[ "{sapdId}" ], @@ -10,4 +10,4 @@ "additionalParamsForNs":{}, "additionalParamForNestedNs":[], "additionalParamsForVnf":[] -}} \ No newline at end of file +} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json index f9a87c851a55ba002ae586b7d5e1e43db37b2159..12204fe2bac4987ba78f2fa91d16976e6a1cda8c 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json @@ -1,32 +1,3 @@ { - "description": "This type represents a request for the scale NS operation.\n", - "type": "object", - "required": [ - "scaleType" - ], - "properties": { - "scaleType": { - "description": "Indicates the type of scaling to be performed. Possible values: - SCALE_NS - SCALE_VNF\n", - "type": "string", - "enum": [ - "SCALE_NS", - "SCALE_VNF" - ] - }, - "scaleNsData": { - "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_NS.\n", - "$ref": "#/definitions/ScaleNsData" - }, - "scaleVnfData": { - "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_VNF.\n", - "type": "array", - "items": { - "$ref": "#/definitions/ScaleVnfData" - } - }, - "scaleTime": { - "description": "Timestamp indicating the scale time of the NS, i.e. the NS will be scaled at this timestamp. Cardinality \"0\" indicates the NS scaling takes place immediately\".\n", - "$ref": "SOL005_def.yaml#/definitions/DateTime" - } - } + "scaleType": "SCALE_NS" } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json index da42b41c16b748cb6b61ddf51055ed62fbb972c8..4d34491038c0d258d78bfe49af91a21bdfdce8d4 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json @@ -1,21 +1,22 @@ -{{ +{ "updateType": "{vnfUpdateType}", - "instantiateVnfData": {{ + "instantiateVnfData": { "vnfdId": "{vnfdId}", "vnfFlavourId": "{vnfFlavourId}", - "vnfInstantiationLevelId": "{vnfInstantiationLevelId}" - "extManagedVirtualLinks": {{ + "vnfInstantiationLevelId": "{vnfInstantiationLevelId}", + "extManagedVirtualLinks": { "vnfVirtualLinkDescId": "{vnfVirtualLinkDescId}" - }}, - "changeVnfFlavourData": {{ - "vnfInstanceId": {}, - "newFlavourId": "{newFlavourId}", - "instantiationLevelId": "{instantiationLevelId}" - }}, - "assocNewNsdVersionData": {{ - "newNsdId": "{newNsdId}" - }} - "addSap": {{ - "sapdId": "{sapdId}" - }} -}} \ No newline at end of file + }, + "changeVnfFlavourData": { + "vnfInstanceId": {}, + "newFlavourId": "{newFlavourId}", + "instantiationLevelId": "{instantiationLevelId}" + }, + "assocNewNsdVersionData": { + "newNsdId": "{newNsdId}" + }, + "addSap": { + "sapdId": "{sapdId}" + } + } +} diff --git a/SOL005/NSPerformanceManagement-API/ApiVersion.robot b/SOL005/NSPerformanceManagement-API/ApiVersion.robot index 8619b4931bbca15feb15676d42761e41178962d8..a0ca7d92647a1755792828ef205389f47a31d5ae 100644 --- a/SOL005/NSPerformanceManagement-API/ApiVersion.robot +++ b/SOL005/NSPerformanceManagement-API/ApiVersion.robot @@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index d70330ae18223957ebb3c394d5905e552fc4ab74..e5d045cc9bec8f2e582b267acf96e0e5c5ca8ca4 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -14,7 +14,7 @@ Library String GET all NS Performance Monitoring Jobs Log Trying to get all PM Jobs present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -22,7 +22,7 @@ GET all NS Performance Monitoring Jobs GET NS Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the NFVO, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -30,7 +30,7 @@ GET NS Performance Monitoring Jobs with attribute-based filter GET NS Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the NFVO, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -38,7 +38,7 @@ GET NS Performance Monitoring Jobs with all_fields attribute selector GET NS Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -47,7 +47,7 @@ GET NS Performance Monitoring Jobs with fields attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -56,7 +56,7 @@ GET NS Performance Monitoring Jobs with fields and exclude_default attribute sel Log Trying to get all NS Packages present in the NFVO, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -65,7 +65,7 @@ GET NS Performance Monitoring Jobs with exclude attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -73,7 +73,7 @@ GET NS Performance Monitoring Jobs with exclude attribute selector GET NS Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the NFVO, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -81,7 +81,7 @@ GET NS Performance Monitoring Jobs with invalid attribute-based filter GET NS Performance Monitoring Jobs with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -90,7 +90,7 @@ Send Post Request Create new NS Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json ${body}= Format String ${template} pmJobId=${pmJobId} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} @@ -100,7 +100,7 @@ Send Post Request Create new NS Performance Monitoring Job Send PUT Request for all NS Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -108,7 +108,7 @@ Send PUT Request for all NS Performance Monitoring Jobs Send PATCH Request for all NS Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -116,7 +116,7 @@ Send PATCH Request for all NS Performance Monitoring Jobs Send DELETE Request for all NS Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -125,7 +125,7 @@ Send DELETE Request for all NS Performance Monitoring Jobs Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -186,7 +186,7 @@ Check HTTP Response Body PmJobs Do Not Contain reports GET individual NS Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -194,7 +194,7 @@ GET individual NS Performance Job GET individual NS Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -202,7 +202,7 @@ GET individual NS Performance Job with invalid resource identifier Send Delete request for individual NS Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -210,7 +210,7 @@ Send Delete request for individual NS Performance Job Send Delete request for individual NS Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -218,7 +218,7 @@ Send Delete request for individual NS Performance Job with invalid resource iden Send Post request for individual NS Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -226,7 +226,7 @@ Send Post request for individual NS Performance Job Send Put request for individual NS Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -238,7 +238,7 @@ Send Patch request for individual NS Performance Job Log Trying to perform a PATCH Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/PmJobModifications.json PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response @@ -247,7 +247,7 @@ Send Patch request for individual NS Performance Job Check Postcondition NS Performance Job is not Created Log Trying to get a new Pm Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -275,7 +275,7 @@ Check HTTP Response Body Pm Job Identifier matches the requested Pm Job Get Individual Performance Report Log Trying to get a performance report present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -283,21 +283,21 @@ Get Individual Performance Report Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -307,7 +307,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -317,7 +317,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -325,7 +325,7 @@ Send Delete request for Individual Performance Report GET all Performance Thresholds Log Trying to get all thresholds present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -333,7 +333,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the NFVO with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK_Threshold} ${output}= Output response Set Suite Variable ${response} ${output} @@ -341,7 +341,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the NFVO with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -349,14 +349,14 @@ GET Performance Thresholds with invalid attribute-based filter GET NS performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the NFVO with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json @@ -367,7 +367,7 @@ Send Post Request Create new Performance Threshold Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -376,7 +376,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds @@ -385,7 +385,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -393,7 +393,7 @@ Send DELETE Request for all Performance Thresholds Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -402,14 +402,14 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${FILTER_OK_Threshold} ,${SEPERATOR} + @{words} = Split String ${FILTER_OK_Threshold} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] GET Individual NS performance Threshold Log Trying to get a Threhsold present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -417,28 +417,28 @@ GET Individual NS performance Threshold GET individual NS performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold Log Trying to delete a Threhsold in the NFVO - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the NFVO with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NS performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -446,7 +446,7 @@ Send Post request for individual NS performance Threshold Send Put request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -458,7 +458,7 @@ Send Patch request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/ThresholdModifications.json PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} ${output}= Output response diff --git a/SOL005/NSPerformanceManagement-API/NotificationConsumer.robot b/SOL005/NSPerformanceManagement-API/NotificationConsumer.robot index d4efbea11ce945c7e22d494e769b67a809dcc2b2..3f7aca72452a73afa84e6aed5fdb24901c5c6560 100644 --- a/SOL005/NSPerformanceManagement-API/NotificationConsumer.robot +++ b/SOL005/NSPerformanceManagement-API/NotificationConsumer.robot @@ -1,68 +1,68 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Library JSONLibrary -Library OperatingSystem -Library String -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -NS Performance Information Availability Notification - [Documentation] Test ID: 5.3.4.10.1 - ... Test title: NS Performance Information Availability Notification - ... Test objective: The objective is to test that NS Performance Information Availability Notification is delivered with success to the notification consumer - ... Pre-conditions: A NS performance job is created, and information availability notifications is available in the NFVO. - ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NS Performance Information Availability Notification - Check HTTP Response Status Code Is 204 - -NS Threshold Crossed Notification - [Documentation] Test ID: 5.3.4.10.2 - ... Test title: NS Threshold Crossed Notification - ... Test objective: The objective is to test that NS Threshold Crossed Notification is delivered with success to the notification consumer - ... Pre-conditions: A NS performance job is created, and threshold crossed notifications is available in the NFVO. - ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post NS Threshold Crossed Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} - Integer response status 200 - Validate Json response body PmJob.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post NS Performance Information Availability Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body} = Get File jsons/PerformanceInformationAvailableNotification.json - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post NS Threshold Crossed Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body} = Get File jsons/ThresholdCrossedNotification.json - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +NS Performance Information Availability Notification + [Documentation] Test ID: 5.3.4.10.1 + ... Test title: NS Performance Information Availability Notification + ... Test objective: The objective is to test that NS Performance Information Availability Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS performance job is created, and information availability notifications is available in the NFVO. + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NS Performance Information Availability Notification + Check HTTP Response Status Code Is 204 + +NS Threshold Crossed Notification + [Documentation] Test ID: 5.3.4.10.2 + ... Test title: NS Threshold Crossed Notification + ... Test objective: The objective is to test that NS Threshold Crossed Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS performance job is created, and threshold crossed notifications is available in the NFVO. + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NS Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post NS Performance Information Availability Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/PerformanceInformationAvailableNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NS Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/ThresholdCrossedNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/Notifications.robot b/SOL005/NSPerformanceManagement-API/Notifications.robot index 18ab8e3f98e121864abeca3feab7bffb74868dda..b973b2c6e0a6692f6ab8947ae2961500f87fd949 100644 --- a/SOL005/NSPerformanceManagement-API/Notifications.robot +++ b/SOL005/NSPerformanceManagement-API/Notifications.robot @@ -85,9 +85,10 @@ Configure Notification Performance Information Available Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,9 +97,10 @@ Configure Notification Threshold Crossed Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSPerformanceManagement-API/environment/variables.txt b/SOL005/NSPerformanceManagement-API/environment/variables.txt index ff91e29637d04f79c5554602e32e378838eeaca7..1f6e3dfadca02ca67ab72c97ba747241d7569a85 100644 --- a/SOL005/NSPerformanceManagement-API/environment/variables.txt +++ b/SOL005/NSPerformanceManagement-API/environment/variables.txt @@ -2,12 +2,12 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken ${apiMajorVersion} v2 ${apiName} nspm ${FIELD_USAGE} 1 @@ -63,6 +63,6 @@ ${newReportId} newReportId ${FILTER_OK_Threshold} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${FILTER_KO} criterias=erroneousFilter -${SEPERATOR} = +${SEPARATOR} = ${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/links.schema.json b/SOL005/NSPerformanceManagement-API/schemas/links.schema.json index 945df7daa143612fc605fd247e3edd5c18d0d258..0d6b2172ae100c566c70ee0a3cd7a858bf0ee2e8 100644 --- a/SOL005/NSPerformanceManagement-API/schemas/links.schema.json +++ b/SOL005/NSPerformanceManagement-API/schemas/links.schema.json @@ -1,53 +1,50 @@ { - "type": "array", - "items": { - "type": "object", - "description": "Links to resources related to this resource.\n", - "required": [ - "self", - "packageContent" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } + "type": "object", + "description": "Links to resources related to this resource.\n", + "required": [ + "self", + "packageContent" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" } - }, - "vnfd": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } + } + }, + "vnfd": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" } - }, - "packageContent": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } + } + }, + "packageContent": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" } } } diff --git a/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot b/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot index 0637fe22a1a6cd492ae0acb06a7c00e055717076..c8da3d0255955276eb407b4fee39dee78561fc16 100644 --- a/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot +++ b/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot @@ -1,109 +1,109 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false - -*** Test Cases *** -Get Access configuration for external artifacts - [Documentation] Test ID: 5.3.5.10.1 - ... Test title: Get Access configuration for external artifacts - ... Test objective: The objective is to test the GET method reads the access configuration information that is used by the NFVO to get the content of external VNF package artifacts and perform a JSON schema and content validation of the collected data structure - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get access configuration information for external artifacts - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig - -Get Access configuration for external artifacts - Not Found - [Documentation] Test ID: 5.3.5.10.2 - ... Test title: Get Access configuration for external artifacts - Not Found - ... Test objective: The objective is to test that the retrieval of access configuration information that is used by the NFVO to get the content of external VNF package artifacts fails because resource is not present. - ... Pre-conditions: none - ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get access configuration information for external artifacts - Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails - -PUT Access configuration for external artifacts - [Documentation] Test ID: 5.3.5.10.3 - ... Test title: Access configuration for external artifacts - ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. - ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" - ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Check Postcondition individual VNF Package is created - Send PUT Request to access configuration information for external artifacts - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig - -PUT Access configuration for external artifacts - Downloading - [Documentation] Test ID: 5.3.5.10.4 - ... Test title: Access configuration for external artifacts - Downloading - ... Test objective: The objective is to test that VNF package has been uploaded successfully previously, to indicate that the access configuration information has been stored successfully by the NFVO and the NFVO now starts downloading external artifacts. - ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" - ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Check Postcondition individual VNF Package is created - Send PUT Request to access configuration information for external artifacts - Check HTTP Response Status Code Is 202 - -PUT Access configuration for external artifacts - Conflict - [Documentation] Test ID: 5.3.5.10.5 - ... Test title: Access configuration for external artifacts - ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. - ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute is neither "CREATED" nor "ERROR" - ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request to access configuration information for external artifacts - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST Access configuration for external artifacts - Method not implemented - [Documentation] Test ID: 5.3.5.10.6 - ... Test title: POST Access configuration for external artifacts - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create access configuration for external artifacts - ... Pre-conditions: none - ... Reference: Clause 9.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for access configuration for external artifacts - Check HTTP Response Status Code Is 405 - -PATCH Access configuration for external artifacts - Method not implemented - [Documentation] Test ID: 5.3.5.10.7 - ... Test title: PATCH Access configuration for external artifacts - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update access configuration for external artifacts - ... Pre-conditions: none - ... Reference: Clause 9.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for access configuration for external artifacts - Check HTTP Response Status Code Is 405 - -DELETE Access configuration for external artifacts - Method not implemented - [Documentation] Test ID: 5.3.5.10.8 - ... Test title: DELETE Access configuration for external artifacts - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete access configuration for external artifacts - ... Pre-conditions: none - ... Reference: Clause 9.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for Access configuration for external artifacts +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +Get Access configuration for external artifacts + [Documentation] Test ID: 5.3.5.10.1 + ... Test title: Get Access configuration for external artifacts + ... Test objective: The objective is to test the GET method reads the access configuration information that is used by the NFVO to get the content of external VNF package artifacts and perform a JSON schema and content validation of the collected data structure + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get access configuration information for external artifacts + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig + +Get Access configuration for external artifacts - Not Found + [Documentation] Test ID: 5.3.5.10.2 + ... Test title: Get Access configuration for external artifacts - Not Found + ... Test objective: The objective is to test that the retrieval of access configuration information that is used by the NFVO to get the content of external VNF package artifacts fails because resource is not present. + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get access configuration information for external artifacts + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Access configuration for external artifacts + [Documentation] Test ID: 5.3.5.10.3 + ... Test title: Access configuration for external artifacts + ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Check Postcondition individual VNF Package is created + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig + +PUT Access configuration for external artifacts - Downloading + [Documentation] Test ID: 5.3.5.10.4 + ... Test title: Access configuration for external artifacts - Downloading + ... Test objective: The objective is to test that VNF package has been uploaded successfully previously, to indicate that the access configuration information has been stored successfully by the NFVO and the NFVO now starts downloading external artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Check Postcondition individual VNF Package is created + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 202 + +PUT Access configuration for external artifacts - Conflict + [Documentation] Test ID: 5.3.5.10.5 + ... Test title: Access configuration for external artifacts + ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute is neither "CREATED" nor "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.6 + ... Test title: POST Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for access configuration for external artifacts + Check HTTP Response Status Code Is 405 + +PATCH Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.7 + ... Test title: PATCH Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for access configuration for external artifacts + Check HTTP Response Status Code Is 405 + +DELETE Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.8 + ... Test title: DELETE Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for Access configuration for external artifacts Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/ApiVersion.robot b/SOL005/VNFPackageManagement-API/ApiVersion.robot index 5dc01749cd3c3df79a27fc35ca94fb7b086c8175..c3b82eec1e3b599e16d0270ecf4c0bef99c630dd 100644 --- a/SOL005/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL005/VNFPackageManagement-API/ApiVersion.robot @@ -132,70 +132,70 @@ DELETE API Version with apiMajorVerion - Method not implemented *** Keywords *** POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot index 0b644105734d0d0461b14ae9067e8323ddfe7d42..75dbfc62c654525d6ce03ba57947cc911b17ae27 100644 --- a/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot @@ -1,107 +1,107 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false - -*** Test Cases *** -Get Manifest in Individual VNF Package - [Documentation] Test ID: 5.3.5.11.1 - ... Test title: Get Manifest in Individual VNF Package - ... Test objective: The objective is to test that content of manifest within a NVF Package is read successfully. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package in plainFormat - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain - -Get Manifest in Individual VNF Package with security information - [Documentation] Test ID: 5.3.5.11.2 - ... Test title: Get Manifest in Individual VNF Package with security information - ... Test objective: The objective is to test the retrieval of the Manifest in individual VNF package shall include in the ZIP archive the security information when requested with "include_signature" parameter, and perform a validation that returned content is in zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package with security information - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get Manifest in Individual VNF Package - Not Acceptable - [Documentation] Test ID: 5.3.5.11.3 - ... Test title: Get Manifest in Individual VNF Package - Not Acceptable - ... Test objective: The objective is to test that the "Accept" header is not compatible with Content type "application/zip" but "incude_signature" is provided.\ - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package with unacceptable request - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get Manifest in Individual VNF Package - Conflict - [Documentation] Test ID: 5.3.5.11.4 - ... Test title: Get Manifest in Individual VNF Package - Conflict - ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the resource. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Manifest in Individual VNF Package in plainFormat - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 5.3.5.11.5 - ... Test title: POST Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new Manifest - ... Pre-conditions: none - ... Reference: Clause 9.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -PUT Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 5.3.5.11.6 - ... Test title: PUT Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify a Manifest - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -PATCH Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 5.3.5.11.7 - ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update a Manifest - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for Manifest in individual VNF Package - Check HTTP Response Status Code Is 405 - -DELETE Manifest in Individual VNF Package - Method not implemented - [Documentation] Test ID: 5.3.5.11.8 - ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete a Manifest - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for Manifest in individual VNF Package +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +Get Manifest in Individual VNF Package + [Documentation] Test ID: 5.3.5.11.1 + ... Test title: Get Manifest in Individual VNF Package + ... Test objective: The objective is to test that content of manifest within a NVF Package is read successfully. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package in plainFormat + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual VNF Package with security information + [Documentation] Test ID: 5.3.5.11.2 + ... Test title: Get Manifest in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of the Manifest in individual VNF package shall include in the ZIP archive the security information when requested with "include_signature" parameter, and perform a validation that returned content is in zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual VNF Package - Not Acceptable + [Documentation] Test ID: 5.3.5.11.3 + ... Test title: Get Manifest in Individual VNF Package - Not Acceptable + ... Test objective: The objective is to test that the "Accept" header is not compatible with Content type "application/zip" but "incude_signature" is provided.\ + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with unacceptable request + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual VNF Package - Conflict + [Documentation] Test ID: 5.3.5.11.4 + ... Test title: Get Manifest in Individual VNF Package - Conflict + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the resource. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package in plainFormat + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.5 + ... Test title: POST Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new Manifest + ... Pre-conditions: none + ... Reference: Clause 9.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.6 + ... Test title: PUT Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.7 + ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.8 + ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for Manifest in individual VNF Package Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/NotificationConsumer.robot b/SOL005/VNFPackageManagement-API/NotificationConsumer.robot index 62fd52bc1d631c191b6899d2a4a3709b9dfc7e77..751754359ee60b7c3465d6a95632618d180fc5a9 100644 --- a/SOL005/VNFPackageManagement-API/NotificationConsumer.robot +++ b/SOL005/VNFPackageManagement-API/NotificationConsumer.robot @@ -1,73 +1,73 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library OperatingSystem -Library JSONLibrary -Library String -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Suite Setup Check resource existence and get CallbackUri - -*** Test Cases *** -VNF Package Onboarding Notification - [Documentation] Test ID: 5.3.5.13.1 - ... Test title: VNF Package Onboarding Notification - ... Test objective: The objective is to test that VNF Package Onboarding Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Package Onboarding Notification - Check HTTP Response Status Code Is 204 - -VNF Package Change Notification - [Documentation] Test ID: 5.3.5.13.2 - ... Test title: VNF Package Change Notification - ... Test objective: The objective is to test that VNF Package Change Notification is delivered with success to the notification consumer - ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 - ... Config ID: Config_prod_Notif_Endpoint - ... Applicability: none - ... Post-Conditions: none - Post VNF Package Change Notification - Check HTTP Response Status Code Is 204 - -*** Keywords *** -Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Validate Json response body PkgmSubscription.schema.json - Set Global Variable ${callbackResp} response body callbackUri - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Post VNF Package Onboarding Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File - ${template} = Get File jsons/VnfPackageOnboardingNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Post VNF Package Change Notification - log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File - ${template} = Get File jsons/VnfPackageChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} - Post ${callbackResp} ${body} - ${outputResponse}= Output response +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library OperatingSystem +Library JSONLibrary +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Package Onboarding Notification + [Documentation] Test ID: 5.3.5.13.1 + ... Test title: VNF Package Onboarding Notification + ... Test objective: The objective is to test that VNF Package Onboarding Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Onboarding Notification + Check HTTP Response Status Code Is 204 + +VNF Package Change Notification + [Documentation] Test ID: 5.3.5.13.2 + ... Test title: VNF Package Change Notification + ... Test objective: The objective is to test that VNF Package Change Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Package Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File + ${template} = Get File jsons/VnfPackageOnboardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Package Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File + ${template} = Get File jsons/VnfPackageChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/Notifications.robot b/SOL005/VNFPackageManagement-API/Notifications.robot index 472dcda79529010ade409979f4bde237d8e9ed15..361499a7b0637f4440be219527299bd879699a3e 100644 --- a/SOL005/VNFPackageManagement-API/Notifications.robot +++ b/SOL005/VNFPackageManagement-API/Notifications.robot @@ -118,9 +118,10 @@ Configure Notification Onboarding Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Set Suite Variable ${notification_request} ${notification_request} @@ -130,9 +131,10 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -141,8 +143,10 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot index 4a49bf0bcadb12be2bc78d832d6275e10294c4d4..4d4b7d5bcc8b9058ce9a093d76034d00de7151f0 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -1,200 +1,200 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt -Resource VNFPackageManagementKeywords.robot -Library JSONLibrary -Library OperatingSystem -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false - -*** Test Cases *** -Get VNF Package Artifact - [Documentation] Test ID: 5.3.5.12.1 - ... Test title: Get VNF Package Artifact - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter - [Documentation] Test ID: 5.3.5.12.2 - ... Test title: Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - [Documentation] Test ID: 5.3.5.12.3 - ... Test title: Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter - [Documentation] Test ID: 5.3.5.12.4 - ... Test title: Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with "include_signatures" parameter - [Documentation] Test ID: 5.3.5.12.5 - ... Test title: Get VNF Package Artifact with "include_signatures" parameter - ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with include_signatures parameter - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip - -Get VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 5.3.5.12.6 - ... Test title: Get VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the GET request read the whole content of the archive containing the artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - Get Artifact in VNF Package with Range Request - Check HTTP Response Status Code Is 206 - Check HTTP Response Header Content-Range Is Present and Matches the requested range - Check HTTP Response Header Content-Length Is Present and Matches the requested range length - -Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - [Documentation] Test ID: 5.3.5.12.7 - ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" - [Documentation] Test ID: 5.3.5.12.8 - ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets - [Documentation] Test ID: 5.3.5.12.9 - ... Test title: Get VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Artifact in VNF Package with select_non_mano_artifact_sets parameter - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -Get VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 5.3.5.12.10 - ... Test title: Get VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - GET Artifact of VNF Package in onboarding state different from ONBOARDED - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -GET VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 5.3.5.12.11 - ... Test title: GET VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when using a range request that does not match any available byte range in the file. - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - Check HTTP Response Body Json Schema Is ProblemDetails - -POST VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.12.12 - ... Test title: POST VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact - ... Pre-conditions: none - ... Reference: Clause 9.4.5a.3.1 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send POST Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PUT VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.12.13 - ... Test title: PUT VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.3 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PUT Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -PATCH VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.12.14 - ... Test title: PATCH VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5a.3.4 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send PATCH Request for VNF Package Artifact - Check HTTP Response Status Code Is 405 - -DELETE VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.12.15 - ... Test title: DELETE VNF Package Artifact - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.6.3.5 - ETSI GS NFV-SOL 005 [1] v2.7.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send DELETE Request for VNF Package Artifact +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library OperatingSystem +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +Get VNF Package Artifact + [Documentation] Test ID: 5.3.5.12.1 + ... Test title: Get VNF Package Artifact + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter + [Documentation] Test ID: 5.3.5.12.2 + ... Test title: Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + [Documentation] Test ID: 5.3.5.12.3 + ... Test title: Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter + [Documentation] Test ID: 5.3.5.12.4 + ... Test title: Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "include_signatures" parameter + [Documentation] Test ID: 5.3.5.12.5 + ... Test title: Get VNF Package Artifact with "include_signatures" parameter + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with include_signatures parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 5.3.5.12.6 + ... Test title: Get VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the GET request read the whole content of the archive containing the artifact files successfully when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + Get Artifact in VNF Package with Range Request + Check HTTP Response Status Code Is 206 + Check HTTP Response Header Content-Range Is Present and Matches the requested range + Check HTTP Response Header Content-Length Is Present and Matches the requested range length + +Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + [Documentation] Test ID: 5.3.5.12.7 + ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" + [Documentation] Test ID: 5.3.5.12.8 + ... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss" + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets + [Documentation] Test ID: 5.3.5.12.9 + ... Test title: Get VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in VNF Package with select_non_mano_artifact_sets parameter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 5.3.5.12.10 + ... Test title: Get VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact of VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 5.3.5.12.11 + ... Test title: GET VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when using a range request that does not match any available byte range in the file. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.12 + ... Test title: POST VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact + ... Pre-conditions: none + ... Reference: Clause 9.4.5a.3.1 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.13 + ... Test title: PUT VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.3 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.14 + ... Test title: PATCH VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.5a.3.4 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.15 + ... Test title: DELETE VNF Package Artifact - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.6.3.5 - ETSI GS NFV-SOL 005 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for VNF Package Artifact Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot index 1b0c58d4f53899d0ab84d8a5caa61b9750e46b51..57401ae3c8b4c69e54ef4d65e7ff9cac129d2167 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot @@ -44,7 +44,7 @@ GET Individual VNF Package Content with Range Request and NFVO not supporting Ra ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package file ... Post-Conditions: none - GET Individual VNF Package Content with Range Request + GET Individual VNF Package Content with explicit Range Request Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index f9277de2d4bbe4ce1f880817b8682c5553e676a8..b04c333b5f4a189c789ba0312f7ed961b193fa9e 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -10,14 +10,14 @@ Library MockServerLibrary Library String Library Collections Library String -Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml -Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** Get all VNF Packages Log Trying to get all VNF Packages present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -49,22 +49,22 @@ Check HTTP Response Body Does Not Contain checksum GET VNF Packages with attribute-based filter Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_id} = Split String @{attr}[0] ,${SEPERATOR} - @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_id} = Split String @{attr}[0] ${SEPARATOR} + @{var_provider} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -73,7 +73,7 @@ Get all VNF Packages with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response @@ -91,7 +91,7 @@ Get all VNF Packages without authorization token GET VNF Packages with all_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -112,7 +112,7 @@ Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector GET VNF Packages with exclude_default attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using exclude_default filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -131,7 +131,7 @@ GET VNF Packages with fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ GET VNF Packages with exclude_fields attribute selector Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -168,7 +168,7 @@ Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields select GET all VNF Packages with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -178,7 +178,7 @@ Send Post Request to create new VNF Package Resource Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body} = Get File jsons/CreateVnfPkgInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -196,6 +196,7 @@ PARSE the Descriptor File Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} @@ -209,6 +210,7 @@ Fetch Information from SOL001 descriptor file Set Global Variable ${Descriptor_Version} ${descriptor_version} Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} ${provider}= Get Variable Value ${nfv.vnfd[0].provider} ${product_name}= Get Variable Value ${nfv.vnfd[0].product-name} @@ -231,7 +233,7 @@ Match the Response Attributes of vnfPkgInfo with Descriptors Check Postcondition VNF Package Resource Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -241,7 +243,7 @@ Check Postcondition VNF Package Resource Exists Send PUT Request for all VNF Packages Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -249,7 +251,7 @@ Send PUT Request for all VNF Packages Send PATCH Request for all VNF Packages Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -257,7 +259,7 @@ Send PATCH Request for all VNF Packages Send DELETE Request for all VNF Packages Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -265,7 +267,7 @@ Send DELETE Request for all VNF Packages GET Individual VNF Package Log Trying to get a VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -278,7 +280,7 @@ Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package GET Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using wrong authorization bearer Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -286,7 +288,7 @@ GET Individual VNF Package with invalid resource identifier Send POST Request for individual VNF Package Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -294,7 +296,7 @@ Send POST Request for individual VNF Package Send PUT Request for individual VNF Package Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -304,7 +306,7 @@ Send PATCH to disable Individual VNF Package Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/VnfPkgInfoModificationsDisabled.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -319,7 +321,7 @@ Send PATCH to enable Individual VNF Package Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/VnfPkgInfoModifications.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -327,21 +329,21 @@ Send PATCH to enable Individual VNF Package Send DELETE Request for individual VNF Package Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${disabledVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition VNF Package is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${disabledVnfPackageId} Integer response status 404 Send DELETE Request for Individual VNF Package in operational state ENABLED Log Trying to perform a DELETE nsdInfo in ENABLED operational state Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -353,7 +355,7 @@ Check Postcondition VNF Package Exists Send DELETE Request for Individual VNF Package used for instantiated VNF instances Log Trying to perform a DELETE nsdInfo in ENABLED operational state Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${instantiatedVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -361,7 +363,7 @@ Send DELETE Request for Individual VNF Package used for instantiated VNF instanc Get VNFD in Individual VNF Package in Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -369,7 +371,7 @@ Get VNFD in Individual VNF Package in Zip Format Get VNFD in Individual VNF Package with security information Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -381,7 +383,7 @@ Check HTTP Response Header Content-Type Is Any of Get multi file VNFD in Individual VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -390,7 +392,7 @@ Get VNFD in Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -399,7 +401,7 @@ Get VNFD in Individual VNF Package with conflict due to onboarding state Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -407,7 +409,7 @@ Get VNFD in Individual VNF Package with conflict due to onboarding state Send POST Request for VNFD in individual VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -415,7 +417,7 @@ Send POST Request for VNFD in individual VNF Package Send PUT Request for VNFD in individual VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -423,7 +425,7 @@ Send PUT Request for VNFD in individual VNF Package Send PATCH Request for VNFD in individual VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -431,7 +433,7 @@ Send PATCH Request for VNFD in individual VNF Package Send DELETE Request for VNFD in individual VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -439,7 +441,7 @@ Send DELETE Request for VNFD in individual VNF Package GET Individual VNF Package Content Log Trying to get a VNF Package Content Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -452,16 +454,26 @@ GET Individual VNF Package Content with Range Request Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} +GET Individual VNF Package Content with explicit Range Request + Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + ${output}= Output response + Set Suite Variable ${response} ${output} + + Check HTTP Response Header Content-Range Is Present and Matches the requested range Log Check Content-Range HTTP Header Should Contain ${response['headers']} Content-Range - Should Be Equal As Strings ${response['headers']['Content-Range']} ${range} + Should Be Equal As Strings ${response['headers']['Content-Range']} bytes ${range}/${full_length} Log Header Content-Range is present Check HTTP Response Header Content-Length Is Present and Matches the requested range length @@ -474,8 +486,8 @@ GET Individual VNF Package Content with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -483,7 +495,7 @@ GET Individual VNF Package Content with invalid Range Request GET Individual VNF Package Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -491,7 +503,7 @@ GET Individual VNF Package Content with invalid resource identifier GET Content for VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -499,7 +511,7 @@ GET Content for VNF Package in onboarding state different from ONBOARDED Send POST Request for individual VNF Package Content Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -507,15 +519,15 @@ Send POST Request for individual VNF Package Content Send PUT Request for individual VNF Package Content Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to upload VNF Package Content Log Trying to perform a PUT. This method upload the content of a NSD - Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File files/hackfest_gateway_vnfd-1.0.tar.gz + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipVnfPackage} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -525,14 +537,14 @@ Send PUT Request to upload VNF Package Content Check Postcondition VNF Package Content is uploaded and available in the NFVO Log Trying to get a VNF Package Content Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content Integer response status 200 Send PUT Request to upload VNF Package Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD - Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False - ${body}= Get Binary File files/hackfest_gateway_vnfd-1.0.tar.gz + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipVnfPackage} ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${creatingVnfPackageId}/package_content data=${body} Should Be Empty ${response.text} ${response}= Create Dictionary status=${response.status_code} @@ -541,7 +553,7 @@ Send PUT Request to upload VNF Package Content with conflict due to onboarding s Send PATCH Request for individual VNF Package Content Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -549,21 +561,21 @@ Send PATCH Request for individual VNF Package Content Send DELETE Request for individual VNF Package Content Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -571,8 +583,8 @@ GET Individual VNF Package Artifact in octet stream format GET Individual VNF Package Artifact with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -581,22 +593,22 @@ GET Individual VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -604,7 +616,7 @@ GET Artifact for VNF Package in onboarding state different from ONBOARDED Send POST Request for individual VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -612,7 +624,7 @@ Send POST Request for individual VNF Package Artifact Send PUT Request for individual VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -620,7 +632,7 @@ Send PUT Request for individual VNF Package Artifact Send PATCH Request for individual VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -628,7 +640,7 @@ Send PATCH Request for individual VNF Package Artifact Send DELETE Request for individual VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -636,7 +648,7 @@ Send DELETE Request for individual VNF Package Artifact Send POST Request to upload VNF Package Content from URI Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${body} @@ -646,7 +658,7 @@ Send POST Request to upload VNF Package Content from URI Send POST Request to upload VNF Package Content from URI with conflict due to onboarding state Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${creatingVnfPkgViaUriId}/package_content/upload_from_uri ${body} @@ -656,7 +668,7 @@ Send POST Request to upload VNF Package Content from URI with conflict due to on Send GET Request for individual VNF Package Content from URI Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} @@ -664,7 +676,7 @@ Send GET Request for individual VNF Package Content from URI Send PUT Request for individual VNF Package Content from URI Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} @@ -672,7 +684,7 @@ Send PUT Request for individual VNF Package Content from URI Send PATCH Request for individual VNF Package Content from URI Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} @@ -680,7 +692,7 @@ Send PATCH Request for individual VNF Package Content from URI Send DELETE Request for individual VNF Package Content from URI Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} @@ -688,7 +700,7 @@ Send DELETE Request for individual VNF Package Content from URI Get all VNF Package Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -696,7 +708,7 @@ Get all VNF Package Subscriptions Get VNF Package Subscriptions with attribute-based filters Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -704,7 +716,7 @@ Get VNF Package Subscriptions with attribute-based filters Get VNF Package Subscriptions with invalid attribute-based filters Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -712,7 +724,7 @@ Get VNF Package Subscriptions with invalid attribute-based filters Get VNF Package Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -724,12 +736,18 @@ Send Post Request for VNF Package Subscription Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersions=${Descriptor_Version} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Post Request for Duplicated VNF Package Subscription Log Trying to create a subscription with an already created content @@ -737,15 +755,23 @@ Send Post Request for Duplicated VNF Package Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Package Subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -753,7 +779,7 @@ Send Put Request for VNF Package Subscriptions Send Patch Request for VNF Package Subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -761,7 +787,7 @@ Send Patch Request for VNF Package Subscriptions Send Delete Request for VNF Package Subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -779,7 +805,7 @@ Check Postcondition VNF Package Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${location} == Location ... REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If ${location} == Location @@ -790,7 +816,7 @@ Check Postcondition VNF Package Subscription Is Set Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -808,7 +834,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual VNF Package Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -816,7 +842,7 @@ Get Individual VNF Package Subscription GET individual VNF Package Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -824,7 +850,7 @@ GET individual VNF Package Subscription with invalid resource identifier Send Delete request for individual VNF Package Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -837,19 +863,19 @@ Check Postcondition VNF Package Subscription is Deleted Send Delete request for individual VNF Package Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -858,7 +884,7 @@ Send Put request for individual VNF Package Subscription Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -877,14 +903,13 @@ Check Postcondition VNF Package Subscription is Unmodified (Implicit) Check Postcondition VNF Package Subscription is not Created Log Trying to get a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 Create Sessions - Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} @@ -903,7 +928,7 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body Subscription Identifier matches the requested Subscription @@ -955,14 +980,14 @@ Check HTTP Response Header Contains Location Should Not Be Empty ${linkURL} Get access configuration information for external artifacts - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to access configuration information for external artifacts Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/ExternalArtifactsAccessConfig.json REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${body} ${output}= Output response @@ -977,7 +1002,7 @@ Check Postcondition individual VNF Package is created Send POST Request for access configuration for external artifacts Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${output}= Output response Set Suite Variable ${response} ${output} @@ -985,7 +1010,7 @@ Send POST Request for access configuration for external artifacts Send PATCH Request for access configuration for external artifacts Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${output}= Output response Set Suite Variable ${response} ${output} @@ -993,14 +1018,14 @@ Send PATCH Request for access configuration for external artifacts Send DELETE Request for Access configuration for external artifacts Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${output}= Output response Set Suite Variable ${response} ${output} Get Manifest in Individual VNF Package in plainFormat Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1008,14 +1033,14 @@ Get Manifest in Individual VNF Package in plainFormat Get Manifest in Individual VNF Package with security information Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} Get Manifest in Individual VNF Package with unacceptable request Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1023,7 +1048,7 @@ Get Manifest in Individual VNF Package with unacceptable request Send POST Request for manifest in individual VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1031,7 +1056,7 @@ Send POST Request for manifest in individual VNF Package Send PUT Request for manifest in individual VNF Package Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1039,7 +1064,7 @@ Send PUT Request for manifest in individual VNF Package Send PATCH Request for manifest in individual VNF Package Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1047,7 +1072,7 @@ Send PATCH Request for manifest in individual VNF Package Send DELETE Request for manifest in individual VNF Package Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest ${output}= Output response Set Suite Variable ${response} ${output} @@ -1055,7 +1080,7 @@ Send DELETE Request for manifest in individual VNF Package Get Artifact in VNF Package Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1063,7 +1088,7 @@ Get Artifact in VNF Package Get Artifact in VNF Package with exclude_all_mano_artifacts parameter Log Trying to get Artifact in VNF Package with exclude_all_mano_artifacts Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1071,7 +1096,7 @@ Get Artifact in VNF Package with exclude_all_mano_artifacts parameter Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter Log Trying to get Artifact in VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1080,7 +1105,7 @@ Get Artifact in VNF Package with select_non_mano_artifact_sets parameter Log Trying to get Artifact in VNF Package with security certificates Pass Execution If ${NFVO_non-MANO_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1088,7 +1113,7 @@ Get Artifact in VNF Package with select_non_mano_artifact_sets parameter Get Artifact in VNF Package with include_signatures parameter Log Trying to get Artifact in VNF Package with security certificates Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -1096,8 +1121,8 @@ Get Artifact in VNF Package with include_signatures parameter Get Artifact in VNF Package with Range Request Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. - Set Headers {"Range": "${range}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1105,7 +1130,7 @@ Get Artifact in VNF Package with Range Request Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&select_non_mano_artifact_sets=${non_mano_artifact_sets} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1113,14 +1138,14 @@ Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_m Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts Log Trying to get Artifact in VNF Package Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&exclude_all_non_mano_artifacts ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact of VNF Package in onboarding state different from ONBOARDED Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1129,8 +1154,8 @@ GET VNF Package Artifact with invalid Range Request Log Trying to get a range of bytes of the limit of the VNF Package Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Set Headers {"Accept": "${ACCEPT_ZIP}"} - Set Headers {"Range": "${erroneousRange}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1138,7 +1163,7 @@ GET VNF Package Artifact with invalid Range Request Send POST Request for VNF Package Artifact Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1146,7 +1171,7 @@ Send POST Request for VNF Package Artifact Send PUT Request for VNF Package Artifact Log Trying to perform a PUT (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1154,7 +1179,7 @@ Send PUT Request for VNF Package Artifact Send PATCH Request for VNF Package Artifact Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} @@ -1162,7 +1187,7 @@ Send PATCH Request for VNF Package Artifact Send DELETE Request for VNF Package Artifact Log Trying to perform a DELETE (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml index e9159106a9469826fc1afbdc1bcba43ebc86f61a..fdcf741de9defd082f7bec9e6f5536d32fe47a9d 100644 --- a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml +++ b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -1,19 +1,70 @@ tosca_definitions_version: tosca_simple_yaml_1_2 description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + metadata: descriptor_id: "VNF-B" vendor: "ETSI TST WG" version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + topology_template: substitution_mappings: - node_type: "tosca.nodes.nfv.VNF" + node_type: "tst010.vnf.simple" requirements: + virtual_link_right: + [right, virtual_link_right] virtual_link_management: [management, virtual_link_management] virtual_link_left: [left, virtual_link_left] - virtual_link_right: - [right, virtual_link_right] node_templates: right: type: "tosca.nodes.nfv.VduCp" @@ -21,49 +72,22 @@ topology_template: order: 1 requirements: virtual_link_right: - virtual_binding: VDU-B-2 + virtual_binding: VDU-B management: type: "tosca.nodes.nfv.VduCp" properties: order: 0 requirements: virtual_link_management: - virtual_binding: VDU-B-1 + virtual_binding: VDU-B left: type: "tosca.nodes.nfv.VduCp" properties: order: 2 requirements: virtual_link_left: - virtual_binding: VDU-B-1 - internal_vl: - type: "tosca.nodes.nfv.VnfVirtualLink" - properties: - connectivity_type: - layer_protocols: [ ipv4 ] - description: Internal Virtual link in the VNF - vl_profile: - max_bitrate_requirements: - root: 100000 - leaf: 20000 - min_bitrate_requirements: - root: 10000 - leaf: 10000 - internal_vdu_b_1_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 2 - requirements: - - virtual_binding: VDU-B-1 - - virtual_link: internal_vl - internal_vdu_b_2_cp: - type: "tosca.nodes.nfv.VduCp" - properties: - order: 0 - requirements: - - virtual_binding: VDU-B-2 - - virtual_link: internal_vl - vdu_b_1_vsd: + virtual_binding: VDU-B + vdu-b-1-vsd: type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" properties: virtual_block_storage_data: @@ -80,55 +104,7 @@ topology_template: min-disk: '1' min-ram: '2' size: '1' - artifacts: - sw_image: - type: "tosca.artifacts.nfv.SwImage" - file: vdu-b-1.qcow2 - vdu_b_2_vsd: - type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" - properties: - virtual_block_storage_data: - size_of_storage: 20 - rdma_enabled: false - sw_image_data: - name: "vdu-b-2 image" - version: "1.1" - checksum: - algorithm: "sha-224" - hash: "somehashfortst010" - container_format: "bare" - disk-format: qcow2 - min-disk: '1' - min-ram: '2' - size: '1' - artifacts: - sw_image: - type: tosca.artifacts.nfv.SwImage - file: vdu-b-2.qcow2 - vnf_b_1_VNF: - type: "tosca.nodes.nfv.VNF" - properties: - descriptor_id: "VNF-B-2VDUs" - descriptor_version: "2.0" - provider: "ETSI TST WG" - product_name: "VNF-B-2VDUs" - software_version: "2.0" - product_info_name: "VNF-B-2VDUs" - product_info_description: "TST010 reference VNF-B with 2 VDUs" - flavour_id: "VNF-B-2VDU_flavor" - flavour_description: "VNF-B with 2 VDUs flavor" - vnfm_info: - etsivnfm: - - v2.3.1 - interfaces: - Vnflcm: - scale: - implementation: scale-example.yaml - terminate: - implementation: terminate-example.yaml - operate: - implementation: operate-example.yaml - VDU_B_1: + VDU-B: type: "tosca.nodes.nfv.Vdu.Compute" properties: name: "vdu-b-1-vcd" @@ -147,22 +123,27 @@ topology_template: requirements: virtual_storage: - "vdu-b-1-vsd" - VDU_B_2: - type: "tosca.nodes.nfv.Vdu.Compute" + vnf-b-1_VNF: + type: "tst010.vnf.simple" properties: - name: "vdu-b-2-vcd" - descriptor: "Description of VDU-B-2" - vdu_profile: - min_number_of_instances: 1 - max_number_of_instances: 4 - capabilities: - virtual_compute: - properties: - virtual_memory: - virtual_mem_size: 6144 - numa_enabled: false - virtual_cpu: - num_virtual_cpu: 2 - requirements: - virtual_storage: - - "vdu-b-2-vsd" \ No newline at end of file + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml + diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index 926a45ae2192547114932d3b358403e1fc9c44f3..f6dd5c0e8ec828b2d89a4fb963960490e18984d6 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -3,12 +3,13 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken ${apiMajorVersion} v2 ${apiName} vnfpkgm ${FIELD_USAGE} 1 @@ -42,13 +43,15 @@ ${origResponse} httpresponse ${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based -${SEPERATOR} = +${SEPARATOR} = ${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database ${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868 ${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 ${instantiatedVnfPackageId} 0b79bab50daca910b000d4f1a2b675d604257e42 +${contentZipVnfPackage} files/vnfPackage.zip + ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip ${CONTENT_TYPE_PLAIN} text/plain @@ -63,11 +66,12 @@ ${onboardingStateVnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 # The VNF ${artifactPath} artifactPath ${CONTENT_TYPE_OCTET} application/octet-stream ${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO -${range} bytes=0-1023 -${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes +${range} 0-1023 +${full_length} 2000 # Size of the requested artifact to be downloaded via partial downloads +${length} 1024 # Size of the requested range +${erroneousRange} 10000000-1000000000 # Requesting a out of range number of bytes ${vnfPackageOctetStreamId} octetStreamPkgId ${vnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 -${length} 1024 ${creatingVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d ${newVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d @@ -75,8 +79,8 @@ ${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8&vnfProvider=NXW ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field ${CAN_FILTER} 1 # NFVO in able to use filters when retrieving VNF Packages ${fields} softwareImages,additionalArtifacts -${BAD_AUTHORIZATION} Bear sometoken -${VAR_SEPERATOR} & +${BAD_AUTHORIZATION_TOKEN} Bear sometoken +${VAR_SEPARATOR} & ${vnfPkgViaUriId} 788106a2-d692-44f3-a86d-384f0ce35e42 ${creatingVnfPkgViaUriId} d246ccdd-71aa-402f-b256-6a80ee54be3d @@ -90,7 +94,7 @@ ${check_descriptors} 1 ${descriptorType} SOL006 ${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute -${tosca_type_VNF} tosca.nodes.nfv.VNF +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder ${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink ${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp ${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage diff --git a/SOL005/VNFPackageManagement-API/files/vnfPackage.zip b/SOL005/VNFPackageManagement-API/files/vnfPackage.zip new file mode 100644 index 0000000000000000000000000000000000000000..9fcfb621d458e16f5e725f85d697d327ff8ab439 Binary files /dev/null and b/SOL005/VNFPackageManagement-API/files/vnfPackage.zip differ diff --git a/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json b/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json deleted file mode 100644 index c01e92b484e9305f89fbd1a54db3d69ea514695c..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json +++ /dev/null @@ -1,414 +0,0 @@ -[ - { - "id": "ABCDEFGHIJKL", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQR" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVW", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUVWX", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLM", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGH", - "ABCDEF" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY", - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTU" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEF", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDE", - "ABCDE", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOP" - ] - } - ] - }, - { - "vnfProductName": "ABCDE", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNO", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJK", - "vnfdVersions": [ - "ABCD" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCD", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKL" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRST" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQR", - "ABCDEFGHIJKLMNOP" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLM", - "ABCDEFGHIJK" - ], - "vnfPkgId": [ - "ABCDEFGH", - "ABCDEFGHIJKLMNOPQ", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDE", - "callbackUri": "ABCDEFGHIJKLM", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQRSTU" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGH", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUV", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDE", - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMN", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOP", - "vnfdVersions": [ - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVW" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMNOP", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGH", - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOP" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLM", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDEFGH" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLM", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKL" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDEF", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQ" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification", - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKL", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJK", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHI", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHI", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKL", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTU", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMN" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQRST" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOP", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKLMN" - ], - "operationalState": "ENABLED", - "usageState": [ - 773, - [ - {}, - [ - false, - true - ], - null, - null - ] - ] - } - } -] \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/schemas/links.schema.json b/SOL005/VNFPackageManagement-API/schemas/links.schema.json index 945df7daa143612fc605fd247e3edd5c18d0d258..3f4bb0e1fa4d4992e50a2c892cd7fc40fbc78c8b 100644 --- a/SOL005/VNFPackageManagement-API/schemas/links.schema.json +++ b/SOL005/VNFPackageManagement-API/schemas/links.schema.json @@ -1,6 +1,4 @@ { - "type": "array", - "items": { "type": "object", "description": "Links to resources related to this resource.\n", "required": [ @@ -52,4 +50,3 @@ } } } -} \ No newline at end of file diff --git a/indexes/sol_005_index.csv b/indexes/sol_005_index.csv index 31fcb08ef5bd92b99a37767fad052c4c748abee4..02b0ff9bfb4e563ff423e0bb5a04171c1ce145f8 100644 --- a/indexes/sol_005_index.csv +++ b/indexes/sol_005_index.csv @@ -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