Commit f45634fb authored by Giacomo Bernini's avatar Giacomo Bernini Committed by admin_forge
Browse files

NFV&MEC Plugtests 2020: fixes of issues found during Plugtests

parent 84c5580f
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -134,78 +134,78 @@ POST API Version
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response[0]['body']}
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
......@@ -126,8 +126,7 @@ Send VNF configuration
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
${status}= Convert To Integer ${expected_status}
Should Be Equal As Strings ${response['status']} ${status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Header Contains
......
*** Settings ***
# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library OperatingSystem
......@@ -265,28 +265,28 @@ POST Alarms Task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/alarms
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Put ${apiRoot}/${apiName}/${apiVersion}/alarms
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarms Task
Log Query VNF The GET method queries information about multiple alarms.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -294,7 +294,7 @@ GET Alarms Task
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarms Task with filter
Log Query VNF The GET method queries information about multiple alarms with filters.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -302,7 +302,7 @@ GET Alarms Task with filter
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarms Task with invalid filter
Log Query VNF The GET method queries information about multiple alarms with filters.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -310,7 +310,7 @@ GET Alarms Task with invalid filter
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
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}"}
......@@ -342,7 +342,7 @@ GET Alarms Task with exclude_fields attribute selector
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Header Contains
......@@ -359,7 +359,7 @@ Check HTTP Response Body Json Schema Is
Log Json Schema Validation OK
Check LINK in Header
${linkURL}= Get Value From Json ${response.headers} $..Link
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
GET Alarms Task with filter "id"
......@@ -369,7 +369,7 @@ GET Alarms Task with filter "id"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?id=${alarmId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "id"
Should Be Equal As Strings ${response['body']['id']} ${alarmId}
......@@ -381,7 +381,7 @@ GET Alarms Task with filter "vnfcInstanceIds"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "vnfcInstanceIds"
:FOR ${item} IN @{response['body']}
......@@ -395,7 +395,7 @@ GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "rootCauseFaultyResource_faultyResourceType"
:FOR ${item} IN @{response['body']}
......@@ -409,7 +409,7 @@ GET Alarms Task with filter "eventType"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?eventType=${eventType}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "eventType"
:FOR ${item} IN @{response['body']}
......@@ -423,7 +423,7 @@ GET Alarms Task with filter "perceivedSeverity"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?perceivedSeverity=${perceivedSeverity}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity"
:FOR ${item} IN @{response['body']}
......@@ -437,7 +437,7 @@ GET Alarms Task with filter "probableCause"
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?probableCause=${probableCause}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause"
:FOR ${item} IN @{response['body']}
......
......@@ -2,7 +2,7 @@
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -136,78 +136,78 @@ POST API Version
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/v1/api_version
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response[0]['body']}
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library JSONSchemaLibrary
Suite Setup Check resource existence
......@@ -80,35 +80,35 @@ POST escalate severity
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
......
*** Settings ***
# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -113,7 +113,7 @@ POST Alarm Task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PUT Alarm Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......@@ -121,7 +121,7 @@ PUT Alarm Task
${body}= Get File jsons/alarmModifications.json
Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH Alarm Task
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
......@@ -131,7 +131,7 @@ PATCH Alarm Task
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH Alarm Task with wrong precondition
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
......@@ -140,14 +140,14 @@ PATCH Alarm Task with wrong precondition
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
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}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarm Task
Log Query VNF The GET method queries information about individual alarm.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -157,7 +157,7 @@ GET Alarm Task
${etag} Output response headers ETag
Set Suite Variable &{original_etag} ${etag}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarm Task with filter
Log Query VNF The GET method queries information about individual alarm with filters.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -165,7 +165,7 @@ GET Alarm Task with filter
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
GET Alarm Task with invalid filter
Log Query VNF The GET method queries information about individual alarm with filters.
Set Headers {"Accept":"${ACCEPT}"}
......@@ -173,10 +173,10 @@ GET Alarm Task with invalid filter
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
......
......@@ -2,7 +2,7 @@
Resource environment/variables.txt
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Documentation This resource represents an individual subscription for VNF alarms.
... The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management.
Suite Setup Check resource existence
......@@ -83,35 +83,35 @@ Post Create individual subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
PATCH individual subscription
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
......@@ -119,18 +119,18 @@ PATCH individual subscription
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
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}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal ${response.status_code} ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
......
*** Settings ***
Resource environment/variables.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
......@@ -46,7 +46,7 @@ Create a new Subscription - NO-DUPLICATION
Check HTTP Response Status Code Is 303
GET Subscriptions
[Documentation] Test ID: 6.3.4.4.5
[Documentation] Test ID: 6.3.4.4.4
... Test title: GET Subscriptions
... Test objective: The objective is to retrieve the list of active subscriptions
... Pre-conditions:
......@@ -59,7 +59,7 @@ GET Subscriptions
Check HTTP Response Body Json Schema Is FmSubscriptions