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
a411d463
Commit
a411d463
authored
Feb 18, 2021
by
Elian Kraja
Browse files
Fix issue #155
parent
3702fe41
Changes
19
Hide whitespace changes
Inline
Side-by-side
SOL002/VNFIndicator-API/Subscriptions.robot
View file @
a411d463
...
...
@@ -305,7 +305,7 @@ Check Postcondition VNF Indicator Subscription Is Set
Check
HTTP
Response
Body
Subscriptions
Match
the
requested
Attribute-Based
Filter
Log
Check
Response
includes
VNF
Indicators
according
to
filter
@{words}
=
Split
String
${POS_FILTER}
,
${SEP
E
RATOR}
@{words}
=
Split
String
${POS_FILTER}
${SEP
A
RATOR}
Should
Be
Equal
As
Strings
${response['body'][0]['callbackUri']}
@{words}[1]
Create
Sessions
...
...
@@ -331,7 +331,7 @@ Post Create subscription - DUPLICATION
Set
Headers
{"Content-Type":
"${CONTENT_TYPE_JSON}"}
Run
Keyword
If
${AUTH_USAGE}
==
1
Set
Headers
{"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}=
Get
File
jsons/subscriptions.json
${body}=
Format
String
${
template
}
callback_uri=${callback_uri}:${callback_port}
callback_endpoint=${callback_endpoint}
${body}=
Format
String
${
body
}
callback_uri=${callback_uri}:${callback_port}
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
...
...
@@ -351,7 +351,7 @@ Post Create subscription - NO-DUPLICATION
Set
Headers
{"Content-Type":
"${CONTENT_TYPE_JSON}"}
Run
Keyword
If
${AUTH_USAGE}
==
1
Set
Headers
{"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}=
Get
File
jsons/subscriptions.json
${body}=
Format
String
${
template
}
callback_uri=${callback_uri}:${callback_port}
callback_endpoint=${callback_endpoint}
${body}=
Format
String
${
body
}
callback_uri=${callback_uri}:${callback_port}
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
...
...
SOL002/VNFIndicator-API/VNFIndicators.robot
View file @
a411d463
...
...
@@ -293,9 +293,9 @@ Check HTTP Response Body Json Schema Is
Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
Log
Check Response includes VNF Indicators according to filter
@{attr}
=
Split String
${POS_FILTER}
,
${VAR_SEP
E
RATOR}
@{var_name}
=
Split String
@{attr}
[0]
,
${SEP
E
RATOR}
@{var_id}
=
Split String
@{attr}
[1]
,
${SEP
E
RATOR}
@{attr}
=
Split String
${POS_FILTER}
${VAR_SEP
A
RATOR}
@{var_name}
=
Split String
@{attr}
[0]
${SEP
A
RATOR}
@{var_id}
=
Split String
@{attr}
[1]
${SEP
A
RATOR}
Should Be True
"
${response['body'][0]['name']}
"=="
@{var_name}
[1]" and "
${response['body'][0]['vnfInstanceId']}
"=="
@{var_id}
[1]"
Check HTTP Response Header Contain Link
...
...
SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot
View file @
a411d463
...
...
@@ -225,7 +225,7 @@ Check HTTP Response Body Includes Requested VNF Instance ID
Check HTTP Response Body Matches Attribute-Based Filter
Log
Check Response includes VNF Indicators according to filter
@{words}
=
Split String
${POS_FIELDS}
,
${SEP
E
RATOR}
@{words}
=
Split String
${POS_FIELDS}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['name']}
@{words}
[1]
Check HTTP Response Header Contain Link
...
...
SOL002/VNFIndicator-API/environment/variables.txt
View file @
a411d463
...
...
@@ -41,7 +41,7 @@ ${POS_FILTER} callbackUri=http://127.0.0.1/subscribe
${NEG_FILTER} callback=http://127.0.0.1/subscribe
${total_polling_time} 2 min
${polling_interval} 10 sec
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${erroneousVnfInstanceId} erroneousVnfInstanceId
${POS_FIELDS} name=vnfIndicator
...
...
@@ -49,6 +49,6 @@ ${NEG_FIELDS} wrongName=any_value
${vnfIndicators} =
${VAR_SEP
E
RATOR} &
${VAR_SEP
A
RATOR} &
${callbackResp} localhost
\ No newline at end of file
SOL002/VNFPerformanceManagement-API/PMJobs.robot
View file @
a411d463
...
...
@@ -365,7 +365,7 @@ Check HTTP Response Body Matches all_fields selector
Check HTTP Response Body Matches filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${POS_FILTER}
,
${SEP
E
RATOR}
@{words}
=
Split String
${POS_FILTER}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['objectInstanceIds']}
@{words}
[1]
Check HTTP Response Status Code Is
...
...
SOL002/VNFPerformanceManagement-API/Thresholds.robot
View file @
a411d463
...
...
@@ -218,7 +218,7 @@ Check Postcondition Threshold Exists
Check HTTP Response Body Thresholds match the requested attribute-based filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${FILTER_OK}
,
${SEP
E
RATOR}
@{words}
=
Split String
${FILTER_OK}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['objectInstanceId']}
@{words}
[1]
Check HTTP Response Status Code Is
...
...
SOL002/VNFPerformanceManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -44,7 +44,7 @@ ${newThresholdId} newThresholdId
${POS_FILTER} objectInstanceIds=${objectInstanceIds}
${NEG_FILTER} criteriaPmJob=erroneousAttributeName
${fields} criteria,reports
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568
${erroneousReportId} erroneousReportId
...
...
SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot
View file @
a411d463
...
...
@@ -325,9 +325,9 @@ Check Postcondition VNF Indicators Exist
Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
Log
Check Response includes VNF Indicators according to filter
@{attr}
=
Split String
${POS_FIELDS}
,
${VAR_SEP
E
RATOR}
@{var_name}
=
Split String
@{attr}
[0]
,
${SEP
E
RATOR}
@{var_id}
=
Split String
@{attr}
[1]
,
${SEP
E
RATOR}
@{attr}
=
Split String
${POS_FIELDS}
${VAR_SEP
A
RATOR}
@{var_name}
=
Split String
@{attr}
[0]
${SEP
A
RATOR}
@{var_id}
=
Split String
@{attr}
[1]
${SEP
A
RATOR}
Should Be True
"
${response['body'][0]['name']}
"=="
@{var_name}
[1]" and "
${response['body'][0]['vnfInstanceId']}
"=="
@{var_id}
[1]"
Get all indicators for a VNF instance
...
...
SOL003/VNFIndicator-API/environment/variables.txt
View file @
a411d463
...
...
@@ -57,7 +57,7 @@ ${POS_FIELDS} name=vnfIndicator
${NEG_FIELDS} wrongName=any_value
${SEP
E
RATOR} =
${VAR_SEP
E
RATOR} &
${SEP
A
RATOR} =
${VAR_SEP
A
RATOR} &
${callbackResp} localhost
\ No newline at end of file
SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
View file @
a411d463
...
...
@@ -49,9 +49,9 @@ GET VNF Packages with attribute-based filter
Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter
Log
Checking that attribute-based filter is matched
@{attr}
=
Split String
${POS_FILTER}
,
${VAR_SEP
E
RATOR}
@{var_id}
=
Split String
@{attr}
[0]
,
${SEP
E
RATOR}
@{var_provider}
=
Split String
@{attr}
[1]
,
${SEP
E
RATOR}
@{attr}
=
Split String
${POS_FILTER}
${VAR_SEP
A
RATOR}
@{var_id}
=
Split String
@{attr}
[0]
${SEP
A
RATOR}
@{var_provider}
=
Split String
@{attr}
[1]
${SEP
A
RATOR}
Should Be True
"
${response['body'][0]['vnfdId']}
"=="
@{var_id}
[1]" and "
${response['body'][0]['vnfProvider']}
"=="
@{var_provider}
[1]"
GET VNF Packages with invalid attribute-based filter
...
...
@@ -643,7 +643,7 @@ Check HTTP Response Body Is Empty
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log
Check Response includes VNF Package Management according to filter
@{words}
=
Split String
${filter_ok}
,
${SEP
E
RATOR}
@{words}
=
Split String
${filter_ok}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['callbackUri']}
@{words}
[1]
Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription
...
...
SOL003/VNFPackageManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -57,7 +57,7 @@ ${erroneousVnfdId} erroneousVnfdId
${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions
${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${ACCEPT_PLAIN} text/plain
...
...
@@ -84,7 +84,7 @@ ${vndEncryptedArtifactID} encryptedId
${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW # Positive case, suing compiant fields name for filtering get request
${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field
${fields} softwareImages,additionalArtifacts
${VAR_SEP
E
RATOR} &
${VAR_SEP
A
RATOR} &
${callbackResp} localhost
...
...
SOL003/VNFPerformanceManagement-API/PMJobs.robot
View file @
a411d463
...
...
@@ -374,7 +374,7 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector
Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${POS_FILTER}
,
${SEP
E
RATOR}
@{words}
=
Split String
${POS_FILTER}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['objectInstanceIds']}
@{words}
[1]
Check HTTP Response Body Does Not Contain reports
...
...
SOL003/VNFPerformanceManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -56,7 +56,7 @@ ${notification_response} []
${POS_FILTER} objectInstanceIds=${objectInstanceIds}
${NEG_FILTER} criteriaPmJob=erroneousAttributeName
${fields} criteria,objectInstanceIds
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568
...
...
SOL005/NSDManagement-API/NSDManagementKeywords.robot
View file @
a411d463
...
...
@@ -32,7 +32,7 @@ GET Network Service Descriptors Information with attribute-based filter
Check HTTP Response Body NsdInfos Matches the requested attribute-based filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${NSD_NAME}
,
${SEP
E
RATOR}
@{words}
=
Split String
${NSD_NAME}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['nsdName']}
@{words}
[1]
GET Network Service Descriptors Information with invalid attribute-based filter
...
...
@@ -453,7 +453,7 @@ GET PNF Descriptors Information with attribute-based filter
Check HTTP Response Body PnfdInfos Matches the requested attribute-based filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${PNFD_NAME}
,
${SEP
E
RATOR}
@{words}
=
Split String
${PNFD_NAME}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['pnfdName']}
@{words}
[1]
GET PNF Descriptors Information with invalid attribute-based filter
...
...
@@ -878,7 +878,7 @@ Check HTTP Response Body Is Empty
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log
Check Response includes NSD Management Management according to filter
@{words}
=
Split String
${filter_ok}
,
${SEP
E
RATOR}
@{words}
=
Split String
${filter_ok}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['callbackUri']}
@{words}
[1]
Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription
...
...
SOL005/NSDManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -76,7 +76,7 @@ ${length} 1024
${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f
${NSD_NAME} nsdName=onBoardedNSD
${PNFD_NAME} pnfdName=onBoardedPNFD
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${pnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348
...
...
SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot
View file @
a411d463
...
...
@@ -402,7 +402,7 @@ Check Postcondition Threshold Exists
Check HTTP Response Body Thresholds match the requested attribute-based filter
Log
Checking that attribute-based filter is matched
@{words}
=
Split String
${FILTER_OK_Threshold}
,
${SEP
E
RATOR}
@{words}
=
Split String
${FILTER_OK_Threshold}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['objectInstanceId']}
@{words}
[1]
...
...
SOL005/NSPerformanceManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -63,6 +63,6 @@ ${newReportId} newReportId
${FILTER_OK_Threshold} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a
${FILTER_KO} criterias=erroneousFilter
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${callbackResp} 127.0.0.1
\ No newline at end of file
SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
View file @
a411d463
...
...
@@ -56,9 +56,9 @@ GET VNF Packages with attribute-based filter
Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter
Log
Checking that attribute-based filter is matched
@{attr}
=
Split String
${POS_FILTER}
,
${VAR_SEP
E
RATOR}
@{var_id}
=
Split String
@{attr}
[0]
,
${SEP
E
RATOR}
@{var_provider}
=
Split String
@{attr}
[1]
,
${SEP
E
RATOR}
@{attr}
=
Split String
${POS_FILTER}
${VAR_SEP
A
RATOR}
@{var_id}
=
Split String
@{attr}
[0]
${SEP
A
RATOR}
@{var_provider}
=
Split String
@{attr}
[1]
${SEP
A
RATOR}
Should Be True
"
${response['body'][0]['vnfdId']}
"=="
@{var_id}
[1]" and "
${response['body'][0]['vnfProvider']}
"=="
@{var_provider}
[1]"
GET VNF Packages with invalid attribute-based filter
...
...
@@ -926,7 +926,7 @@ Check HTTP Response Body Json Schema Is
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
Log
Check Response includes VNF Package Management according to filter
@{words}
=
Split String
${filter_ok}
,
${SEP
E
RATOR}
@{words}
=
Split String
${filter_ok}
${SEP
A
RATOR}
Should Be Equal As Strings
${response['body'][0]['callbackUri']}
@{words}
[1]
Check HTTP Response Body Subscription Identifier matches the requested Subscription
...
...
SOL005/VNFPackageManagement-API/environment/variables.txt
View file @
a411d463
...
...
@@ -43,7 +43,7 @@ ${origResponse} httpresponse
${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions
${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based
${SEP
E
RATOR} =
${SEP
A
RATOR} =
${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database
${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868
...
...
@@ -79,7 +79,7 @@ ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case,
${CAN_FILTER} 1 # NFVO in able to use filters when retrieving VNF Packages
${fields} softwareImages,additionalArtifacts
${BAD_AUTHORIZATION_TOKEN} Bear sometoken
${VAR_SEP
E
RATOR} &
${VAR_SEP
A
RATOR} &
${vnfPkgViaUriId} 788106a2-d692-44f3-a86d-384f0ce35e42
${creatingVnfPkgViaUriId} d246ccdd-71aa-402f-b256-6a80ee54be3d
...
...
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