Skip to content
Snippets Groups Projects
Commit fc99bef2 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch 'master' into 'master'

Master

See merge request !1
parents 565d7b62 850c8c3f
No related branches found
No related tags found
1 merge request!1Master
Showing
with 1143 additions and 54 deletions
*** Settings ***
Resource environments/variables.txt
Resource environment/variables.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
... spec=SOL002-VNFConfiguration-API.yaml
Library JSONLibrary
......@@ -7,6 +7,9 @@ Library JSONSchemaLibrary schemas/
Library OperatingSystem
Library DependencyLibrary
*** Variables ***
${response}= httpresponse
*** Test Cases ***
POST Configuration - Method not implemented
log Trying to perform a POST. This method should not be implemented
......@@ -135,3 +138,13 @@ Check Postcondition VNF Is Configured
${output}= evaluate json.loads('''${response.body}''') json
${input}= Get File json/vnfConfigModifications.json
Should Be Equal ${output} ${input}
Send Duplicated VNF configuration
Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified
log Trying to perform a PATCH. This method modifies an individual alarm resource
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}"}
${body}= Get File json/vnfConfigModifications.json
${response}= Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body}
......@@ -11,3 +11,30 @@ ${apiName} vnfconfig
${apiVersion} v1
${Etag}= an etag
${Etag_modified}= a modified etag
${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${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
${sub_filter} filter
${sub_filter_invalid} filter_invalid
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${notification_ep} /notification
${notification_port} 9091
${AlarmNotification} {}
${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${PerceivedSeverity} CRITICAL
......@@ -110,6 +110,6 @@ DELETE subscriptions - Method not implemented
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
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_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4
......@@ -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}"}
......
......@@ -34,3 +34,10 @@ ${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${PerceivedSeverity} CRITICAL
${sleep_interval} 20s
${alarm_filter} managedObjectId
${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c
${invalid_alarm_filter} badFilter
${notification_ep} /notification
${notification_port} 9091
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
......@@ -9,7 +9,7 @@ Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
GET Individual 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": "${AUHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -39,7 +39,7 @@ GET Subscription - Negative (Not Found)
DELETE Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -47,7 +47,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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -62,7 +62,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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -70,7 +70,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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -78,7 +78,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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUHORIZATION}"}
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
......@@ -85,7 +85,7 @@ DELETE VNF Indicator Notification
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
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}
\ No newline at end of file
......@@ -3,4 +3,5 @@ ${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
\ No newline at end of file
${sleep_interval} 20s
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
\ No newline at end of file
......@@ -11,6 +11,10 @@ Documentation This resource represents an individual VNF instance. The client
... underlying VNF instance, and to read information about the VNF instance.
Suite Setup Check resource existance
*** Variables ***
${Etag}= an etag
${Etag_modified}= a modified etag
*** Test Cases ***
Post Individual VNFInstance - Method not implemented
Log Trying to perform a POST. This method should not be implemented
......
......@@ -22,7 +22,7 @@ Deliver a notification - Operation Occurence
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Clear Requests ${notification_ep}
Deliver a notification - Id Creation
log The POST method delivers a notification from the server to the client.
......@@ -36,7 +36,7 @@ Deliver a notification - Id Creation
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Clear Requests ${notification_ep}
Deliver a notification - Id deletion
log The POST method delivers a notification from the server to the client.
......@@ -50,7 +50,7 @@ Deliver a notification - Id deletion
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Clear Requests ${notification_ep}
Test a notification end point
log The GET method allows the server to test the notification endpoint
......@@ -59,31 +59,31 @@ Test a notification end point
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Verify Mock Expectation ${req}
Clear Requests ${callback_endpoint}
Clear Requests ${notification_ep}
PUT notification - Method not implemented
log Trying to perform a PUT. This method should not be implemented
Put ${callback_endpoint}
Put ${notification_ep}
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 ${callback_endpoint}
Patch ${notification_ep}
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 ${callback_endpoint}
Delete ${notification_ep}
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 ${callback_port} alias=mockInstance
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_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-5.3.9
*** 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==
${AUTH_USAGE} 1
${CancelMode} GRACEFUL
${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CONTENT_TYPE} application/json
${ACCEPT} application/json
${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${CONTENT_TYPE_PATCH} application/merge-patch+json
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${callback_endpoint} /notification
${callback_port} 9091
${callback_schema} http
${callback_uri} localhost
${VNFM_DUPLICATION} 0
${Etag}= an etag
${Etag_modified}= a modified etag
${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
${VNFM_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_port} 9091
${callback_schema} http
${callback_uri} localhost
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
\ No newline at end of file
This diff is collapsed.
*** Variables ***
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
\ No newline at end of file
${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 0b79bab50daca910b000d4f1a2b675d604257e42
${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
${apiRoot} /
${AUTH_USAGE} 1
${NEG_AUTHORIZATION} Bearer negativetoken
${apiVersion} v1
${apiName} vnfpm
${FIELD_USAGE} 1
${VNFM_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
${VNFM_AUTH_USAGE} 1
${VNFM_DUPLICATION} 1
\ No newline at end of file
......@@ -111,6 +111,6 @@ DELETE Performance Notification
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
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}
\ No newline at end of file
......@@ -4,3 +4,4 @@ ${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
......@@ -17,7 +17,7 @@ ${CONTENT_TYPE_PATCH} application/merge-patch+json
${Etag}= an etag
${Etag_modified}= a modified etag
${VNFM_DUPLICATION} 1
${VNFM_DUPLICATION} 1
${sub_filter} filter
${sub_filter_invalid} filter_invalid
......@@ -29,3 +29,5 @@ ${AlarmNotification} {}
${AlarmClearedNotification} {}
${AlarmListRebuiltNotification} {}
${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
......@@ -109,6 +109,6 @@ DELETE subscriptions - Method not implemented
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
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} #The API producer is set to NFVO according to SOL003-7.3.4
......@@ -3,3 +3,4 @@ ${callback_endpoint} /notification
${callback_uri} http://localhost
${callback_port} 9091
${sleep_interval} 20s
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
\ No newline at end of file
......@@ -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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
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 ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${VNFM_AUTHENTICATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Integer response status 405
Log Received 405 Method not implemented as expected
......
......@@ -85,7 +85,7 @@ Delete VNF Indicator Notification
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
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}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment