Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NFV - Network Functions Virtualisation
api-tests
Commits
77054f18
Commit
77054f18
authored
Feb 09, 2021
by
Giacomo Bernini
Browse files
SOL003 - updated usage and config of authorization header
parent
fee078ee
Changes
48
Show whitespace changes
Inline
Side-by-side
SOL003/VNFFaultManagement-API/ApiVersion.robot
View file @
77054f18
...
...
@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords ***
POST API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
GET API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PUT API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PATCH API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
DELETE API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
POST API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
GET API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PUT API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PATCH API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
DELETE API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot
View file @
77054f18
...
...
@@ -14,7 +14,7 @@ ${original_etag} 1234
*** Keywords ***
Check created Subscription existence
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}
/
${apiVersion}
/subscriptions/
${response['body']['id']}
Integer
response status
200
Check Postcondition FaultManagement Subscription Is Set
...
...
@@ -41,13 +41,13 @@ Check Postcondition VNF fault management individual alarm Exists
Check Individual Subscription existence
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}
/
${apiVersion}
/subscriptions/
${subscriptionId}
Integer
response status
200
Check Individual Subscription deleted
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}
/
${apiVersion}
/subscriptions/
${subscriptionId}
Integer
response status
404
...
...
@@ -76,7 +76,7 @@ Check HTTP Response Header ContentType is
Check Postcondition Subscription Resource Returned in Location Header Is Available
Log
Going to check postcondition
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
Authorization
":
"
${AUTHORIZATION}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
GET
${response['headers']['Location']}
Integer
response status
200
Log
Received a 200 OK as expected
...
...
@@ -89,7 +89,7 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab
Send POST request for fault management Alarms
log
Trying to perform a POST. This method should not be implemented
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}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -97,7 +97,7 @@ Send POST request for fault management Alarms
PATCH Fault management Alarms
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -105,7 +105,7 @@ PATCH Fault management Alarms
PUT Fault management Alarms
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -113,7 +113,7 @@ PUT Fault management Alarms
DELETE Fault management Alarms
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -121,7 +121,7 @@ DELETE Fault management Alarms
GET Fault Management Alarms
Log
Query NFVO The GET method queries information about multiple alarms.
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
}
"}
Log
Execute Query
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
...
...
@@ -130,7 +130,7 @@ GET Fault Management Alarms
GET Fault Management Alarms With Filters
Log
Query NFVO The GET method queries information about multiple alarms with filters.
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
}
"}
Log
Execute Query
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${alarm_filter}
=
${nsInstanceId}
${outputResponse}
=
Output
response
...
...
@@ -139,7 +139,7 @@ GET Fault Management Alarms With Filters
GET Fault Management Alarms With Invalid Filters
Log
Query NFVO The GET method queries information about multiple alarms with filters.
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
}
"}
Log
Execute Query
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${invalid_alarm_filter}
=
${nsInstanceId}
${outputResponse}
=
Output
response
...
...
@@ -148,7 +148,7 @@ GET Alarms Task with all_fields attribute selector
Log
Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If
${NFVO_FIELDS}
=
= 0
The NFVO is not able to use fields parameter
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}
/
${apiVersion}
/alarms?exclude_default
${output}
=
Output
response
Set Suite Variable
${response}
${output}
...
...
@@ -156,7 +156,7 @@ GET Alarms Task with exclude_default attribute selector
Log
Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If
${NFVO_FIELDS}
=
= 0
The NFVO is not able to use fields parameter
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}
/
${apiVersion}
/alarms?exclude_default
${output}
=
Output
response
Set Suite Variable
${response}
${output}
...
...
@@ -164,7 +164,7 @@ GET Alarms Task with fields attribute selector
Log
Trying to get all alarms present in the NFVO Catalogue, using fields
Pass Execution If
${NFVO_FIELDS}
=
= 0
The NFVO is not able to use fields parameter
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}
/
${apiVersion}
/alarms?fields=
${fields}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
...
...
@@ -172,14 +172,14 @@ GET Alarms Task with exclude_fields attribute selector
Log
Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If
${NFVO_FIELDS}
=
= 0
The NFVO is not able to use fields parameter
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}
/
${apiVersion}
/alarms?exclude_fields=
${fields}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Send POST request for fault management Individual Alarm
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -187,7 +187,7 @@ Send POST request for fault management Individual Alarm
DELETE Fault Management Individual Alarm
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -195,7 +195,7 @@ DELETE Fault Management Individual Alarm
PUT Fault Management Individual Alarm
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -204,7 +204,7 @@ GET Fault Management Individual Alarm
Log
Query VNF The GET method queries information about an alarm.
Set Headers
{"Accept":"
${ACCEPT}
"}
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
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${etag}
Output
response headers ETag
...
...
@@ -216,7 +216,7 @@ GET Fault Management Individual Alarm with invalid id
Log
Query NFVO The GET method queries information about an invalid alarm. Should return does not exist
Set Headers
{"Accept":"
${ACCEPT}
"}
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
}
"}
Log
Execute Query
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${invalidAlarmId}
${outputResponse}
=
Output
response
...
...
@@ -226,7 +226,7 @@ PATCH Fault Management Individual Alarm
log
Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_PATCH}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
Authorization
":"
${AUTHORIZATION}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
${body}
=
Get File
jsons/alarmModifications.json
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
...
...
@@ -237,7 +237,7 @@ PATCH Fault Management Individual Alarm - precondition failed
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_PATCH}
"}
Set Headers
{"If-Match": "
${original_etag[0]}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
Authorization
":"
${AUTHORIZATION}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
${body}
=
Get File
jsons/alarmModifications.json
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
...
...
@@ -248,7 +248,7 @@ PATCH Fault Management Individual Alarm Conflict
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_PATCH}
"}
Set Headers
{"If-Match": "
${Etag}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
Authorization
":"
${AUTHORIZATION}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
${body}
=
Get File
jsons/alarmModifications.json
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
...
...
@@ -259,7 +259,7 @@ POST Subscription
Log
Create subscription instance by POST to
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
Set Headers
{"Accept":"
${ACCEPT}
"}
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
}
"}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
...
...
@@ -270,7 +270,7 @@ Send POST Request for duplicated subscription
Pass Execution If
${VNFM_DUPLICATION}
=
= 0
NVFO 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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
...
...
@@ -281,7 +281,7 @@ Send POST Request for duplicated subscription not permitted
Pass Execution If
${VNFM_DUPLICATION}
=
= 1
NVFO 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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
...
...
@@ -290,7 +290,7 @@ Send POST Request for duplicated subscription not permitted
GET Subscriptions
Log
Get the list of active subscriptions
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}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -298,7 +298,7 @@ GET Subscriptions
GET Subscriptions with filter
Log
Get the list of active subscriptions using a filter
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}
/
${apiVersion}
/subscriptions?
${sub_filter}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -306,42 +306,42 @@ GET Subscriptions with filter
GET Subscriptions with Invalid filter
Log
Get the list of active subscriptions using an invalid filter
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}
/
${apiVersion}
/subscriptions?
${sub_filter_invalid}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
Get subscriptions with all_fields attribute selector
Log
Get the list of active subscriptions, using fields
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}
/
${apiVersion}
/subscriptions?exclude_default
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Get subscriptions with exclude_default attribute selector
Log
Get the list of active subscriptions, using fields
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}
/
${apiVersion}
/subscriptions?exclude_default
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Get subscriptions with fields attribute selector
Log
Get the list of active subscriptions, using fields
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}
/
${apiVersion}
/subscriptions?fields=
${fields}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
Get subscriptions with exclude_fields attribute selector
Log
Get the list of active subscriptions, using fields
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}
/
${apiVersion}
/subscriptions?exclude_fields=
${fields}
${output}
=
Output
response
Set Suite Variable
${response}
${output}
PUT Subscriptions
log
Trying to perform a PUT Subscriptions. This method should not be implemented
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}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -349,7 +349,7 @@ PUT Subscriptions
PATCH Subscriptions
log
Trying to perform a PATCH Subscriptions. This method should not be implemented
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}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -357,7 +357,7 @@ PATCH Subscriptions
DELETE Subscriptions
log
Trying to perform a DELETE Subscriptions. This method should not be implemented
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}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -365,7 +365,7 @@ DELETE Subscriptions
POST Individual Subscription
log
Trying to perform a POST. This method should not be implemented
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}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -373,7 +373,7 @@ POST Individual Subscription
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -381,7 +381,7 @@ GET Individual Subscription
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -389,7 +389,7 @@ PUT Individual Subscription
PATCH Individual Subscription
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}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION
_TOKEN
}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -397,7 +397,7 @@ PATCH Individual Subscription
DELETE Individual Subscription
log
Trying to perform a DELETE.
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}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -409,7 +409,7 @@ Check LINK in Header
Get subscriptions with filter "id"
Log
Get the list of active subscriptions using a filter "id"
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}
/
${apiVersion}
/subscriptions?id=
${subscription_id}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -420,7 +420,7 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib
Get subscriptions with filter "filter_notificationTypes"
Log
Get the list of active subscriptions using a filter "filter.notificationTypes"
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}
/
${apiVersion}
/subscriptions?filter.notificationTypes=
${notification_type}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -433,7 +433,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri
Get subscriptions with filter "filter_faultyResourceTypes"
Log
Get the list of active subscriptions using a filter "filter.faultyResourceTypes"
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}
/
${apiVersion}
/subscriptions?filter.faultyResourceTypes=
${faultyResourceType}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -446,7 +446,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri
Get subscriptions with filter "filter_perceivedSeverities"
Log
Get the list of active subscriptions using a filter "filter.perceivedSeverities"
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}
/
${apiVersion}
/subscriptions?filter.perceivedSeverities=
${perceivedSeverity}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -459,7 +459,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri
Get subscriptions with filter "filter_eventTypes"
Log
Get the list of active subscriptions using a filter "filter.eventTypes"
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}
/
${apiVersion}
/subscriptions?filter.eventTypes=
${eventType}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
@@ -472,7 +472,7 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri
Get subscriptions with filter "filter_probableCauses"
Log
Get the list of active subscriptions using a filter "filter.probableCauses"
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}
/
${apiVersion}
/subscriptions?filter.probableCauses=
${probableCause}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
...
...
SOL003/VNFFaultManagement-API/environment/variables.txt
View file @
77054f18
...
...
@@ -2,7 +2,8 @@
${VNFM_HOST} localhost # Hostname of the VNFM
${VNFM_PORT} 8080 # Listening port of the VNFM
${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE} application/json
${ACCEPT} application/json
${ACCEPT_JSON} application/json
...
...
SOL003/VNFIndicator-API/ApiVersion.robot
View file @
77054f18
...
...
@@ -133,70 +133,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
*** Keywords ***
POST API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
GET API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PUT API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PATCH API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
DELETE API Version
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
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
POST API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
GET API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PUT API Version with apiMajorVersion
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}
/v1/api_versions
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
PATCH API Version with apiMajorVersion
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
}
"}