Commit 7ec8d395 authored by Elian Kraja's avatar Elian Kraja
Browse files

Refactoring environment variables

parents 8fd9619b 73eaffb5
......@@ -8,9 +8,6 @@ Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library DependencyLibrary
*** Variables ***
${Etag}= an etag
${Etag_modified}= a modified etag
*** Test Cases ***
POST Alarm - Method not implemented
......
......@@ -43,7 +43,7 @@ Create a new Subscription - DUPLICATION
... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
... Post-Conditions:
Log Trying to create a subscription with an already created content
Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test
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}"}
......@@ -68,7 +68,7 @@ Create a new Subscription - NO-DUPLICATION
... Applicability: the VNFM decides to not create a duplicate subscription resource
... Post-Conditions:
Log Trying to create a subscription with an already created content
Pass Execution If ${NVFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test
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}"}
......
*** Variables ***
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA} https
${NFVO_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${ACCEPT} application/json
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
${AUTH_USAGE} 1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${invalid_alarm_filter} badFilter
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfInstanceDescription} description vnf
${vnfInstanceDescription_Update} Updated description vnf
${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
${ACCEPT_PLAIN} text/plain
${ACCEPT_ZIP} application/zip
${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
${ARTIFACT_TYPE} application/octet-stream
${ARTIFACT_ID} artifactId
${WRONG_ACCEPT} application/json
${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CancelMode} GRACEFUL
${LccnSubscriptionRequest} {}
${NVFM_DUPLICATION} 0
${CONTENT_TYPE_PATCH} application/merge-patch+json
${Etag}= an etag
${Etag_modified}= a modified etag
${VNFM_DUPLICATION} 1
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep} notification
${apiRoot} /
${apiName} vnffm
${apiVersion} v1
${AlarmNotification} {}
${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
\ No newline at end of file
${AlarmListRebuiltNotification} {}
......@@ -5,7 +5,6 @@ Suite Teardown Terminate All Processes kill=true
Library MockServerLibrary
Library Process
Library OperatingSystem
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${notification_port}
*** Test Cases ***
......@@ -22,13 +21,13 @@ Deliver a notification - Alarm
${json}= Get File schemas/alarmNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm Clearance
[Documentation] Test ID: 7.4.5.2
......@@ -43,13 +42,13 @@ Deliver a notification - Alarm Clearance
${json}= Get File schemas/alarmClearedNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm List Rebuilt
[Documentation] Test ID: 7.4.5.3
......@@ -64,13 +63,13 @@ Deliver a notification - Alarm List Rebuilt
${json}= Get File schemas/alarmListRebuiltNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY}
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${notification_ep}
Clear Requests ${callback_endpoint}
Test a notification end point
[Documentation] Test ID: 7.4.5.4
......@@ -82,36 +81,34 @@ Test a notification end point
... Applicability:
... Post-Conditions:
log The GET method allows the server to test the notification endpoint
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${notification_ep}
Get ${callback_endpoint}
Log Validate Status code
Integer response status 204
Log Validation OK
PUT notification - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Put ${notification_ep}
Put ${callback_endpoint}
Log Validate Status code
Output response
Integer response status 405
PATCH subscriptions - Method not implemented
log Trying to perform a PATCH. This method should not be implemented
Patch ${notification_ep}
Patch ${callback_endpoint}
Log Validate Status code
Output response
Integer response status 405
DELETE subscriptions - Method not implemented
log Trying to perform a DELETE. This method should not be implemented
Delete ${notification_ep}
Delete ${callback_endpoint}
Log Validate Status code
Output response
Integer response status 405
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${NFVO_SCHEMA}://${NFVO_HOST}:${notification_port} #The API producer is set to NFVO according to SOL003-7.3.4
\ No newline at end of file
Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4
\ No newline at end of file
*** Variables ***
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA} https
${NFVO_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${CONTENT_TYPE_PATCH} application/merge-patch+json
${ACCEPT} application/json
${apiRoot} /
${apiName} vnflcm
${apiVersion} v1
${AUTH_USAGE} 1
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${vnfInstanceName} Test-VnfInstance
${vnfInstanceDescription} description vnf
${vnfInstanceDescription_Update} Updated description vnf
${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT
${ACCEPT_PLAIN} text/plain
${ACCEPT_ZIP} application/zip
${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c
${ARTIFACT_TYPE} application/octet-stream
${ARTIFACT_ID} artifactId
${WRONG_ACCEPT} application/json
${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CancelMode} GRACEFUL
${NVFM_DUPLICATION} 0
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep} /notification
${notification_port} 9091
${VnfLcmOperationOccurrenceNotification} {}
${VnfIdentifierCreationNotification} {}
${VnfIdentifierDeletionNotification} {}
${callback_endpoint} /notification
${callback_uri} http://localhost
${callback_port} 9091
${sleep_interval} 20s
\ No newline at end of file
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/individualSubscription.txt
Library OperatingSystem
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
......@@ -9,7 +9,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
GET Individual Subscription
Log Trying to get a given subscription identified by subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 200
Log Received a 200 OK as expected
......@@ -24,7 +24,7 @@ GET Individual Subscription
GET Subscription - Negative (Not Found)
Log Trying to perform a request on a subscriptionID which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log Received 404 Not Found as expected
......@@ -38,7 +38,7 @@ GET Subscription - Negative (Not Found)
GET Subscription - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 401
......@@ -54,7 +54,7 @@ GET Subscription - Negative (Unauthorized: Wrong Token)
DELETE Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 204
Log Received 204 No Content as expected
......@@ -62,7 +62,7 @@ DELETE Subscription
DELETE Subscription - Negative (Not Found)
Log Trying to perform a DELETE on a subscriptionId which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log The subscriptionId is not present in database
......@@ -77,7 +77,7 @@ DELETE Subscription - Negative (Not Found)
PUT Subscription - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -85,7 +85,7 @@ PUT Subscription - (Method not implemented)
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -93,7 +93,7 @@ PATCH Subscription - (Method not implemented)
POST Subscription - (Method not implemented)
Log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/individualVnfIndicator.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
......@@ -8,7 +8,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
GET Individual VNF Indicator
Log The GET method reads a VNF indicator.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -22,7 +22,7 @@ GET Individual VNF Indicator
GET Individual VNF Indicator - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization" : "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId}
Integer response status 404
Log Received 404 Not Found as expected
......@@ -36,7 +36,7 @@ GET Individual VNF Indicator - Negative (Not Found)
GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept" : "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
......@@ -52,7 +52,7 @@ GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token)
GET Individual VNF Indicator - Negative (Unauthorized: No Token)
Log Trying to perform a negative get, without authentication token.
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 401
......@@ -68,7 +68,7 @@ GET Individual VNF Indicator - Negative (Unauthorized: No Token)
POST Individual VNF Indicator (Method not implemented)
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -76,7 +76,7 @@ POST Individual VNF Indicator (Method not implemented)
PUT Individual VNF Indicator (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -84,7 +84,7 @@ PUT Individual VNF Indicator (Method not implemented)
PATCH Individual VNF Indicator (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -92,7 +92,7 @@ PATCH Individual VNF Indicator (Method not implemented)
DELETE Individual VNF Indicator (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/subscriptions.txt
Library OperatingSystem
Library JSONLibrary
......@@ -10,7 +10,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
GET Subscription
Log Trying to get the list of subscriptions
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 200
Log Received a 200 OK as expected
......@@ -24,7 +24,7 @@ GET Subscription
GET Subscription - Filter
Log Trying to get the list of subscriptions using filters
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${POS_FILTER}
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -38,7 +38,7 @@ GET Subscription - Filter
GET Subscription - Negative Filter
Log Trying to get the list of subscriptions using filters with wrong attribute name
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${NEG_FILTER}
Integer response status 400
Log Received a 400 Bad Request as expected
......@@ -53,7 +53,7 @@ GET Subscription - Negative Filter
GET Subscription - Negative (Not Found)
Log Trying to perform a request on a Uri which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscription
Integer response status 404
Log Received 404 Not Found as expected
......@@ -67,7 +67,7 @@ GET Subscription - Negative (Not Found)
GET Subscription - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 401
......@@ -85,7 +85,7 @@ POST Subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${body}= Get File json/subscriptions.json
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
Integer response status 201
Log Received 201 Created as expected
......@@ -103,7 +103,7 @@ POST Subscription - DUPLICATION
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${body}= Get File json/subscriptions.json
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
Integer response status 201
Log Received 201 Created as expected
......@@ -121,7 +121,7 @@ POST Subscription - NO DUPLICATION
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${body}= Get File json/subscriptions.json
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
Integer response status 303
Log Received 303 See Other as expected
......@@ -132,7 +132,7 @@ POST Subscription - NO DUPLICATION
PUT Subscription - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -140,7 +140,7 @@ PUT Subscription - (Method not implemented)
PATCH Subscription - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -148,7 +148,7 @@ PATCH Subscription - (Method not implemented)
DELETE Subscription - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 405
Log Received 405 Method not implemented as expected
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Library JSONLibrary
Resource environment/vnfIndicators.txt
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
......@@ -9,7 +9,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
GET all Indicators
Log The GET method queries multiple VNF indicators
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -23,7 +23,7 @@ GET all Indicators
GET all Indicators - Filter
Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS}
Integer response status 200
${contentType}= Output response headers Content-Type
......@@ -37,7 +37,7 @@ GET all Indicators - Filter
GET all Indicators - Negative (wronge filter name)
Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters. Negative case, with erroneous attribute name
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS}
Integer response status 400
Log Received 400 Bad Request as expected
......@@ -51,7 +51,7 @@ GET all Indicators - Negative (wronge filter name)
GET all Indicators - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM \ is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM \ is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
......@@ -67,7 +67,7 @@ GET all Indicators - Negative (Unauthorized: Wrong Token)
GET all Indicators - Negative (Unauthorized: No Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${VNFM_AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
......@@ -84,7 +84,7 @@ GET all Indicators - Negative (Unauthorized: No Token)
GET all Indicators (Negative: Not found)
Log Trying to perform a GET on a erroneous URI
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicator
Integer response status 404
Log Received 404 Not Found as expected
......@@ -99,7 +99,7 @@ GET all Indicators (Negative: Not found)
POST all Indicators (Method not implemented)
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -107,7 +107,7 @@ POST all Indicators (Method not implemented)
PUT all Indicators (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -115,7 +115,7 @@ PUT all Indicators (Method not implemented)
PATCH all Indicators (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 405
Log Received 405 Method not implemented as expected
......@@ -123,7 +123,7 @@ PATCH all Indicators (Method not implemented)
DELETE all Indicators (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${VNFM_AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 405
Log Received 405 Method not implemented as expected
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/generic.txt # Generic Parameters
Resource environment/variables.txt # Generic Parameters
Resource environment/vnfIndicatorinVnfInstance.txt
Library JSONLibrary
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
......@@ -9,7 +9,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
GET Indicators on VNF Instance