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
08134a3f
Commit
08134a3f
authored
Feb 26, 2019
by
Elian Kraja
Browse files
Bug fix on SOL005
parent
329c05ad
Changes
31
Hide whitespace changes
Inline
Side-by-side
SOL005/NSDManagement-API/IndividualNSDescriptor.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines all the resources and methods provided by the Individual NS descriptor interface. \
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/nsDescriptors.txt
# Specific nsDescriptors Parameters
Library
OperatingSystem
Library
JSONLibrary
...
...
@@ -24,8 +24,7 @@ GET Single Network Service Descriptor
Log
Validation of Content-Type : OK
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfo.schema.json
${json}
Validate Json
NsdInfo.schema.json
${result}
Log
Validation OK
...
...
@@ -40,8 +39,7 @@ GET Single Network Service Descriptor (Negative: Not found)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -62,28 +60,26 @@ PATCH Single Network Service Descriptor - (Disabling a nsdInfo)
Log
Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${body}
=
Get File
json/NsdInfoModificationDisable.json
${body}
=
Get File
json
s
/NsdInfoModificationDisable.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${nsdInfoId}
${body}
Integer
response status
200
Log
Received 200 OK as expected
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfoModification.schema.json
${json}
Validate Json
NsdInfoModification.schema.json
${result}
Log
Validation of NsdInfoModifications OK
PATCH Single Network Service Descriptor - (Enabling an previously disabled nsdInfo)
Log
Trying to perform a PATCH. As prerequisite the nsdInfo shall be in disabled operational state
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${body}
=
Get File
json/NsdInfoModificationEnable.json
${body}
=
Get File
json
s
/NsdInfoModificationEnable.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${nsdInfoId}
${body}
Integer
response status
200
Log
Received 200 OK as expected
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfoModification.schema.json
${json}
Validate Json
NsdInfoModification.schema.json
${result}
Log
Validation of NsdInfoModifications OK
...
...
@@ -91,7 +87,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous
Log
Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${body}
=
Get File
json/NsdInfoModificationEnable.json
${body}
=
Get File
json
s
/NsdInfoModificationEnable.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${enabledNsdInfoId}
${body}
Integer
response status
409
...
...
@@ -100,8 +96,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -110,7 +105,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
Set Headers
{"If-Match": "
${Etag}
"}
${body}
=
Get File
json/NsdInfoModificationEnable.json
${body}
=
Get File
json
s
/NsdInfoModificationEnable.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${modifiedNsdInfoId}
${body}
Integer
response status
412
...
...
@@ -122,8 +117,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -155,12 +149,12 @@ DELETE Single Network Service Descriptor (Negative: Trying to delete an enabled
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
POST Single Network Service Descriptor (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a POST. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
...
...
@@ -172,6 +166,7 @@ POST Single Network Service Descriptor (Method not implemented)
PUT Single Network Service Descriptor (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
SOL005/NSDManagement-API/IndividualPnfDescriptor.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines all the resources and methods provided by the Iindividual PNF descriptor interface. \
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/pnfDescriptors.txt
# Specific nsDescriptors Parameters
Library
JSONLibrary
Library
REST
${NFVO_SCHEMA}
://
${NFVO_HOST}
:
${NFVO_PORT}
...
...
@@ -22,8 +22,7 @@ GET Single PNF Descriptor
Log
Validation of Content-Type : OK
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfo.schema.json
${json}
Validate Json
NsdInfo.schema.json
${result}
Log
Validation OK
...
...
@@ -38,8 +37,7 @@ GET Single PNF Descriptor (Negative: Not found)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -50,14 +48,13 @@ PATCH Single PNF Descriptor - (Disabling a nsdInfo)
Log
The PATCH method modifies the user defined data of an individual PNF descriptor resource.
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${body}
=
Get File
json/PnfdInfoModification.json
${body}
=
Get File
json
s
/PnfdInfoModification.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
PATCH
${apiRoot}
/
${apiName}
/
${apiVersion}
/pnf_descriptors/
${pnfdInfoId}
${body}
Integer
response status
200
Log
Received 200 OK as expected
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
PnfdInfoModification.schema.json
${json}
Validate Json
PnfdInfoModification.schema.json
${result}
Log
Validation of PnfdInfoModification OK
...
...
@@ -71,6 +68,7 @@ DELETE Single PNF Descriptor
POST Single PNF Descriptor (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a POST. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
...
...
@@ -82,6 +80,7 @@ POST Single PNF Descriptor (Method not implemented)
PUT Single PNF Descriptor (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
SOL005/NSDManagement-API/IndividualSubscription.robot
View file @
08134a3f
*** Settings ***
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/individualSubscription.txt
Library
OperatingSystem
Library
JSONLibrary
...
...
@@ -17,8 +17,7 @@ GET Individual Subscription
${contentType}
=
Output
response headers Content-Type
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdmSubscription.schema.json
${json}
Validate Json
NsdmSubscription.schema.json
${result}
Log
Validated NsdmSubscription schema
GET Subscription - Negative (Not Found)
...
...
@@ -32,8 +31,7 @@ GET Subscription - Negative (Not Found)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
DELETE Subscription
...
...
@@ -62,11 +60,11 @@ DELETE Subscription - Negative (Not Found)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
PUT Subscription - (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
@@ -75,6 +73,7 @@ PUT Subscription - (Method not implemented)
Log
Received 405 Method not implemented as expected
PATCH Subscription - (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PATCH. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
@@ -83,6 +82,7 @@ PATCH Subscription - (Method not implemented)
Log
Received 405 Method not implemented as expected
POST Subscription - (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a POST. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
SOL005/NSDManagement-API/NSDContent.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines the content of the individual NS descriptor, i.e. NSD content
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/nsDescriptors.txt
# Specific nsDescriptors Parameters
Library
JSONLibrary
Library
REST
${NFVO_SCHEMA}
://
${NFVO_HOST}
:
${NFVO_PORT}
...
...
@@ -78,8 +78,7 @@ GET NSD Content - Negative Range
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -96,8 +95,7 @@ GET NSD Content- Negative (Not Found)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -112,8 +110,7 @@ GET NSD Content - Negative (onboardingState issue)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -189,13 +186,13 @@ PUT a NSD Content - Negative. Nsd in CREATING state
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
POST a NSD Content (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
POST
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${nsdInfoId}
/nsd_content
...
...
@@ -205,6 +202,7 @@ POST a NSD Content (Method not implemented)
PATCH a NSD Content (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
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}
/ns_descriptors/
${nsdInfoId}
/nsd_content
...
...
@@ -212,6 +210,7 @@ PATCH a NSD Content (Method not implemented)
Log
Received 405 Method not implemented as expected
DELETE a NSD Content (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
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}
/ns_descriptors/
${nsdInfoId}
/nsd_content
...
...
SOL005/NSDManagement-API/NSDManagementNotification.robot
View file @
08134a3f
*** Setting ***
Resource
environment/variables.txt
Resource
environment/generic.txt
Suite Setup
Create Sessions
Suite Teardown
Terminate All Processes
kill=true
Library
MockServerLibrary
...
...
@@ -130,6 +129,7 @@ Post Notification Negative 404
PUT VNF Package Management Notification
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
PUT Method not implemented
&{req}
=
Create Mock Request Matcher
PUT
${callback_endpoint}
&{rsp}
=
Create Mock Response
status_code=405
...
...
@@ -142,6 +142,7 @@ PUT VNF Package Management Notification
PATCH VNF Package Management Notification
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
PATCH Method not implemented
&{req}
=
Create Mock Request Matcher
PATCH
${callback_endpoint}
&{rsp}
=
Create Mock Response
status_code=405
...
...
@@ -154,6 +155,7 @@ PATCH VNF Package Management Notification
DELETE VNF Package Management Notification
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
PATCH Method not implemented
&{req}
=
Create Mock Request Matcher
DELETE
${callback_endpoint}
&{rsp}
=
Create Mock Response
status_code=405
...
...
SOL005/NSDManagement-API/NSDescriptors.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines all the resources and methods provided by the NS descriptors interface. \
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/nsDescriptors.txt
# Specific nsDescriptors Parameters
Library
JSONLibrary
Library
REST
${NFVO_SCHEMA}
://
${NFVO_HOST}
:
${NFVO_PORT}
...
...
@@ -22,8 +22,7 @@ GET all Network Service Descriptors
Log
Validation of Content-Type : OK
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfos.schema.json
${json}
Validate Json
NsdInfos.schema.json
${result}
Log
Validation OK
GET all Network Service Descriptors - Filter
...
...
@@ -39,8 +38,7 @@ GET all Network Service Descriptors - Filter
Should Contain
${contentType}
application/json
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfos.schema.json
${json}
Validate Json
NsdInfos.schema.json
${result}
Log
Validation OK
GET all Network Service Descriptors - Negative (wronge filter name)
...
...
@@ -54,8 +52,7 @@ GET all Network Service Descriptors - Negative (wronge filter name)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
GET all Network Service Descriptors - Negative (Unauthorized: Wrong Token)
...
...
@@ -70,8 +67,7 @@ GET all Network Service Descriptors - Negative (Unauthorized: Wrong Token)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
GET all Network Service Descriptors - Negative (Unauthorized: No Token)
...
...
@@ -86,8 +82,7 @@ GET all Network Service Descriptors - Negative (Unauthorized: No Token)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
GET all Network Service Descriptors (Negative: Not found)
...
...
@@ -101,8 +96,7 @@ GET all Network Service Descriptors (Negative: Not found)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -119,10 +113,9 @@ GET all Network Service Descriptors - all_fields
Should Contain
${contentType}
application/json
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfos.schema.json
${json}
Validate Json
NsdInfos.schema.json
${result}
Log
NsdInfo schema validated
${links}
=
Get Value From Json
${
json
}
$.._links
${links}
=
Get Value From Json
${
result
}
$.._links
Validate Json
links.schema.json
${links[0]}
Log
Validation for _links schema OK
...
...
@@ -136,11 +129,10 @@ GET all Network Service Descriptors - exclude_default
Should Contain
${contentType}
application/json
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfos.schema.json
${json}
Validate Json
NsdInfos.schema.json
${result}
Log
NsdInfo schema validated
Log
Checking missing information for _links element
${links}
=
Get Value From Json
${
json
}
$.._links
${links}
=
Get Value From Json
${
result
}
$.._links
Should Be Empty
${links}
Log
_links element is missing as excepted
...
...
@@ -156,11 +148,10 @@ GET all Network Service Descriptors - exclude_fields
Should Contain
${contentType}
application/json
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfos.schema.json
${json}
Validate Json
NsdInfos.schema.json
${result}
Log
NsdInfo schema validated
Log
Checking missing information for _links element
${links}
=
Get Value From Json
${
json
}
$.._links
${links}
=
Get Value From Json
${
result
}
$.._links
Should Be Empty
${links}
Log
_links element is missing as excepted
...
...
@@ -169,7 +160,7 @@ POST a new Network Service Descriptors
Log
Creating a new network service descriptor
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"Content-Type": "
${CONTENT_TYPE_JSON}
"}
${body}
=
Get File
json/createNsdInfoRequest.json
${body}
=
Get File
json
s
/createNsdInfoRequest.json
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
POST
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors
${body}
Integer
response status
201
...
...
@@ -178,11 +169,11 @@ POST a new Network Service Descriptors
Should Contain
${headers}
Location
Log
Response has header Location
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
NsdInfo.schema.json
${json}
Validate Json
NsdInfo.schema.json
${result}
Log
Validation of NsdInfo OK
PUT all Network Service Descriptors (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
@@ -191,6 +182,7 @@ PUT all Network Service Descriptors (Method not implemented)
Log
Received 405 Method not implemented as expected
PATCH all Network Service Descriptors (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PATCH. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
@@ -199,6 +191,7 @@ PATCH all Network Service Descriptors (Method not implemented)
Log
Received 405 Method not implemented as expected
DELETE all Network Service Descriptors (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a DELETE. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
SOL005/NSDManagement-API/PNFDContent.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines the content of the individual NS descriptor, i.e. NSD content
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/pnfDescriptors.txt
# Specific nsDescriptors Parameters
Library
JSONLibrary
Library
REST
${NFVO_SCHEMA}
://
${NFVO_HOST}
:
${NFVO_PORT}
...
...
@@ -32,8 +32,7 @@ GET PNFD Content- Negative (Not Found)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -48,8 +47,7 @@ GET PNFD Content - Negative (onboardingState issue)
Should Contain
${contentType}
${CONTENT_TYPE_JSON}
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
...
...
@@ -58,7 +56,7 @@ PUT a PNFD Content
Set Headers
{"Accept": "
${ACCEPT_PLAIN}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
${body}
=
Get Binary File
${contentFile}
PUT
${apiRoot}
/
${apiName}
/
${apiVersion}
/
/
pnf_descriptors/
${pnfdInfoId}
/pnfd_content
${body}
PUT
${apiRoot}
/
${apiName}
/
${apiVersion}
/pnf_descriptors/
${pnfdInfoId}
/pnfd_content
${body}
Integer
response status
204
Log
Received 204 No Content as expected
${response}
=
Output
response body
...
...
@@ -80,13 +78,13 @@ PUT a PNFD Content - Negative. Nsd in CREATING state
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
POST a PNFD Content (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PUT. This method should not be implemented
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
POST
${apiRoot}
/
${apiName}
/
${apiVersion}
/pnf_descriptors/
${pnfdInfoId}
/pnfd_content
...
...
@@ -96,6 +94,7 @@ POST a PNFD Content (Method not implemented)
PATCH a NSDContent (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a PATCH. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
@@ -104,6 +103,7 @@ PATCH a NSDContent (Method not implemented)
Log
Received 405 Method not implemented as expected
DELETE a NSDContent (Method not implemented)
Pass Execution If
${testOptionalMethods}
=
= 0
optional methods are not implemented on the FUT. Skipping test.
Log
Trying to perform a DELETE. This method should not be implemented
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"Authorization": "
${AUTHORIZATION}
"}
...
...
SOL005/NSDManagement-API/PNFDescriptors.robot
View file @
08134a3f
*** Settings ***
Documentation
This clause defines all the resources and methods provided by the PNF descriptors interface. \
Library
JSONSchemaLibrary
schemas/
Resource
environment/
generic
.txt
# Generic Parameters
Resource
environment/
variables
.txt
# Generic Parameters
Resource
environment/pnfDescriptors.txt
# Specific nsDescriptors Parameters
Library
JSONLibrary
Library
REST
${NFVO_SCHEMA}
://
${NFVO_HOST}
:
${NFVO_PORT}
...
...
@@ -22,8 +22,7 @@ GET all PNF Descriptors
Log
Validation of Content-Type : OK
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
PnfdInfos.schema.json
${json}
Validate Json
PnfdInfos.schema.json
${result}
Log
Validation OK
GET all PNF Descriptors - Filter
...
...
@@ -39,8 +38,7 @@ GET all PNF Descriptors - Filter
Should Contain
${contentType}
application/json
Log
Trying to validate response
${result}
=
Output
response body
${json}
=
evaluate
json.loads('''
${result}
''')
json
Validate Json
PnfdInfos.schema.json
${json}
Validate Json
PnfdInfos.schema.json
${result}
Log
Validation OK
GET all PNF Descriptors - Negative (wronge filter name)
...
...
@@ -54,8 +52,7 @@ GET all PNF Descriptors - Negative (wronge filter name)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
GET all PNF Descriptors - Negative (Unauthorized: Wrong Token)
...
...
@@ -70,8 +67,7 @@ GET all PNF Descriptors - Negative (Unauthorized: Wrong Token)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json
Validate Json
ProblemDetails.schema.json
${json}
Validate Json
ProblemDetails.schema.json
${problemDetails}
Log
Validation OK
GET all PNF Descriptors - Negative (Unauthorized: No Token)
...
...
@@ -86,8 +82,7 @@ GET all PNF Descriptors - Negative (Unauthorized: No Token)
Should Contain
${contentType}
application/json
Log
Trying to validate ProblemDetails
${problemDetails}
=
Output
response body
${json}
=
evaluate
json.loads('''
${problemDetails}
''')
json