Commit 3289ba78 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

updated authorization header and token use in SOL003 v2.7.1

parent bf39094b
...@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented ...@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords *** *** Keywords ***
POST API Version POST API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
GET API Version GET API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PUT API Version PUT API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PATCH API Version PATCH API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
DELETE API Version DELETE API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
......
*** Settings *** *** Settings ***
Library String Library String
Library OperatingSystem Library OperatingSystem
Resource environment/variables.txt Resource environment/variables.txt
Library JSONLibrary Library JSONLibrary
Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Suite Setup Check resource existence and get CallbackUri Suite Setup Check resource existence and get CallbackUri
*** Test Cases *** *** Test Cases ***
VNF Fault Alarm Notification VNF Fault Alarm Notification
[Documentation] Test ID: 7.3.5.7.1 [Documentation] Test ID: 7.3.5.7.1
... Test title: VNF Fault Alarm Notification ... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test that the POST request triggers 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. ... 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 ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM ... Config ID: Config_prod_VNFM
... Applicability: none ... Applicability: none
... Post-Conditions: none ... Post-Conditions: none
Post Alarm Notification Post Alarm Notification
Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204
VNF Fault Alarm Cleared Notification VNF Fault Alarm Cleared Notification
[Documentation] Test ID: 7.3.5.7.2 [Documentation] Test ID: 7.3.5.7.2
... Test title: VNF Fault Alarm Cleared Notification ... Test title: VNF Fault Alarm Cleared Notification
... Test objective: The objective is to test that the POST request triggers 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. ... 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 ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM ... Config ID: Config_prod_VNFM
... Applicability: none ... Applicability: none
... Post-Conditions: none ... Post-Conditions: none
Post Alarm Cleared Notification Post Alarm Cleared Notification
Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204
VNF Fault Alarm List Reulit Notification VNF Fault Alarm List Reulit Notification
[Documentation] Test ID: 7.3.5.7.3 [Documentation] Test ID: 7.3.5.7.3
... Test title: VNF Fault Alarm List Rebuilt Notification ... 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. ... 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. ... 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 ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM ... Config ID: Config_prod_VNFM
... Applicability: none ... Applicability: none
... Post-Conditions: none ... Post-Conditions: none
Post Alarm List Rebuilt Notification Post Alarm List Rebuilt Notification
Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204
*** Keywords *** *** Keywords ***
Check resource existence and get CallbackUri Check resource existence and get CallbackUri
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200 Integer response status 200
Validate Json response body FmSubscriptions.schema.json Validate Json response body FmSubscriptions.schema.json
Set Global Variable ${callbackResp} response body callbackUri Set Global Variable ${callbackResp} response body callbackUri
Check HTTP Response Status Code Is Check HTTP Response Status Code Is
[Arguments] ${expected_status} [Arguments] ${expected_status}
Log Validate Status code Log Validate Status code
Should Be Equal As Strings ${response['status']} ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated Log Status code validated
Post Alarm Notification Post Alarm Notification
log Trying to perform a POST to get notification log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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/AlarmNotification.json ${template} = Get File jsons/AlarmNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} ${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body} Post ${callbackResp} ${body}
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
Post Alarm Cleared Notification Post Alarm Cleared Notification
log Trying to perform a POST to get notification log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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/AlarmClearedNotification.json ${template} = Get File jsons/AlarmClearedNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId}
Post ${callbackResp} ${body} Post ${callbackResp} ${body}
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
Post Alarm List Rebuilt Notification Post Alarm List Rebuilt Notification
log Trying to perform a POST to get notification log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"} 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/AlarmListRebuiltNotification.json ${template} = Get File jsons/AlarmListRebuiltNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} ${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body} Post ${callbackResp} ${body}
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
\ No newline at end of file
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https ${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== ${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${CONTENT_TYPE} application/json ${CONTENT_TYPE} application/json
${ACCEPT} application/json ${ACCEPT} application/json
${ACCEPT_JSON} application/json ${ACCEPT_JSON} application/json
......
...@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented ...@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords *** *** Keywords ***
POST API Version POST API Version
Set Headers {"Accept":"${ACCEPT_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}"}
Post ${apiRoot}/${apiName}/api_versions Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
GET API Version GET API Version
Set Headers {"Accept":"${ACCEPT_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}"}
Get ${apiRoot}/${apiName}/api_versions Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PUT API Version PUT API Version
Set Headers {"Accept":"${ACCEPT_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}"}
Put ${apiRoot}/${apiName}/api_versions Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PATCH API Version PATCH API Version
Set Headers {"Accept":"${ACCEPT_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}"}
Patch ${apiRoot}/${apiName}/api_versions Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
DELETE API Version DELETE API Version
Set Headers {"Accept":"${ACCEPT_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}"}
Delete ${apiRoot}/${apiName}/api_versions Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_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}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_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}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_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}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_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}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_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}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
......
*** Settings *** *** Settings ***
Library String Library String
Library JSONSchemaLibrary schemas/ Library JSONSchemaLibrary schemas/
Resource environment/variables.txt Resource environment/variables.txt
Library OperatingSystem Library OperatingSystem
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Suite Setup Check resource existence and get CallbackUri Suite Setup Check resource existence and get CallbackUri
*** Test Cases *** *** Test Cases ***
VNF Indicator Value Change Notification VNF Indicator Value Change Notification
[Documentation] Test ID: 7.3.6.7.1 [Documentation] Test ID: 7.3.6.7.1
... Test title: VNF Indicator Value Change Notification ... Test title: VNF Indicator Value Change Notification
... Test objective: The objective is to test that the POST request triggers 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. ... 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 ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM ... Config ID: Config_prod_VNFM
... Applicability: none ... Applicability: none
... Post-Conditions: none ... Post-Conditions: none
Post VNF Indicator Value Change Notification Post VNF Indicator Value Change Notification
Check HTTP Response Status Code Is 204 Check HTTP Response Status Code Is 204
*** Keywords *** *** Keywords ***
Check resource existence and get CallbackUri Check resource existence and get CallbackUri
Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_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}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200 Integer response status 200
Validate Json response body VnfIndicatorSubscription.schema.json Validate Json response body VnfIndicatorSubscription.schema.json
Set Global Variable ${callbackResp} response body callbackUri Set Global Variable ${callbackResp} response body callbackUri
Check HTTP Response Status Code Is Check HTTP Response Status Code Is
[Arguments] ${expected_status} [Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated Log Status code validated
Post VNF Indicator Value Change Notification Post VNF Indicator Value Change Notification
log Trying to perform a POST to get notification log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_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/VnfIndicatorValueChangeNotification.json ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId}
Post ${callbackResp} ${body} Post ${callbackResp} ${body}
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse} Set Global Variable ${response} ${outputResponse}
...@@ -3,9 +3,10 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ...@@ -3,9 +3,10 @@ ${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https ${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTHORIZATION_HEADER} Authorization
${NEG_AUTHORIZATION} Bearer negativetoken ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${BAD_AUTHORIZATION} Bear sometoken ${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken
${BAD_AUTHORIZATION_TOKEN} Bear sometoken
${ACCEPT_JSON} application/json ${ACCEPT_JSON} application/json
${AUTH_USAGE} 1 ${AUTH_USAGE} 1
${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_JSON} application/json
......
...@@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented ...@@ -131,70 +131,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords *** *** Keywords ***
POST API Version POST API Version
Set Headers {"Accept":"${ACCEPT}"} Set Headers {"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 Post ${apiRoot}/${apiName}/api_versions