This page covers the groovy tests to test Coverage Area-Tracking Area & TA-Cell mapping model and data. It also cover the queries that the CPS team will need to implement.
- CPS-199Getting issue details... STATUS
Models and data
There was an issue with the original json data provided. We corrected this issue by modifying the root element and the E2E Network Slicing team was notified. The corrected model and data was later received and all cps-test cases passes.
cps-cavsta-onap-internal2021-01-28.yang
Queries used for the RAN inventory model
API Path | Description of Operation |
---|---|
POST/ran-coverage-area | Add a new coverage area for an operator
|
GET /ran-coverage-area/pLMNIdList/{mcc}/{mnc}/coverage-area/{coverageArea} | Find list of tracking are for the coverage area list coverage-area{ uses coverageAreaGroup; key "coverageArea"; description "This list contains the list of coverage area of a PLMNID"; } grouping coverageAreaGroup{ leaf coverageArea{ description "An attribute specifies the coverage area of the network slice, i.e. the geographic region where a 3GPP communication service is accessible, see Table 7.1-1 of TS 22.261 [28]) and NG.116 [50]."; type string; } list coverageAreaTAList{ uses trackingAreaGroup; key "nRTAC"; description "This list contains the tracking area list for the coverageArea"; } }
|
/ran-coverage-area/pLMNIdList/{mcc}/{mnc}/coverage-area/{coverageArea}/coverageAreaTAList/{nRTAC} | Find list of cells under the tracking area grouping trackingAreaGroup{ leaf nRTAC { type Tac; description "Identity of the common Tracking Area Code for the PLMNs allowedValues: a) It is the TAC or Extended-TAC. b) A cell can only broadcast one TAC or Extended-TAC. See TS 36.300, subclause 10.1.7 (PLMNID and TAC relation). c) TAC is defined in subclause 19.4.2.3 of 3GPP TS 23.003 and Extended-TAC is defined in subclause 9.3.1.29 of 3GPP TS 38.473. d) For a 5G SA (Stand Alone), it has a non-null value."; } list taCellsList{ key cellLocalId; leaf cellLocalId { description "Identifies an NR cell of a gNB. Together with corresponding gNB ID it forms the NR Cell Identifier (NCI)."; mandatory true; type int32 { range "0..16383"; } } } }
|
Groovy Test - E2E Coverage Area-Tracking Area & TA-Cell mapping data can be parsed for RAN inventory
Link to code review: https://gerrit.onap.org/r/c/cps/+/117374/5/cps-service/src/test/groovy/org/onap/cps/api/impl/E2ENetworkSliceSpec.groovy
def 'E2E Coverage Area-Tracking Area & TA-Cell mapping model can be parsed by CPS.'() { given: 'Valid yang resource as name-to-content map' def yangResourcesNameToContentMap = TestUtils.getYangResourcesAsMap( 'e2e/basic/cps-cavsta-onap-internal2021-01-28.yang') when: 'Create schema set method is invoked' cpsModuleServiceImpl.createSchemaSet(dataspaceName, schemaSetName, yangResourcesNameToContentMap) then: 'Parameters are validated and processing is delegated to persistence service' 1 * mockModuleStoreService.storeSchemaSet(dataspaceName, schemaSetName, yangResourcesNameToContentMap) } def 'E2E Coverage Area-Tracking Area & TA-Cell mapping data can be parsed by CPS.'() { given: 'Valid yang resource as name-to-content map' def yangResourcesNameToContentMap = TestUtils.getYangResourcesAsMap( 'e2e/basic/cps-cavsta-onap-internal2021-01-28.yang') def schemaContext = YangTextSchemaSourceSetBuilder.of(yangResourcesNameToContentMap).getSchemaContext() and : 'a valid json is provided for the model' def jsonData = TestUtils.getResourceFileContent('e2e/basic/Data.txt') and : 'all the further dependencies are mocked ' mockCpsAdminService.getAnchor(dataspaceName, anchorName) >> new Anchor().builder().name(anchorName).schemaSetName(schemaSetName).build() mockYangTextSchemaSourceSetCache.get(dataspaceName, schemaSetName) >> YangTextSchemaSourceSetBuilder.of(yangResourcesNameToContentMap) mockModuleStoreService.getYangSchemaResources(dataspaceName, schemaSetName) >> schemaContext when: 'saveData method is invoked' cpsDataServiceImple.saveData(dataspaceName, anchorName, jsonData) then: 'Parameters are validated and processing is delegated to persistence service' 1 * mockDataStoreService.storeDataNode(dataspaceName, anchorName, {dataNode -> dataNode.xpath == '/ran-coverage-area' && dataNode.childDataNodes.size() == 4})