tree: 76b0d43cf8613dd8463d66a4438a6d8f71fd2883 [path history] [tgz]
  1. archive/
  2. controller/
  3. model/
  4. view/
  5. 2022-06-pocfest.json
  6. config.json
  7. README.md
  8. tapi_topology_generator.py
code/network-topology-instance-generator/README.md

Network Topology Instance Generator

This python project generates a network topology according TAPI-Topology yang - v2.1.3.

Please note: The generator does not need to implement streaming or notification functions. The dependencies to tapi-notification and tapi-streaming were removed.

Each network-function is represented as TAPI-Node which exposes interfaces to other network-functions or to management systems.

Therefore the Network Topology can cover

  • Data Plane (also called User Plane),
  • Synchronization Plane,
  • Control Plane and
  • Management Plane.

Interface end-points of network-functions are represented as TAPI-Owned-Node-Edge-Points. TAPI-Links create a logical connection between TAPI-Owned-Node-Edge-Points of the same layer (or even more strict of the same layer-protocol-name).

Prerequisites

All commands are executed form the directory of this README file.

sudo pip install jsonschema

Steps to import TAPI yang data models and O-RAN-SC extensions:

# TAPI v2.1.3
cd model
mkdir yang
cd yang
git clone https://github.com/OpenNetworkingFoundation/TAPI.git
cd TAPI
git checkout v2.1.3

# O-RAN-SC extensions
cd ..
git clone "https://gerrit.o-ran-sc.org/r/scp/oam/modeling"

Generation Input

The generator consumes a json as input. The json defines the hierarchy of network-function types and its number of elements per parent.

Example:

{
  "network": {
    "name": "Test network",
    "pattern": {
      "o-du":2,
      "o-ru":3
    }
  }
}

The resulting network will include 2 network-functions of type "o-du". Each "o-du" is connected to 3 network-function instances of type "o-ru".

network
 +-- o-du-1
 |   +-- o-ru-11
 |   +-- o-ru-12
 |   +-- o-ru-13
 +-- o-du-2
     +-- o-ru-21
     +-- o-ru-22
     +-- o-ru-23

Usage

python tapi_topology_generator.py config.json

Validation

The generated json file can be validated against the yang models using 'yanglint'.

yanglint -f json \
-p model/yang/modeling/data-model/yang/published/ietf \
-p model/yang/TAPI/YANG \
model/yang/modeling/data-model/yang/working/o-ran-sc/o-ran-sc-topology/o-ran-sc-topology*.yang \
model/yang/TAPI/YANG/*.yang \
output/tapi-common-operational.json