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
62bd77e7
Commit
62bd77e7
authored
Nov 06, 2020
by
Najam UI Hassan
Browse files
files added
parent
81c1a51f
Changes
2
Hide whitespace changes
Inline
Side-by-side
SOL003/VNFIndicator-API/NotificationConsumer.robot
0 → 100644
View file @
62bd77e7
*** Settings ***
Library
String
Library
JSONSchemaLibrary
schemas/
Resource
environment/variables.txt
Library
OperatingSystem
Library
REST
${VNFM_SCHEMA}
://
${VNFM_HOST}
:
${VNFM_PORT}
ssl_verify=false
Suite Setup
Check resource existence and get CallbackUri
*** Test Cases ***
VNF Indicator Value Change Notification
[
Documentation
]
Test ID: 7.3.6.7.1
...
Test title: 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.
...
Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
...
Config ID: Config_prod_VNFM
...
Applicability: none
...
Post-Conditions: none
Post VNF Indicator Value Change Notification
Check HTTP Response Status Code Is
204
*** Keywords ***
Check resource existence and get CallbackUri
Set Headers
{"Accept":"
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
Get
${apiRoot}
/
${apiName}
/
${apiMajorVersion}
/subscriptions/
${subscriptionId}
Integer
response status
200
Validate Json
response body
VnfIndicatorSubscription.schema.json
Set Global Variable
${callbackResp}
response body callbackUri
Check HTTP Response Status Code Is
[
Arguments
]
${expected_status}
Should Be Equal As Strings
${response['status']}
${expected_status}
Log
Status code validated
Post VNF Indicator Value Change Notification
log
Trying to perform a POST to get notification
Set Headers
{"Accept":"
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization":"
${AUTHORIZATION}
"}
${template}
=
Get File
jsons/VnfIndicatorValueChangeNotification.json
${body}
=
Format String
${template}
subscriptionId=
${subscriptionId}
indicatorId=indicatorId
vnfInstanceId=
${vnfInstanceId}
Post
${callbackResp}
${body}
${outputResponse}
=
Output
response
Set Global Variable
${response}
${outputResponse}
SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json
0 → 100644
View file @
62bd77e7
{{
"id"
:
""
,
"notificationType"
:
"VnfIndicatorValueChangeNotification"
,
"subscriptionId"
:
"{subscriptionId}"
,
"timeStamp"
:
""
,
"vnfIndicatorId"
:
"{indicatorId} "
,
"value"
:
""
,
"vnfInstanceId"
:
"{vnfInstanceId}"
,
"_links"
:{{
"vnfInstance"
:
""
,
"subscription"
:
""
}}
}}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment