Starting TEIV with Docker Compose
To start TEIV navigate to the 'docker-compose' directory in the 'teiv' repo and run 'docker-compose up'. This will bring up 3 Kafka containers, Zookeeper, PostgreSQL using PostGIS, TEIV Exposure, and TEIV Ingestion. The database won't be populated with any topology data, but the 'cloudEventProducer.sh' script in 'docker-compose/cloudEventProducer' can be used to populate the database with sample data that will enable querying of the database.
Sample API calls
To get a list of all API calls and details go to TEIV API documentation.
To get a list of supported domains click here.
Postman collection
Collection: Query TEIV.postman_collection.json
Environment: TEIV.postman_environment.json
Retrieving and using topology modules
Topology & Inventory provides APIs to enable users to query module data that can be used to understand the existing topology and inventory model, parse the modules, and understand what objects are supported over the R1 interface, so adequate queries can be made on topology and inventory data.
The API endpoints returning lists support pagination. The default value for number of items returned is 500, which is also the upper limit.
Sample request to fetch a list of all domains in TEIV:
GET https://<host>/topology-inventory/<API_VERSION>/domains
Response:
Sample request to fetch a list of all modules in TEIV:
GET https://<host>/topology-inventory/<API_VERSION>/schemas
Response:
Sample request to fetch a list of all modules related to the CLOUD domain:
To get a list of all modules for a specific domain, use a domain query parameter. The query parameter is case sensitive.
Note: - Partial matches are also supported in the query parameter using ’.*’ as a wild card. - If the specified domain does not exist, an empty list is returned.
GET https://<host>/topology-inventory/<API_VERSION>/schemas?domain=.*CLOUD.*
Response:
Sample request to fetch the module data for the o-ran-smo-teiv-oam module:
To get a specific module, supply a module name in the path parameter.
GET https://<host>/topology-inventory/<API_VERSION>/schemas/o-ran-smo-teiv-oam/content
Response:
Reading entities and relationships
Sample request to fetch the entities for EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entity-types
Response:
Sample request to fetch the AntennaModule entities from EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entity-types/AntennaModule/entities
Response:
Sample request to fetch a specific AntennaModule from EQUIPMENT by id:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entity-types/AntennaModule/entities/urn:o-ran:smo-teiv-equipment:1
Response:
Sample request to fetch all relationships from a specific AntennaModule from EQUIPMENT by id:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entity-types/AntennaModule/entities/urn:o-ran:smo-teiv-equipment:1/relationships
Response:
Sample request to fetch all relationship types in EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/relationship-types
Response:
Sample request to fetch ANTENNAMODULE_INSTALLED_AT_SITE relationships from EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/relationship-types/ANTENNAMODULE_INSTALLED_AT_SITE/relationships
Response:
Sample request to fetch ANTENNAMODULE_INSTALLED_AT_SITE relationship from EQUIPMENT by id:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/relationship-types/ANTENNAMODULE_INSTALLED_AT_SITE/relationships/urn:o-ran:smo-teiv-equipment:1
Response:
Querying entities and relationships:
Use the targetFilter parameter to narrow down the fields to return. To filter the results which match a given criteria, use the scopeFilter. Think of it as an SQL statement, where the targetFilter is the SELECT, and the scopeFilter is the WHERE tag.
Sample request to query AntennaModule entities and attributes from EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entities?targetFilter=/AntennaModule/attributes or GET https://<host>/topology-inventory/<API_VERSION>/domains/EQUIPMENT/entity-types/AntennaModule/entities?targetFilter=/attributes
Response:
Sample request to query CloudifiedNFs name attribute from EQUIPMENT:
GET https://<host>/topology-inventory/<API_VERSION>/domains/CLOUD/entities?targetFilter=/CloudifiedNF/attributes(name) or GET https://<host>/topology-inventory/<API_VERSION>/domains/CLOUD/entities?targetFilter=/CloudifiedNF/attributes/name or GET https://<host>/topology-inventory/<API_VERSION>/domains/CLOUD/entity-types/CloudifiedNF/entities?targetFilter=/attributes(name)
Response:
Sample request to query GNBDUFunction entities and the gNBId, gNBIdLength attributes from RAN:
GET https://<host>/topology-inventory/<API_VERSION>/domains/RAN/entities?targetFilter=/GNBDUFunction/attributes(gNBId, gNBIdLength) or GET https://<host>/topology-inventory/<API_VERSION>/domains/RAN/entity-types/GNBDUFunction/entities?targetFilter=/attributes(gNBId, gNBIdLength)
Response:
Sample request to query RAN for GNBDUFunction, NRSectorCarrier, NRCellDU entities:
GET https://<host>/topology-inventory/<API_VERSION>/domains/RAN/entities?targetFilter=/GNBDUFunction;/NRSectorCarrier;/NRCellDU
Response:
Sample request to query RAN GNBDUFunction filtered by gNBIdLength=23 and gNBId=1:
GET https://<host>/topology-inventory/<API_VERSION>/domains/RAN/entities?targetFilter=/GNBDUFunction&scopeFilter=%2FGNBDUFunction%2Fattributes%5B%40gNBIdLength=23 and %40gNBId=1%5D or GET https://<host>/topology-inventory/<API_VERSION>/domains/RAN/entity-types/GNBDUFunction/entities?scopeFilter=%2FGNBDUFunction%2Fattributes%5B%40gNBIdLength=23 and %40gNBId=1%5D
Response: