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-199 - Getting 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

cps-cavsta-Data.txt

Queries used for the RAN inventory model

API PathDescription of Operation
POST
/ran-coverage-area

Add a new coverage area for an operator

  • use CPS Create Node API 
    /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes with json Data as attached.
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";
    }
    }


  • use query of cpsPath starting with given path (maybe even add '[') -  '
    /ran-coverage-area/pLMNIdList[@mcc=\'310\', and @mnc=\'410\']/coverage-area[@coverageArea=\'Washington\
    ']
/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"; }
    }
    }
  	}


  • use query of cpsPath starting with given path (maybe even add '[') -  '
    '/ran-coverage-area/pLMNIdList[@mcc='310' and @mnc='410']/coverage-area[@coverageArea='Washington']/coverageAreaTAList[@nRTAC='234']'



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/+/117559/3/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()
def dataNodeStored
and : 'a valid json is provided for the model'
def jsonData = TestUtils.getResourceFileContent('e2e/basic/cps-Cavsta-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('someDataspace', 'someAnchor', _) >>
{ args -> dataNodeStored = args[2]}
def child = dataNodeStored.childDataNodes[0]
assert child.childDataNodes.size() == 1
and: 'list of Tracking Area for a Coverage Area are stored with correct xpath and child nodes '
def listOfTAForCoverageArea = child.childDataNodes[0]
listOfTAForCoverageArea.xpath == '/ran-coverage-area/pLMNIdList[@mcc=\'310\' and @mnc=\'410\']/' +
'coverage-area[@coverageArea=\'Washington\']'
listOfTAForCoverageArea.childDataNodes[0].leaves.get('nRTAC') == 234
and: 'list of cells in a tracking area are stored with correct xpath and child nodes '
def listOfCellsInTrackingArea = listOfTAForCoverageArea.childDataNodes[0]
listOfCellsInTrackingArea.xpath == '/ran-coverage-area/pLMNIdList[@mcc=\'310\' and @mnc=\'410\']/' +
'coverage-area[@coverageArea=\'Washington\']/coverageAreaTAList[@nRTAC=\'234\']'
listOfCellsInTrackingArea.childDataNodes[0].leaves.get('cellLocalId') == 15709
}


  • No labels