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
b470052f
Commit
b470052f
authored
Oct 08, 2021
by
Giacomo Bernini
Browse files
fixed callbackuri replace string - SOL003 - issue#195
parent
818e5d3d
Changes
12
Hide whitespace changes
Inline
Side-by-side
SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot
View file @
b470052f
...
...
@@ -242,8 +242,10 @@ POST Subscription
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
&{notification_response}
=
Create Mock Response
status_code=204
...
...
@@ -260,8 +262,10 @@ POST Subscription Duplication permitted
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
&{notification_response}
=
Create Mock Response
status_code=204
...
...
@@ -278,8 +282,10 @@ POST Subscription Duplication not permitted
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/fmSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
&{notification_response}
=
Create Mock Response
status_code=204
...
...
SOL003/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json
View file @
b470052f
{
"filter"
:
{
"vnfInstanceSubscriptionFilter"
:
{
"vnfdIds"
:
[
"6fc3539c-e602-4afa-8e13-962fb5a7d81f"
]
}
},
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
}
\ No newline at end of file
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
\ No newline at end of file
SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot
View file @
b470052f
...
...
@@ -103,8 +103,10 @@ Send Post Request for VNF Indicator Subscription
Log
Trying to create a new subscription
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -122,8 +124,10 @@ Send Post Request for Duplicated VNF indicator Subscription
Log
Trying to create a subscription with an already created content
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL003/VNFIndicator-API/jsons/subscriptions.json
View file @
b470052f
{
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
}
\ No newline at end of file
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
\ No newline at end of file
SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot
View file @
b470052f
...
...
@@ -1002,8 +1002,10 @@ Post Create subscription
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -1021,8 +1023,10 @@ Post Create subscription - DUPLICATION
Set Headers
{"Accept": "
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -1040,8 +1044,10 @@ Post Create subscription - NO-DUPLICATION
Set Headers
{"Accept": "
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/lccnSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json
View file @
b470052f
{
"filter"
:
{
"vnfInstanceSubscriptionFilter"
:
{
"vnfdIds"
:
[
"6fc3539c-e602-4afa-8e13-962fb5a7d81f"
]
}
},
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
}
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
View file @
b470052f
...
...
@@ -377,8 +377,10 @@ Send Post Request for VNF Package Subscription
Log
Trying to create a new subscription
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -396,8 +398,10 @@ Send Post Request for Duplicated VNF Package Subscription
Log
Trying to create a subscription with an already created content
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL003/VNFPackageManagement-API/jsons/subscriptions.json
View file @
b470052f
{
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
}
\ No newline at end of file
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
\ No newline at end of file
SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot
View file @
b470052f
...
...
@@ -105,8 +105,10 @@ Send Post Request for VNF Performance Subscription
Set headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Set headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -132,8 +134,10 @@ Send Post Request for Duplicated VNF Performance Subscription
Set headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Set headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/subscriptions.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/subscriptions.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL003/VNFPerformanceManagement-API/jsons/subscriptions.json
View file @
b470052f
{
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
,
"filter"
:
{
"notificationTypes"
:
[
"ThresholdCrossedNotification"
]
}
}
\ No newline at end of file
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
\ No newline at end of file
SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot
View file @
b470052f
...
...
@@ -98,8 +98,10 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Accept":"
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -117,8 +119,10 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Accept": "
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
@@ -136,8 +140,10 @@ Send Post request for new Virtualised Resources Quota Available Notification sub
Set Headers
{"Accept": "
${ACCEPT}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
${template}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Format String
${template}
callback_uri=
${callback_uri}
:
${callback_port}
callback_endpoint=
${callback_endpoint}
${body}
=
Get File
jsons/vrQuotaAvailSubscriptionRequest.json
${body}
=
Replace String
${body}
\
${callback_uri}
${callback_uri}
${body}
=
Replace String
${body}
\
${callback_port}
${callback_port}
${body}
=
Replace String
${body}
\
${callback_endpoint}
${callback_endpoint}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
Log
Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}
=
Create Mock Request Matcher
GET
${callback_endpoint}
...
...
SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json
View file @
b470052f
{
"callbackUri"
:
"{callback_uri}{callback_endpoint}"
}
\ No newline at end of file
{
"callbackUri"
:
"${callback_uri}:${callback_port}${callback_endpoint}"
}
\ No newline at end of file
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