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
......@@ -140,7 +140,7 @@ GET Performance Thresholds - Bad Request Response too Big
GET all Performance Thresholds
Log Trying to get all thresholds present in the VNFM
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -148,7 +148,7 @@ GET all Performance Thresholds
GET Performance Thresholds with attribute-based filter
Log Trying to get thresholds present in the VNFM with filter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -156,7 +156,7 @@ GET Performance Thresholds with attribute-based filter
GET Performance Thresholds with invalid attribute-based filter
Log Trying to get thresholds present in the VNFM with invalid filter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -164,14 +164,14 @@ GET Performance Thresholds with invalid attribute-based filter
GET VNF Performance Thresholds with invalid resource endpoint
Log Trying to get thresholds present in the VNFM with invalid resource endpoint
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold
${output}= Output response
Set Suite Variable ${response} ${output}
Send Post Request Create new Performance Threshold
Log Creating a new THreshold
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${template}= Get File jsons/CreateThresholdRequest.json
......@@ -182,7 +182,7 @@ Send Post Request Create new Performance Threshold
Send PUT Request for all Performance Thresholds
Log PUT THresholds
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
......@@ -191,7 +191,7 @@ Send PUT Request for all Performance Thresholds
Send PATCH Request for all Performance Thresholds
Log PUT THresholds
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
......@@ -200,7 +200,7 @@ Send PATCH Request for all Performance Thresholds
Send DELETE Request for all Performance Thresholds
Log DELETE THresholds
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -212,7 +212,7 @@ Check Postcondition Thresholds Exist
Check Postcondition Threshold Exists
Log Checking that Threshold exists
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']}
${output}= Output response
Set Suite Variable ${response} ${output}
......
......@@ -4,7 +4,8 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${NEG_AUTHORIZATION} Bearer negativetoken
${CONTENT_TYPE_JSON} application/json
......
......@@ -2,7 +2,8 @@
${NFVO_HOST} localhost # Hostname of the NFVO
${NFVO_PORT} 8081 # Listening port of the NFVO
${NFVO_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${CONTENT_TYPE} application/json
${AUTH_USAGE} 1
${ACCEPT} application/json
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment