diff --git a/README.md b/README.md index f5ad046d7a1955b7fa7fd650ef3e608ff6a6dd46..ab0d3cdc35e57c075a741a09fe07ba5a0fa532cf 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,33 @@ -# NFV API Tests +# NFV API Conformance Test Specification -This is a development repository for ETSI STF 557. -It includes the NFV API conformance test descriptions. +This repository hosts the NFV API Conformance test specification for the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.04.01_60/gs_NFV-SOL002v020401p.pdf), [SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf), [SOL005](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf), in their versions v2.4.1. -## License +The Test Specification is built as a collection of [Robot Framework](robotframework.org/) Test Description. [Robot Framework](robotframework.org/) is a generic test automation framework for acceptance testing and acceptance test-driven development. + +**IMPORTANT: This repository and the NFV API Conformance Test Specification is Work in Progress. The current version focuses on conformance tests of individual SOL002 and SOL003 resource endpoints. The [Robot Framework](robotframework.org/) Test Descriptions are expected to be consolidated and reviewed in the short term, and possibly re-organized to ease automation of NFV workflows testing. SOL005 Test Descriptions are under development and will be contributed during Q1-2019.** + +More information at [NFV API Conformance Test Specification wiki](https://forge.etsi.org/gitlab/nfv/stf-557/api-tests/wikis/NFV-API-Conformance-Test-Specification). + +## How to raise issues -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. +Change requests can be filed at [ETSI Forge Bugzilla](). Please report errors, bugs or other issues [here](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NFV). + +## How to contribute + +ETSI Forge uses Gitlab to manage submissions to the repository. +For more information on setting up your environment and contributing, you may refer to the [ETSI Forge wiki](https://forge.etsi.org/wiki/index.php/Main_Page). + +## License +Copyright (c) ETSI 2018. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. -Copyright (c) ETSI 2018 +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. diff --git a/SOL002/README.md b/SOL002/README.md index 6bc458b0a3adba662eaef1bb745f8f3a408c1fe5..762121acb900050f04d590df7dd91218b0e6c863 100644 --- a/SOL002/README.md +++ b/SOL002/README.md @@ -1,7 +1,6 @@ # NFV API Tests -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions for NFV SOL002 APIs. +This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs. The reference spec version is v2.4.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.04.01_60/gs_NFV-SOL002v020401p.pdf diff --git a/SOL003/README.md b/SOL003/README.md index d8535969054f70712e788013df1cc2b25c08be16..877c4602945f820f1e833389333dced2edc3b541 100644 --- a/SOL003/README.md +++ b/SOL003/README.md @@ -1,7 +1,6 @@ # NFV API Tests -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions for NFV SOL003 APIs. +This folder includes the NFV API conformance test descriptions for NFV SOL003 APIs. The reference spec version is v2.4.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_nfv-sol003v020401p.pdf diff --git a/SOL003/VNFFaultManagement-API/README.md b/SOL003/VNFFaultManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFFaultManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFFaultManagementNotification-API/README.md b/SOL003/VNFFaultManagementNotification-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFFaultManagementNotification-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFIndicator-API/README.md b/SOL003/VNFIndicator-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFIndicatorNotification-API/README.md b/SOL003/VNFIndicatorNotification-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicatorNotification-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFLifecycleManagement-API/README.md b/SOL003/VNFLifecycleManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFLifecycleManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFLifecycleOperationGranting-API/README.md b/SOL003/VNFLifecycleOperationGranting-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFLifecycleOperationGranting-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFPackageManagement-API/README.md b/SOL003/VNFPackageManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFPackageManagementNotification-API_nxw/README.md b/SOL003/VNFPackageManagementNotification-API_nxw/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagementNotification-API_nxw/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFPerformanceManagement-API/README.md b/SOL003/VNFPerformanceManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VNFPerformanceManagementNotification-API/README.md b/SOL003/VNFPerformanceManagementNotification-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagementNotification-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/README.md b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL005/NSDManagement-API/README.md b/SOL005/NSDManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL005/NSFaultManagement-API/README.md b/SOL005/NSFaultManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL005/NSFaultManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL005/NSLifecycleManagement-API/README.md b/SOL005/NSLifecycleManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL005/NSLifecycleManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL005/NSPerformanceManagement-API/README.md b/SOL005/NSPerformanceManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/SOL005/README.md b/SOL005/README.md index 5925a2468cb40bbc76f8a8a38254297995ebef6f..d22f83fa9dfcfcd443ede4482c42d841cb32ab23 100644 --- a/SOL005/README.md +++ b/SOL005/README.md @@ -1,7 +1,6 @@ # NFV API Tests -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions for NFV SOL005 APIs. +This folder includes the NFV API conformance test descriptions for NFV SOL005 APIs. The reference spec version is v2.4.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf< diff --git a/SOL005/VNFPackageManagement-API/README.md b/SOL005/VNFPackageManagement-API/README.md deleted file mode 100644 index f5f7677f55fcf78e1846a4ff3f61fb4cdef215c3..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NFV API Tests - -This is a development folder for ETSI STF 557. -It includes the NFV API conformance test descriptions. - -## License - -Any software in this repository is released under the ETSI Software License. -Licensing information is available in the attached LICENSE file. - - -Copyright (c) ETSI 2018 diff --git a/extensions/mockserverlibrary.patch b/extensions/mockserverlibrary.patch new file mode 100644 index 0000000000000000000000000000000000000000..117fee00e3e41c88421fb2cbedd114fd8697378d --- /dev/null +++ b/extensions/mockserverlibrary.patch @@ -0,0 +1,75 @@ +diff --git a/src/MockServerLibrary/library.py b/src/MockServerLibrary/library.py +index a9e6227..7208e61 100644 +--- a/src/MockServerLibrary/library.py ++++ b/src/MockServerLibrary/library.py +@@ -68,6 +68,31 @@ class MockServerLibrary(object): + + return req + ++ def create_mock_request_matcher_schema(self, method, path, body_type='JSON_SCHEMA', body=None): ++ """Creates a mock request matcher to be used by mockserver. ++ ++ Returns the request matcher in a dictionary format. ++ ++ `method` is the HTTP method of the mocked endpoint ++ ++ `path` is the url of the mocked endpoint, e.g. /api ++ ++ `body_type` is the type of the request body, e.g. JSON ++ ++ `body` is a dictionary of the json attribute(s) to match ++ ++ `exact` is a boolean value which specifies whether the body should match fully (=true), ++ or if only specified fields should match (=false) ++ """ ++ req = {} ++ req['method'] = method ++ req['path'] = path ++ ++ req['body'] = {'type': body_type, 'jsonSchema': json.dumps(body)} ++ ++ return req ++ ++ + def create_mock_response(self, status_code, headers=None, body_type='JSON', body=None): + """Creates a mock response to be used by mockserver. + +@@ -97,6 +122,37 @@ class MockServerLibrary(object): + + return rsp + ++ ++ def create_mock_response_schema(self, status_code, headers=None, body_type='JSON_SCHEMA', body=None): ++ """Creates a mock response to be used by mockserver. ++ ++ Returns the response in a dictionary format. ++ ++ `status_code` is the HTTP status code of the response ++ ++ `headers` is a dictionary of headers to be added to the response ++ ++ `body_type` is the type of the response body, e.g. JSON ++ ++ `body` is a dictonary of JSON attribute(s) to be added to the response body ++ """ ++ rsp = {} ++ rsp['statusCode'] = int(status_code) ++ ++ if headers: ++ rsp['headers'] = [] ++ ++ for key, value in headers.items(): ++ header = {'name': key, 'values': value.split(",")} ++ rsp['headers'].append(header) ++ logger.debug("Add header - header: {}".format(header)) ++ ++ if body_type is 'JSON_SCHEMA' and body: ++ rsp['body'] = json.dumps(body) ++ ++ return rsp ++ ++ + def create_mock_expectation(self, request, response, count=1, unlimited=True): + """Creates a mock expectation to be used by mockserver. + +