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
d65c7b04
Commit
d65c7b04
authored
Jun 04, 2020
by
Elian Kraja
Browse files
Fix on status code check
parent
0d8da175
Changes
40
Show whitespace changes
Inline
Side-by-side
SOL002/VNFConfiguration-API/ApiVersion.robot
View file @
d65c7b04
...
...
@@ -201,7 +201,7 @@ DELETE API Version with apiMajorVersion
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
[0]['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFConfiguration-API/Configuration.robot
View file @
d65c7b04
...
...
@@ -126,8 +126,7 @@ Send VNF configuration
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
${status}
=
Convert To Integer
${expected_status}
Should Be Equal As Strings
${response['status']}
${status}
Should Be Equal As Strings
${response['status']}
${expected_status}
Log
Status code validated
Check HTTP Response Header Contains
...
...
SOL002/VNFFaultManagement-API/Alarms.robot
View file @
d65c7b04
...
...
@@ -265,28 +265,28 @@ POST Alarms Task
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PUT Alarms Task
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}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH Alarms Task
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}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE Alarms Task
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}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarms Task
Log
Query VNF The GET method queries information about multiple alarms.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -294,7 +294,7 @@ GET Alarms Task
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarms Task with filter
Log
Query VNF The GET method queries information about multiple alarms with filters.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -302,7 +302,7 @@ GET Alarms Task with filter
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${alarm_filter}
=
${managedObjectId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarms Task with invalid filter
Log
Query VNF The GET method queries information about multiple alarms with filters.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -310,7 +310,7 @@ GET Alarms Task with invalid filter
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${invalid_alarm_filter}
=
${managedObjectId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarms Task with all_fields attribute selector
Log
Query VNF The GET method queries information about multiple alarms, using fields
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
...
...
@@ -342,7 +342,7 @@ GET Alarms Task with exclude_fields attribute selector
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Header Contains
...
...
@@ -369,7 +369,7 @@ GET Alarms Task with filter "id"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?id=
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "id"
Should Be Equal As Strings
${response['body']['id']}
${alarmId}
...
...
@@ -381,7 +381,7 @@ GET Alarms Task with filter "vnfcInstanceIds"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?vnfcInstanceIds=
${vnfcInstanceIds}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "vnfcInstanceIds"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -395,7 +395,7 @@ GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?rootCauseFaultyResource.faultyResourceType=
${faultyResourceType}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "rootCauseFaultyResource_faultyResourceType"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -409,7 +409,7 @@ GET Alarms Task with filter "eventType"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?eventType=
${eventType}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "eventType"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -423,7 +423,7 @@ GET Alarms Task with filter "perceivedSeverity"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?perceivedSeverity=
${perceivedSeverity}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -437,7 +437,7 @@ GET Alarms Task with filter "probableCause"
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?probableCause=
${probableCause}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause"
:FOR
${item}
IN
@{response['body']}
...
...
SOL002/VNFFaultManagement-API/ApiVersion.robot
View file @
d65c7b04
...
...
@@ -203,7 +203,7 @@ DELETE API Version with apiMajorVersion
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
[0]['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot
View file @
d65c7b04
...
...
@@ -80,35 +80,35 @@ POST escalate severity
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
/escalate
${PerceivedSeverity}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET escalate severity
log
Trying to perform a GET. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
/escalate
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PUT escalate severity
log
Trying to perform a PUT. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
/escalate
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH escalate severity
log
Trying to perform a PATCH. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
/escalate
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE escalate severity
log
Trying to perform a DELETE. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
/escalate
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFFaultManagement-API/IndividualAlarm.robot
View file @
d65c7b04
...
...
@@ -113,7 +113,7 @@ POST Alarm Task
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PUT Alarm Task
log
Trying to perform a PUT. This method should not be implemented
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -121,7 +121,7 @@ PUT Alarm Task
${body}
=
Get File
jsons/alarmModifications.json
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH Alarm Task
log
Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -131,7 +131,7 @@ PATCH Alarm Task
${body}
=
Get File
jsons/alarmModifications.json
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH Alarm Task with wrong precondition
log
Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -140,14 +140,14 @@ PATCH Alarm Task with wrong precondition
${body}
=
Get File
jsons/alarmModifications.json
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE Alarm Task
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}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms/
${alarmId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarm Task
Log
Query VNF The GET method queries information about individual alarm.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -157,7 +157,7 @@ GET Alarm Task
${etag}
Output
response headers ETag
Set Suite Variable
&{original_etag}
${etag}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarm Task with filter
Log
Query VNF The GET method queries information about individual alarm with filters.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -165,7 +165,7 @@ GET Alarm Task with filter
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${alarm_filter}
=
${managedObjectId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET Alarm Task with invalid filter
Log
Query VNF The GET method queries information about individual alarm with filters.
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -173,10 +173,10 @@ GET Alarm Task with invalid filter
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/alarms?
${invalid_alarm_filter}
=
${managedObjectId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFFaultManagement-API/IndividualSubscription.robot
View file @
d65c7b04
...
...
@@ -83,35 +83,35 @@ Post Create individual subscription
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
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}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Get individual subscription - filter
Log
Get the list of active individual subscription using a filter
Set Headers
{"Accept": "
${ACCEPT}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?
${sub_filter}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Get individual subscription - invalid filter
Log
Get the list of active individual subscription using an invalid filter
Set Headers
{"Accept": "
${ACCEPT}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?
${sub_filter_invalid}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
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}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH individual subscription
log
Trying to perform a PATCH. This method should not be implemented
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -119,18 +119,18 @@ PATCH individual subscription
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE individual subscription
log
Try to delete an individual subscription
Set Headers
{"Accept":"
${ACCEPT}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions/
${subscriptionId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFFaultManagement-API/Subscriptions.robot
View file @
d65c7b04
...
...
@@ -294,7 +294,7 @@ Post Create subscription
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Post Create subscription - DUPLICATION
Log
Trying to create a subscription with an already created content
Pass Execution If
${VNFM_ALLOWS_DUPLICATE_SUBS}
=
= 0
NVFO is not permitting duplication. Skipping the test
...
...
@@ -304,7 +304,7 @@ Post Create subscription - DUPLICATION
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Post Create subscription - NO-DUPLICATION
Log
Trying to create a subscription with an already created content
Pass Execution If
${VNFM_ALLOWS_DUPLICATE_SUBS}
=
= 1
VNFM permits duplication. Skipping the test
...
...
@@ -314,7 +314,7 @@ Post Create subscription - NO-DUPLICATION
${body}
=
Get File
jsons/fmSubscriptionRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Get subscriptions
Log
Get the list of active subscriptions
Set Headers
{"Accept":"
${ACCEPT}
"}
...
...
@@ -323,21 +323,21 @@ Get subscriptions
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Get subscriptions - 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}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?
${sub_filter}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Get subscriptions - 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}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?
${sub_filter_invalid}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
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}
"}
...
...
@@ -372,25 +372,25 @@ PUT subscriptions
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH subscriptions
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}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE subscriptions
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}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
@@ -410,7 +410,7 @@ Get subscriptions with filter "id"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?id=
${subscription_id}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscription Matches the requested attribute-based filter "id"
Should Be Equal As Strings
${response['body']['id']}
${subscription_id}
...
...
@@ -421,7 +421,7 @@ Get subscriptions with filter "filter_notificationTypes"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?filter.notificationTypes=
${notification_type}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_notificationTypes"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -434,7 +434,7 @@ Get subscriptions with filter "filter_faultyResourceTypes"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?filter.faultyResourceTypes=
${faultyResourceType}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_faultyResourceTypes"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -447,7 +447,7 @@ Get subscriptions with filter "filter_perceivedSeverities"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?filter.perceivedSeverities=
${perceivedSeverity}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_perceivedSeverities"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -460,7 +460,7 @@ Get subscriptions with filter "filter_eventTypes"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?filter.eventTypes=
${eventType}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_eventTypes"
:FOR
${item}
IN
@{response['body']}
...
...
@@ -473,7 +473,7 @@ Get subscriptions with filter "filter_probableCauses"
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/subscriptions?filter.probableCauses=
${probableCause}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses"
:FOR
${item}
IN
@{response['body']}
...
...
SOL002/VNFIndicator-API/ApiVersion.robot
View file @
d65c7b04
...
...
@@ -203,7 +203,7 @@ DELETE API Version with apiMajorVersion
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
[0]['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFLifecycleManagement-API/ApiVersion.robot
View file @
d65c7b04
...
...
@@ -201,7 +201,7 @@ DELETE API Version with apiMajorVersion
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
[0]['
status
']
}
${expected_status}
Log
Status code validated
Check HTTP Response Body Json Schema Is
...
...
SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot
View file @
d65c7b04
...
...
@@ -23,7 +23,7 @@ Get Vnf Instance
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal
${response
.
status
_code
}
${expected_status}
Should Be Equal
As Strings
${response
['
status
']
}
${expected_status}
Log
Status code validated
Check Operation Occurrence Id
...
...
@@ -33,7 +33,7 @@ Check Operation Occurrence Id
Check HTTP Response Body Json Schema Is
[
Arguments
]
${input}
${schema}
=
Catenate
${input}
.schema.json
Validate Json
${schema}
${response[
0][
'body']}
Validate Json
${schema}
${response['body']}
Log
Json Schema Validation OK
Check resource Instantiated
...
...
@@ -81,7 +81,7 @@ POST Create a new vnfInstance
${body}
=
Get File
jsons/createVnfRequest.json
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${body}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET multiple vnfInstances
Log
Query VNF The GET method queries information about multiple VNF instances.
...
...
@@ -90,7 +90,7 @@ GET multiple vnfInstances
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET multiple vnfInstances with bad attribute
Log
Query VNF The GET method queries information about multiple VNF instances.
...
...
@@ -99,7 +99,7 @@ GET multiple vnfInstances with bad attribute
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances?attribute_not_exist=some_value
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET multiple vnfInstances with bad filter
Log
Query VNF The GET method queries information about multiple VNF instances.
...
...
@@ -108,7 +108,7 @@ GET multiple vnfInstances with bad filter
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances?fields=wrong_field
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET multiple vnfInstances with all_fields attribute selector
Log
Query status information about multiple VNF instances, using fields
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
...
...
@@ -144,21 +144,21 @@ PUT multiple vnfInstances
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PATCH multiple vnfInstances
Log
Trying to perform a PATCH. This method should not be implemented
Set Headers
{"Accept":"
${ACCEPT}
"}
Patch
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfLcmOpOccId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
DELETE multiple vnfInstances
Log
Trying to perform a DELETE. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Delete
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfLcmOpOccId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
POST individual vnfInstance
log
Trying to perform a POST. This method should not be implemented
...
...
@@ -167,7 +167,7 @@ POST individual vnfInstance
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Post
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfInstanceId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
GET individual vnfInstance
log
Trying to get information about an individual VNF instance
...
...
@@ -176,7 +176,7 @@ GET individual vnfInstance
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfInstanceId}
${outputResponse}
=
Output
response
Set Global Variable
@
{response}
${outputResponse}
Set Global Variable
$
{response}
${outputResponse}
PUT individual vnfInstance
log
Trying to perform a PUT. This method should not be implemented
...
...
@@ -185,7 +185,7 @@ PUT individual vnfInstance
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Put
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_instances/
${vnfInstanceId}