From df0221ef4623e2a23ddfe76bb9e480d25aae6a2f Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Thu, 10 Oct 2024 10:24:46 +0100 Subject: [PATCH] TEIV: Update documnentation updaate docs based on updated YANG modules graph-generator: coloured domains backgrounds Issue-ID: SMO-155 Change-Id: Iddbb49ec2dc0c352f283562f7f19724d68c4df31 Signed-off-by: JvD_Ericsson --- .../_static/data-model/cloud-ran-relationships.svg | 49 --- docs/_static/data-model/cloud-relationships.svg | 61 --- docs/_static/data-model/cloud.svg | 163 -------- docs/_static/data-model/equipment-ran.svg | 1 - .../_static/data-model/equipment-relationships.svg | 1 - docs/_static/data-model/equipment.svg | 1 - .../data-model/o-ran-smo-teiv-cloud-rel.svg | 73 ++++ docs/_static/data-model/o-ran-smo-teiv-cloud.svg | 177 +++++++++ .../data-model/o-ran-smo-teiv-equipment-rel.svg | 28 ++ .../data-model/o-ran-smo-teiv-equipment.svg | 109 ++++++ docs/_static/data-model/o-ran-smo-teiv-oam.svg | 41 ++ docs/_static/data-model/o-ran-smo-teiv-ran-rel.svg | 121 ++++++ docs/_static/data-model/o-ran-smo-teiv-ran.svg | 421 +++++++++++++++++++++ .../o-ran-smo-teiv-rel-cloud-ran-rel.svg | 73 ++++ .../o-ran-smo-teiv-rel-equipment-ran-rel.svg | 43 +++ .../o-ran-smo-teiv-rel-oam-cloud-rel.svg | 43 +++ .../data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg | 88 +++++ .../_static/data-model/oam-cloud-relationships.svg | 37 -- docs/_static/data-model/oam-ran.svg | 1 - docs/_static/data-model/oam.svg | 1 - docs/_static/data-model/overall-rel.svg | 331 ++++++++++++++++ docs/_static/data-model/ran-relationships.svg | 1 - docs/_static/data-model/ran.svg | 1 - docs/_static/sample-entities.svg | 2 +- docs/_static/sample-object-relationships.svg | 105 ++++- docs/classifiers-and-decorators.rst | 8 +- docs/data-models/cloud.rst | 4 +- docs/data-models/equipment.rst | 5 +- docs/data-models/oam.rst | 2 +- docs/data-models/ran.rst | 4 +- docs/data-models/rel-cloud-ran.rst | 2 +- docs/data-models/rel-equipment-ran.rst | 3 +- docs/data-models/rel-oam-cloud.rst | 2 +- docs/data-models/rel-oam-ran.rst | 2 +- docs/developer-guide.rst | 6 +- ...discover-and-reconciliation-interface-guide.rst | 8 +- docs/pgsql-schema-generator-guide.rst | 2 +- docs/supported-filter-options.rst | 134 +++---- .../graphgenerator/EntityGraphGenerator.java | 15 +- .../graphgenerator/EntityGraphGeneratorUml.java | 6 +- .../graphgenerator/HelperFunctions.java | 57 +++ .../graphgenerator/RelationshipGraphGenerator.java | 34 +- .../RelationshipGraphGeneratorUml.java | 19 +- .../src/main/resources/application.yaml | 1 + .../src/test/resources/application.yaml | 1 + 45 files changed, 1837 insertions(+), 450 deletions(-) delete mode 100644 docs/_static/data-model/cloud-ran-relationships.svg delete mode 100644 docs/_static/data-model/cloud-relationships.svg delete mode 100644 docs/_static/data-model/cloud.svg delete mode 100644 docs/_static/data-model/equipment-ran.svg delete mode 100644 docs/_static/data-model/equipment-relationships.svg delete mode 100644 docs/_static/data-model/equipment.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-cloud-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-cloud.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-equipment-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-equipment.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-oam.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-ran-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-ran.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-rel-cloud-ran-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-rel-equipment-ran-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-rel-oam-cloud-rel.svg create mode 100644 docs/_static/data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg delete mode 100644 docs/_static/data-model/oam-cloud-relationships.svg delete mode 100644 docs/_static/data-model/oam-ran.svg delete mode 100644 docs/_static/data-model/oam.svg create mode 100644 docs/_static/data-model/overall-rel.svg delete mode 100644 docs/_static/data-model/ran-relationships.svg delete mode 100644 docs/_static/data-model/ran.svg create mode 100644 pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/HelperFunctions.java diff --git a/docs/_static/data-model/cloud-ran-relationships.svg b/docs/_static/data-model/cloud-ran-relationships.svg deleted file mode 100644 index 365ef90..0000000 --- a/docs/_static/data-model/cloud-ran-relationships.svg +++ /dev/null @@ -1,49 +0,0 @@ - - -moduleName - - - -GNBDUFunction - -GNBDUFunction - - - -GNBCUCPFunction - -GNBCUCPFunction - - - -GNBCUUPFunction - -GNBCUUPFunction - - - -NFDeployment - -NFDeployment - - - -NFDeployment--GNBDUFunction - -SERVES - - - -NFDeployment--GNBCUCPFunction - -SERVES - - - -NFDeployment--GNBCUUPFunction - -SERVES - - - diff --git a/docs/_static/data-model/cloud-relationships.svg b/docs/_static/data-model/cloud-relationships.svg deleted file mode 100644 index 0b80a94..0000000 --- a/docs/_static/data-model/cloud-relationships.svg +++ /dev/null @@ -1,61 +0,0 @@ - - -moduleName - - - -CloudSite - -CloudSite - - - -CloudifiedNF - -CloudifiedNF - - - -NFDeployment - -NFDeployment - - - -CloudifiedNF--NFDeployment - -COMPRISES - - - -CloudNamespace - -CloudNamespace - - - -NFDeployment--CloudNamespace - -DEPLOYED - - - -NodeCluster - -NodeCluster - - - -CloudNamespace--NodeCluster - -DEPLOYED - - - -NodeCluster--CloudSite - -LOCATED - - - diff --git a/docs/_static/data-model/cloud.svg b/docs/_static/data-model/cloud.svg deleted file mode 100644 index cd7f76d..0000000 --- a/docs/_static/data-model/cloud.svg +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - -%3 - - - -o-ran-smo-teiv-cloud - -o-ran-smo-teiv-cloud - - - -CloudifiedNF - -CloudifiedNF - - - -o-ran-smo-teiv-cloud->CloudifiedNF - - - - - -NFDeployment - -NFDeployment - - - -o-ran-smo-teiv-cloud->NFDeployment - - - - - -CloudNamespace - -CloudNamespace - - - -o-ran-smo-teiv-cloud->CloudNamespace - - - - - -NodeCluster - -NodeCluster - - - -o-ran-smo-teiv-cloud->NodeCluster - - - - - -CloudSite - -CloudSite - - - -o-ran-smo-teiv-cloud->CloudSite - - - - - -CloudifiedNFattributes - - -name - -string - - - - -CloudifiedNF->CloudifiedNFattributes - - - - - -NFDeploymentattributes - - -name - -string - - - - -NFDeployment->NFDeploymentattributes - - - - - -CloudNamespaceattributes - - -name - -string - - - - -CloudNamespace->CloudNamespaceattributes - - - - - -NodeClusterattributes - - -name - -string - - - - -NodeCluster->NodeClusterattributes - - - - - -CloudSiteattributes - - -name - -string - -geo:geo-location - -json - - - - -CloudSite->CloudSiteattributes - - - - - diff --git a/docs/_static/data-model/equipment-ran.svg b/docs/_static/data-model/equipment-ran.svg deleted file mode 100644 index 066132a..0000000 --- a/docs/_static/data-model/equipment-ran.svg +++ /dev/null @@ -1 +0,0 @@ -Equipment-RAN Object RelationshipsAntennaCapabilitySERVESSectorAntennaModuleGROUPSRANEquipment \ No newline at end of file diff --git a/docs/_static/data-model/equipment-relationships.svg b/docs/_static/data-model/equipment-relationships.svg deleted file mode 100644 index b87aee0..0000000 --- a/docs/_static/data-model/equipment-relationships.svg +++ /dev/null @@ -1 +0,0 @@ -Equipment Object RelationshipsAntennaModuleSiteINSTALLED_AT \ No newline at end of file diff --git a/docs/_static/data-model/equipment.svg b/docs/_static/data-model/equipment.svg deleted file mode 100644 index 7e66d1a..0000000 --- a/docs/_static/data-model/equipment.svg +++ /dev/null @@ -1 +0,0 @@ -Equipment Managed Objects and Attributeso-ran-smo-teiv-equipmentAntennaModuleSitestring {key}id:stringantennaModelNumber: uint32mechanicalAntennaBearing: uint32mechanicalAntennaTilt: stringpositionWithinSector: uint32totalTilt: uint32electricalAntennaTilt: uint32antennaBeamWidth:string {key}id:Stringname:decimal64v-north:decimal64v-east:decimal64v-up:locationchoice:decimal64latitude:decimal64longitude:decimal64height:decimal64x:decimal64y:decimal64z:stringalternate-system:stringastronomical-body:stringgeodetic-datum:decimal64coord-accuracy:decimal64height-accuracy:timestamp yang:date-and-timevalid-until: yang:date-and-timegeo-location:decimal64v-north:decimal64v-east:decimal64v-up:locationchoice:decimal64latitude:decimal64longitude:decimal64height:decimal64x:decimal64y:decimal64z:stringalternate-system:stringastronomical-body:stringgeodetic-datum:decimal64coord-accuracy:decimal64height-accuracy:timestamp yang:date-and-timevalid-until: yang:date-and-timegeo-location: \ No newline at end of file diff --git a/docs/_static/data-model/o-ran-smo-teiv-cloud-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-cloud-rel.svg new file mode 100644 index 0000000..9f85541 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-cloud-rel.svg @@ -0,0 +1,73 @@ + + +moduleName + + + +CloudifiedNF + +CloudifiedNF + + + +NFDeployment + +NFDeployment + + + +CloudifiedNF->NFDeployment + + +COMPRISES +1..1 +1..* + + + +OCloudNamespace + +OCloudNamespace + + + +NFDeployment->OCloudNamespace + + +DEPLOYED +1..* +1..* + + + +NodeCluster + +NodeCluster + + + +OCloudSite + +OCloudSite + + + +NodeCluster->OCloudSite + + +LOCATED +1..* +1..* + + + +OCloudNamespace->NodeCluster + + +DEPLOYED +1..* +1..1 + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-cloud.svg b/docs/_static/data-model/o-ran-smo-teiv-cloud.svg new file mode 100644 index 0000000..faf73cf --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-cloud.svg @@ -0,0 +1,177 @@ + + +o-ran-smo-teiv-cloud + + + +o-ran-smo-teiv-cloud + +o-ran-smo-teiv-cloud + + + +CloudifiedNF + +CloudifiedNF + + + +o-ran-smo-teiv-cloud->CloudifiedNF + + + + + +NFDeployment + +NFDeployment + + + +o-ran-smo-teiv-cloud->NFDeployment + + + + + +NodeCluster + +NodeCluster + + + +o-ran-smo-teiv-cloud->NodeCluster + + + + + +OCloudNamespace + +OCloudNamespace + + + +o-ran-smo-teiv-cloud->OCloudNamespace + + + + + +OCloudSite + +OCloudSite + + + +o-ran-smo-teiv-cloud->OCloudSite + + + + + +CloudifiedNF-attributes + + +id + +string + +name + +string + + + + +NFDeployment-attributes + + +id + +string + +name + +string + + + + +NodeCluster-attributes + + +id + +string + +name + +string + + + + +OCloudNamespace-attributes + + +id + +string + +name + +string + + + + +OCloudSite-attributes + + +geo-location + +<< Refer to Module >> + +id + +string + +name + +string + + + + +CloudifiedNF->CloudifiedNF-attributes + + + + + +NFDeployment->NFDeployment-attributes + + + + + +NodeCluster->NodeCluster-attributes + + + + + +OCloudNamespace->OCloudNamespace-attributes + + + + + +OCloudSite->OCloudSite-attributes + + + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-equipment-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-equipment-rel.svg new file mode 100644 index 0000000..4667d9a --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-equipment-rel.svg @@ -0,0 +1,28 @@ + + +moduleName + + + +AntennaModule + +AntennaModule + + + +Site + +Site + + + +AntennaModule->Site + + +INSTALLED +0..* +0..1 + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-equipment.svg b/docs/_static/data-model/o-ran-smo-teiv-equipment.svg new file mode 100644 index 0000000..2d1f842 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-equipment.svg @@ -0,0 +1,109 @@ + + +o-ran-smo-teiv-equipment + + + +o-ran-smo-teiv-equipment + +o-ran-smo-teiv-equipment + + + +AntennaModule + +AntennaModule + + + +o-ran-smo-teiv-equipment->AntennaModule + + + + + +Site + +Site + + + +o-ran-smo-teiv-equipment->Site + + + + + +AntennaModule-attributes + + +antennaBeamWidth + +uint32 + +antennaModelNumber + +string + +electricalAntennaTilt + +int32 + +geo-location + +<< Refer to Module >> + +id + +string + +mechanicalAntennaBearing + +int32 + +mechanicalAntennaTilt + +int32 + +positionWithinSector + +string + +totalTilt + +int32 + + + + +Site-attributes + + +geo-location + +<< Refer to Module >> + +id + +string + +name + +string + + + + +AntennaModule->AntennaModule-attributes + + + + + +Site->Site-attributes + + + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-oam.svg b/docs/_static/data-model/o-ran-smo-teiv-oam.svg new file mode 100644 index 0000000..d08304e --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-oam.svg @@ -0,0 +1,41 @@ + + +o-ran-smo-teiv-oam + + + +o-ran-smo-teiv-oam + +o-ran-smo-teiv-oam + + + +ManagedElement + +ManagedElement + + + +o-ran-smo-teiv-oam->ManagedElement + + + + + +ManagedElement-attributes + + +id + +string + + + + +ManagedElement->ManagedElement-attributes + + + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-ran-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-ran-rel.svg new file mode 100644 index 0000000..17bdc8a --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-ran-rel.svg @@ -0,0 +1,121 @@ + + +moduleName + + + +AntennaCapability + +AntennaCapability + + + +NRCellCU + +NRCellCU + + + +NRCellDU + +NRCellDU + + + +NRSectorCarrier + +NRSectorCarrier + + + +NRCellDU->NRSectorCarrier + + +USES +0..1 +0..* + + + +NRSectorCarrier->AntennaCapability + + +USES +0..* +0..1 + + + +NearRTRICFunction + +NearRTRICFunction + + + +OCUCPFunction + +OCUCPFunction + + + +OCUCPFunction->NRCellCU + + +PROVIDES +1..1 +0..* + + + +OCUUPFunction + +OCUUPFunction + + + +ODUFunction + +ODUFunction + + + +ODUFunction->NRCellDU + + +PROVIDES +1..1 +0..* + + + +ODUFunction->NRSectorCarrier + + +PROVIDES +1..1 +0..* + + + +ORUFunction + +ORUFunction + + + +Sector + +Sector + + + +Sector->NRCellDU + + +GROUPS +0..1 +0..* + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-ran.svg b/docs/_static/data-model/o-ran-smo-teiv-ran.svg new file mode 100644 index 0000000..d761431 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-ran.svg @@ -0,0 +1,421 @@ + + +o-ran-smo-teiv-ran + + + +o-ran-smo-teiv-ran + +o-ran-smo-teiv-ran + + + +AntennaCapability + +AntennaCapability + + + +o-ran-smo-teiv-ran->AntennaCapability + + + + + +NRCellCU + +NRCellCU + + + +o-ran-smo-teiv-ran->NRCellCU + + + + + +NRCellDU + +NRCellDU + + + +o-ran-smo-teiv-ran->NRCellDU + + + + + +NRSectorCarrier + +NRSectorCarrier + + + +o-ran-smo-teiv-ran->NRSectorCarrier + + + + + +NearRTRICFunction + +NearRTRICFunction + + + +o-ran-smo-teiv-ran->NearRTRICFunction + + + + + +OCUCPFunction + +OCUCPFunction + + + +o-ran-smo-teiv-ran->OCUCPFunction + + + + + +OCUUPFunction + +OCUUPFunction + + + +o-ran-smo-teiv-ran->OCUUPFunction + + + + + +ODUFunction + +ODUFunction + + + +o-ran-smo-teiv-ran->ODUFunction + + + + + +ORUFunction + +ORUFunction + + + +o-ran-smo-teiv-ran->ORUFunction + + + + + +Sector + +Sector + + + +o-ran-smo-teiv-ran->Sector + + + + + +AntennaCapability-attributes + + +eUtranFqBands + +string + +geranFqBands + +string + +id + +string + +nRFqBands + +string + + + + +NRCellCU-attributes + + +cellLocalId + +int32 + +id + +string + +nCI + +int64 + +nRTAC + +int32 + +plmnId + +<< Refer to Module >> + + + + +NRCellDU-attributes + + +cellLocalId + +int32 + +id + +string + +nCI + +int64 + +nRPCI + +int32 + +nRTAC + +int32 + + + + +NRSectorCarrier-attributes + + +arfcnDL + +int32 + +arfcnUL + +int32 + +bSChannelBwDL + +int32 + +frequencyDL + +int32 + +frequencyUL + +int32 + +id + +string + + + + +NearRTRICFunction-attributes + + +id + +string + +nearRtRicId + +int64 + +pLMNId + +<< Refer to Module >> + + + + +OCUCPFunction-attributes + + +gNBCUName + +string + +gNBId + +int64 + +gNBIdLength + +int32 + +id + +string + +pLMNId + +<< Refer to Module >> + + + + +OCUUPFunction-attributes + + +gNBId + +int64 + +gNBIdLength + +int32 + +id + +string + +pLMNIdList + +[] + + + + +ODUFunction-attributes + + +gNBDUId + +int64 + +gNBId + +int64 + +gNBIdLength + +int32 + +id + +string + + + + +ORUFunction-attributes + + +id + +string + +oruId + +int64 + + + + +Sector-attributes + + +azimuth + +decimal64 + +geo-location + +<< Refer to Module >> + +id + +string + +sectorId + +uint64 + + + + +AntennaCapability->AntennaCapability-attributes + + + + + +NRCellCU->NRCellCU-attributes + + + + + +NRCellDU->NRCellDU-attributes + + + + + +NRSectorCarrier->NRSectorCarrier-attributes + + + + + +NearRTRICFunction->NearRTRICFunction-attributes + + + + + +OCUCPFunction->OCUCPFunction-attributes + + + + + +OCUUPFunction->OCUUPFunction-attributes + + + + + +ODUFunction->ODUFunction-attributes + + + + + +ORUFunction->ORUFunction-attributes + + + + + +Sector->Sector-attributes + + + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-rel-cloud-ran-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-rel-cloud-ran-rel.svg new file mode 100644 index 0000000..3d45704 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-rel-cloud-ran-rel.svg @@ -0,0 +1,73 @@ + + +moduleName + + + +NFDeployment + +NFDeployment + + + +NearRTRICFunction + +NearRTRICFunction + + + +NFDeployment->NearRTRICFunction + + +SERVES +0..* +0..* + + + +OCUCPFunction + +OCUCPFunction + + + +NFDeployment->OCUCPFunction + + +SERVES +0..* +0..* + + + +OCUUPFunction + +OCUUPFunction + + + +NFDeployment->OCUUPFunction + + +SERVES +0..* +0..* + + + +ODUFunction + +ODUFunction + + + +NFDeployment->ODUFunction + + +SERVES +0..* +0..* + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-rel-equipment-ran-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-rel-equipment-ran-rel.svg new file mode 100644 index 0000000..c17bc1c --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-rel-equipment-ran-rel.svg @@ -0,0 +1,43 @@ + + +moduleName + + + +AntennaModule + +AntennaModule + + + +AntennaCapability + +AntennaCapability + + + +AntennaModule->AntennaCapability + + +SERVES +0..* +0..* + + + +Sector + +Sector + + + +Sector->AntennaModule + + +GROUPS +0..1 +0..* + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-rel-oam-cloud-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-rel-oam-cloud-rel.svg new file mode 100644 index 0000000..08d2d01 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-rel-oam-cloud-rel.svg @@ -0,0 +1,43 @@ + + +moduleName + + + +ManagedElement + +ManagedElement + + + +CloudifiedNF + +CloudifiedNF + + + +ManagedElement->CloudifiedNF + + +DEPLOYED +1..1 +0..1 + + + +NFDeployment + +NFDeployment + + + +NFDeployment->ManagedElement + + +SERVES +1..* +1..1 + + + diff --git a/docs/_static/data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg b/docs/_static/data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg new file mode 100644 index 0000000..67cdb46 --- /dev/null +++ b/docs/_static/data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg @@ -0,0 +1,88 @@ + + +moduleName + + + +ManagedElement + +ManagedElement + + + +NearRTRICFunction + +NearRTRICFunction + + + +ManagedElement->NearRTRICFunction + + +MANAGES +1..1 +0..* + + + +OCUCPFunction + +OCUCPFunction + + + +ManagedElement->OCUCPFunction + + +MANAGES +1..1 +0..* + + + +OCUUPFunction + +OCUUPFunction + + + +ManagedElement->OCUUPFunction + + +MANAGES +1..1 +0..* + + + +ODUFunction + +ODUFunction + + + +ManagedElement->ODUFunction + + +MANAGES +1..1 +0..* + + + +ORUFunction + +ORUFunction + + + +ManagedElement->ORUFunction + + +MANAGES +1..1 +0..* + + + diff --git a/docs/_static/data-model/oam-cloud-relationships.svg b/docs/_static/data-model/oam-cloud-relationships.svg deleted file mode 100644 index 4d82a73..0000000 --- a/docs/_static/data-model/oam-cloud-relationships.svg +++ /dev/null @@ -1,37 +0,0 @@ - - -moduleName - - - -CloudifiedNF - -CloudifiedNF - - - -ManagedElement - -ManagedElement - - - -ManagedElement--CloudifiedNF - -DEPLOYED - - - -NFDeployment - -NFDeployment - - - -NFDeployment--ManagedElement - -SERVES - - - diff --git a/docs/_static/data-model/oam-ran.svg b/docs/_static/data-model/oam-ran.svg deleted file mode 100644 index 0ee7127..0000000 --- a/docs/_static/data-model/oam-ran.svg +++ /dev/null @@ -1 +0,0 @@ -OAM-RAN Object RelationshipsManagedElementMANAGESENodeBFunctionGNBDUFunctionMANAGESGNBCUCPFunctionMANAGESMANAGESGNBCUUPFunctionOAMRAN \ No newline at end of file diff --git a/docs/_static/data-model/oam.svg b/docs/_static/data-model/oam.svg deleted file mode 100644 index d072b8b..0000000 --- a/docs/_static/data-model/oam.svg +++ /dev/null @@ -1 +0,0 @@ -OAM Managed Objects and Attributeso-ran-smo-teiv-oamManagedElementstring {key}id: \ No newline at end of file diff --git a/docs/_static/data-model/overall-rel.svg b/docs/_static/data-model/overall-rel.svg new file mode 100644 index 0000000..dd9130e --- /dev/null +++ b/docs/_static/data-model/overall-rel.svg @@ -0,0 +1,331 @@ + + +moduleName + + + +CloudifiedNF + +CloudifiedNF + + + +NFDeployment + +NFDeployment + + + +CloudifiedNF->NFDeployment + + +COMPRISES +1..1 +1..* + + + +OCloudNamespace + +OCloudNamespace + + + +NFDeployment->OCloudNamespace + + +DEPLOYED +1..* +1..* + + + +ManagedElement + +ManagedElement + + + +NFDeployment->ManagedElement + + +SERVES +1..* +1..1 + + + +NearRTRICFunction + +NearRTRICFunction + + + +NFDeployment->NearRTRICFunction + + +SERVES +0..* +0..* + + + +OCUCPFunction + +OCUCPFunction + + + +NFDeployment->OCUCPFunction + + +SERVES +0..* +0..* + + + +OCUUPFunction + +OCUUPFunction + + + +NFDeployment->OCUUPFunction + + +SERVES +0..* +0..* + + + +ODUFunction + +ODUFunction + + + +NFDeployment->ODUFunction + + +SERVES +0..* +0..* + + + +NodeCluster + +NodeCluster + + + +OCloudSite + +OCloudSite + + + +NodeCluster->OCloudSite + + +LOCATED +1..* +1..* + + + +OCloudNamespace->NodeCluster + + +DEPLOYED +1..* +1..1 + + + +AntennaModule + +AntennaModule + + + +Site + +Site + + + +AntennaModule->Site + + +INSTALLED +0..* +0..1 + + + +AntennaCapability + +AntennaCapability + + + +AntennaModule->AntennaCapability + + +SERVES +0..* +0..* + + + +ManagedElement->CloudifiedNF + + +DEPLOYED +1..1 +0..1 + + + +ManagedElement->NearRTRICFunction + + +MANAGES +1..1 +0..* + + + +ManagedElement->OCUCPFunction + + +MANAGES +1..1 +0..* + + + +ManagedElement->OCUUPFunction + + +MANAGES +1..1 +0..* + + + +ManagedElement->ODUFunction + + +MANAGES +1..1 +0..* + + + +ORUFunction + +ORUFunction + + + +ManagedElement->ORUFunction + + +MANAGES +1..1 +0..* + + + +NRCellCU + +NRCellCU + + + +NRCellDU + +NRCellDU + + + +NRSectorCarrier + +NRSectorCarrier + + + +NRCellDU->NRSectorCarrier + + +USES +0..1 +0..* + + + +NRSectorCarrier->AntennaCapability + + +USES +0..* +0..1 + + + +OCUCPFunction->NRCellCU + + +PROVIDES +1..1 +0..* + + + +ODUFunction->NRCellDU + + +PROVIDES +1..1 +0..* + + + +ODUFunction->NRSectorCarrier + + +PROVIDES +1..1 +0..* + + + +Sector + +Sector + + + +Sector->AntennaModule + + +GROUPS +0..1 +0..* + + + +Sector->NRCellDU + + +GROUPS +0..1 +0..* + + + diff --git a/docs/_static/data-model/ran-relationships.svg b/docs/_static/data-model/ran-relationships.svg deleted file mode 100644 index cf4f396..0000000 --- a/docs/_static/data-model/ran-relationships.svg +++ /dev/null @@ -1 +0,0 @@ -RAN Object RelationshipsGNBDUFunctionNRCellCUNRCellDUENodeBFunctionEUtranCellNrSectorCarrierLTESectorCarrierAntennaCapabilityPROVIDESPROVIDESPROVIDESPROVIDESUSESUSESUSESUSESGNBCUCPFunctionPROVIDESSectorGROUPSGROUPS \ No newline at end of file diff --git a/docs/_static/data-model/ran.svg b/docs/_static/data-model/ran.svg deleted file mode 100644 index 3481cb2..0000000 --- a/docs/_static/data-model/ran.svg +++ /dev/null @@ -1 +0,0 @@ -RAN Managed Objects and Attributeso-ran-smo-teiv-ranGNBDUFunctionGNBCUUPFunctionNRCellCUNRCellDUENodeBFunctionGNBCUCPFunctionEUtranCellNrSectorCarrierLTESectorCarrierAntennaCapabilitystring {key}id:uint32gNBDUId: uint32gNBId: uint32gNBIdLength:string {key}id:stringgNBCUName: uint32gNBId: uint32gNBIdLength:string {key}id:uint32gNBId: uint32gNBIdLength:mcc: Mccmnc: MncdUpLMNId:mcc: Mccmnc: MncpLMNId:string {key}id:uint32cellLocalId: uint32nCI: uint32nRTAC:string {key}id:uint32cellLocalId: uint32nCI: uint32nRPCI:uint32nRTACstring {key}id:uint32eNBId: string {key}id:uint32cellId:uint32earfcndluint32earfcnuluint32dlChannelBandwidth: uint32Earfcnuint32channelBandwidth: uint32tac:enum: {fdd, tdd}duplexType:string {key}id:uint32arfcnDL:uint32arFcnUL:uint32frequencyDLuint32frequencyUL:uint32bSChannelBwDL:string {key}id:enum: {normal_sector, left_digital_sector, right_digital_sector,...}sectorCarrierTypestring {key}id:stringeUtranFqBands[]:stringgeranFqBands[]:stringnRFqBands[]:mcc: Mccmnc: MncpLMNId:mcc: int32 [0..999]mnc: int32 [0..999]mncLength: int32 [2..3]eNodeBPlmnId:Sectorstring {key}id:uint64sectorid:decimal64 {degrees}azimuth:timestamp yang:date-and-timevalid-until: yang:date-and-timegeo-location:stringalternate-system:stringastronomical-body:decimal64v-north:decimal64v-east:decimal64v-up:locationchoicedecimal64latitude:decimal64longitude:decimal64height:decimal64x:decimal64y:decimal64z:stringgeodetic-datum:decimal64coord-accuracy:decimal64 {meters}height-accuracy: \ No newline at end of file diff --git a/docs/_static/sample-entities.svg b/docs/_static/sample-entities.svg index f6d4805..f02a72a 100644 --- a/docs/_static/sample-entities.svg +++ b/docs/_static/sample-entities.svg @@ -1 +1 @@ -Sample Entities with AttributesGNBCUUPFunctionNRCellCUstring {key}id:uint32gNBId: uint32gNBIdLength:string {key}id:uint32cellLocalId: uint32nCI: uint32nRTAC:mcc: Mccmnc: MncpLMNId: \ No newline at end of file +Sample Entities with AttributesOCUUPFunctionNRCellCUstring {key}id:uint32gNBId: uint32gNBIdLength:string {key}id:uint32cellLocalId: uint32nCI: uint32nRTAC:mcc: Mccmnc: MncpLMNId: \ No newline at end of file diff --git a/docs/_static/sample-object-relationships.svg b/docs/_static/sample-object-relationships.svg index 9cab9f4..443c71a 100644 --- a/docs/_static/sample-object-relationships.svg +++ b/docs/_static/sample-object-relationships.svg @@ -1 +1,104 @@ -Sample Managed Objects and their RelationshipsGNBDUFunctionNRCellCUNRCellDUENodeBFunctionEUtranCellNrSectorCarrierLTESectorCarrierAntennaCapabilityPROVIDESPROVIDESPROVIDESPROVIDESUSESUSESUSESUSESGNBCUCPFunctionPROVIDESSectorGROUPSGROUPS \ No newline at end of file + + + moduleName + + + + AntennaCapability + + AntennaCapability + + + + NRCellCU + + NRCellCU + + + + NRCellDU + + NRCellDU + + + + NRSectorCarrier + + NRSectorCarrier + + + + NRCellDU->NRSectorCarrier + + + USES + 0..1 + 0..* + + + + NRSectorCarrier->AntennaCapability + + + USES + 0..* + 0..1 + + + + OCUCPFunction + + OCUCPFunction + + + + OCUCPFunction->NRCellCU + + + PROVIDES + 1..1 + 0..* + + + + ODUFunction + + ODUFunction + + + + ODUFunction->NRCellDU + + + PROVIDES + 1..1 + 0..* + + + + ODUFunction->NRSectorCarrier + + + PROVIDES + 1..1 + 0..* + + + + Sector + + Sector + + + + Sector->NRCellDU + + + GROUPS + 0..1 + 0..* + + + Sample Managed Objects and their Relationships + diff --git a/docs/classifiers-and-decorators.rst b/docs/classifiers-and-decorators.rst index afda7c4..f12e944 100644 --- a/docs/classifiers-and-decorators.rst +++ b/docs/classifiers-and-decorators.rst @@ -69,8 +69,8 @@ relationship ID with a single request. "module-z:Weekend" ], "entityIds": [ - "urn:3gpp:dn:ManagedElement=1,GNBDUFunction=1,NRCellDU=1", - "urn:3gpp:dn:ManagedElement=1,GNBDUFunction=1,NRCellDU=2" + "urn:3gpp:dn:ManagedElement=1,ODUFunction=1,NRCellDU=1", + "urn:3gpp:dn:ManagedElement=1,ODUFunction=1,NRCellDU=2" ], "relationshipIds": [ "urn:o-ran:smo:teiv:sha512:NRCELLDU_USES_NRSECTORCARRIER=CA576F4716C36A1BD1C506DCB58418FC731858D3D3F856F536813A8C4D3F1CC21292E506815410E04496D709D96066EBC0E4890DEFC3789EDC4BD9C28DA1D52B" @@ -101,8 +101,8 @@ a single relationship ID with a single request. "module-y:vendor": "Ericsson" }, "entityIds": [ - "urn:3gpp:dn:ManagedElement=1,GNBDUFunction=1,NRCellDU=1", - "urn:3gpp:dn:ManagedElement=1,GNBDUFunction=1,NRCellDU=2" + "urn:3gpp:dn:ManagedElement=1,ODUFunction=1,NRCellDU=1", + "urn:3gpp:dn:ManagedElement=1,ODUFunction=1,NRCellDU=2" ], "relationshipIds": [ "urn:o-ran:smo:teiv:sha512:NRCELLDU_USES_NRSECTORCARRIER=CA576F4716C36A1BD1C506DCB58418FC731858D3D3F856F536813A8C4D3F1CC21292E506815410E04496D709D96066EBC0E4890DEFC3789EDC4BD9C28DA1D52B" diff --git a/docs/data-models/cloud.rst b/docs/data-models/cloud.rst index 8473c36..e7a99fe 100644 --- a/docs/data-models/cloud.rst +++ b/docs/data-models/cloud.rst @@ -6,9 +6,9 @@ Cloud ----- -.. image:: ../_static/data-model/cloud.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-cloud.svg -.. image:: ../_static/data-model/cloud-relationships.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-cloud-rel.svg .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-cloud.yang :language: yang diff --git a/docs/data-models/equipment.rst b/docs/data-models/equipment.rst index eecb3aa..856c1b6 100644 --- a/docs/data-models/equipment.rst +++ b/docs/data-models/equipment.rst @@ -6,11 +6,10 @@ Equipment --------- -.. image:: ../_static/data-model/equipment.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-equipment.svg :width: 900 -.. image:: ../_static/data-model/equipment-relationships.svg - :width: 900 +.. image:: ../_static/data-model/o-ran-smo-teiv-equipment-rel.svg .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-equipment.yang :language: yang diff --git a/docs/data-models/oam.rst b/docs/data-models/oam.rst index e45297d..1c049c3 100644 --- a/docs/data-models/oam.rst +++ b/docs/data-models/oam.rst @@ -6,7 +6,7 @@ OAM --- -.. image:: ../_static/data-model/oam.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-oam.svg :width: 900 .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-oam.yang diff --git a/docs/data-models/ran.rst b/docs/data-models/ran.rst index e9f53ef..a014c2e 100644 --- a/docs/data-models/ran.rst +++ b/docs/data-models/ran.rst @@ -6,10 +6,10 @@ RAN --- -.. image:: ../_static/data-model/ran.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-ran.svg :width: 900 -.. image:: ../_static/data-model/ran-relationships.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-ran-rel.svg :width: 900 .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-ran.yang diff --git a/docs/data-models/rel-cloud-ran.rst b/docs/data-models/rel-cloud-ran.rst index 217c299..a188a14 100644 --- a/docs/data-models/rel-cloud-ran.rst +++ b/docs/data-models/rel-cloud-ran.rst @@ -6,7 +6,7 @@ Relationship: CLOUD RAN ----------------------- -.. image:: ../_static/data-model/cloud-ran-relationships.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-rel-cloud-ran-rel.svg :width: 900 .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-rel-cloud-ran.yang diff --git a/docs/data-models/rel-equipment-ran.rst b/docs/data-models/rel-equipment-ran.rst index 9408a00..0ea864a 100644 --- a/docs/data-models/rel-equipment-ran.rst +++ b/docs/data-models/rel-equipment-ran.rst @@ -6,8 +6,7 @@ Relationship: Equipment RAN --------------------------- -.. image:: ../_static/data-model/equipment-ran.svg - :width: 900 +.. image:: ../_static/data-model/o-ran-smo-teiv-rel-equipment-ran-rel.svg .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-rel-equipment-ran.yang :language: yang diff --git a/docs/data-models/rel-oam-cloud.rst b/docs/data-models/rel-oam-cloud.rst index a7bfd8f..9629d38 100644 --- a/docs/data-models/rel-oam-cloud.rst +++ b/docs/data-models/rel-oam-cloud.rst @@ -6,7 +6,7 @@ Relationship: OAM CLOUD ----------------------- -.. image:: ../_static/data-model/oam-cloud-relationships.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-rel-oam-cloud-rel.svg .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-rel-oam-cloud.yang :language: yang diff --git a/docs/data-models/rel-oam-ran.rst b/docs/data-models/rel-oam-ran.rst index 4dc6b60..08f903f 100644 --- a/docs/data-models/rel-oam-ran.rst +++ b/docs/data-models/rel-oam-ran.rst @@ -6,7 +6,7 @@ Relationship: OAM RAN --------------------- -.. image:: ../_static/data-model/oam-ran.svg +.. image:: ../_static/data-model/o-ran-smo-teiv-rel-oam-ran-rel.svg :width: 900 .. literalinclude:: ../../teiv/src/main/resources/models/o-ran-smo-teiv-rel-oam-ran.yang diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst index e1fd098..ec83aa1 100644 --- a/docs/developer-guide.rst +++ b/docs/developer-guide.rst @@ -81,8 +81,8 @@ the originating side (A-side) and the other is the terminating side relationship itself which must be unique. A relationship between two entities is based on the effect that one has on the other. An entity can have one or multiple relationships which can be defined by the user. A -possible relationship between ManagedElement and GNBDUFunction can be -*MANAGEDELEMENT_MANAGES_GNBDUFUNCTION*. +possible relationship between ManagedElement and ODUFunction can be +*MANAGEDELEMENT_MANAGES_ODUFUNCTION*. Topology & Inventory models --------------------------- @@ -110,7 +110,7 @@ relationships in the RAN domain. A direct relationship is a connection between two entities without any in-between entity and an indirect relationship contains at least one. -NRCellDU has direct relationships with GNBDUFunction and +NRCellDU has direct relationships with ODUFunction and NRSectorCarrier, while it also has indirect relationships with ManagedElement, AntennaCapability, and AntennaModule. diff --git a/docs/discover-and-reconciliation-interface-guide.rst b/docs/discover-and-reconciliation-interface-guide.rst index 75c3fec..a36661e 100644 --- a/docs/discover-and-reconciliation-interface-guide.rst +++ b/docs/discover-and-reconciliation-interface-guide.rst @@ -331,8 +331,8 @@ Example: :: urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Ireland,SubNetwork=ERBS01,ManagedElement=me01: - MANAGEDELEMENT_MANAGES_ENODEBFUNCTION: - urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Ireland,SubNetwork=ERBS01,ManagedElement=me01,ENodeBFunction=1 + MANAGEDELEMENT_MANAGES_ORUFUNCTION: + urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Ireland,SubNetwork=ERBS01,ManagedElement=me01,ORUFunction=1 2. SHA-512 hash the previous format. @@ -340,7 +340,7 @@ Example: :: - 6D7E2A09E0F10C09548F86519084FDF1F021561FF07E116136D118E93568A0B4EA968A4B1E02B2CA4E057E00E582273DBE5A8CA1BF910FC65A9101117A0E9D7F + 055b47d817332b373cc042fe29c4fcfc8ebe1f5e467d0085defdd017294d723d0c8dd09a6ed593a67fe5dfccad272a71d7e15b7cf74bc1c23cb4b68c5a1d7510 3. Add the prefix **urn:o-ran:smo:teiv:sha512:** and the relationship type = the SHA-512 hashed as follows: @@ -352,7 +352,7 @@ Example: :: - urn:o-ran:smo:teiv:sha512:MANAGEDELEMENT_MANAGES_ENODEBFUNCTION=6D7E2A09E0F10C09548F86519084FDF1F021561FF07E116136D118E93568A0B4EA968A4B1E02B2CA4E057E00E582273DBE5A8CA1BF910FC65A9101117A0E9D7F + urn:o-ran:smo:teiv:sha512:MANAGEDELEMENT_MANAGES_ORUFUNCTION=055b47d817332b373cc042fe29c4fcfc8ebe1f5e467d0085defdd017294d723d0c8dd09a6ed593a67fe5dfccad272a71d7e15b7cf74bc1c23cb4b68c5a1d7510 Troubleshooting =============== diff --git a/docs/pgsql-schema-generator-guide.rst b/docs/pgsql-schema-generator-guide.rst index 9d79643..dd461de 100644 --- a/docs/pgsql-schema-generator-guide.rst +++ b/docs/pgsql-schema-generator-guide.rst @@ -271,7 +271,7 @@ These SQL entries include: Sample entries: -- **Hashed**: UNIQUE_GNBCUUPFunction_REL_ID_MANAGEDELEMENT_MANAGES_GNBCUUPFUNCTION, UNIQUE_BDB349CDF0C4055902881ECCB71F460AE1DD323E, CONSTRAINT +- **Hashed**: UNIQUE_OCUUPFunction_REL_ID_MANAGEDELEMENT_MANAGES_OCUUPFUNCTION, UNIQUE_BDB349CDF0C4055902881ECCB71F460AE1DD323E, CONSTRAINT - **Un-hashed**: NRSectorCarrier, NRSectorCarrier, TABLE +---------------+--------------------------+-----------------------------------------------------------+ diff --git a/docs/supported-filter-options.rst b/docs/supported-filter-options.rst index 081070d..2134393 100644 --- a/docs/supported-filter-options.rst +++ b/docs/supported-filter-options.rst @@ -40,43 +40,43 @@ be retrieved and filtered using the /attributes. | | | | | | | | | Name | | | | | +==========================================+========+================+==============+========================+========================+ -| | To return the ids for all instances of | RAN | GNBDUFunction | | | | All ids of every | -| | the entityTypeName used in the query. | | | | | | GNBDUFunction | +| | To return the ids for all instances of | RAN | ODUFunction | | | | All ids of every | +| | the entityTypeName used in the query. | | | | | | ODUFunction | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return all attributes of every | RAN | GNBDUFunction | /attributes | | | All GNBDUFunctions | +| | To return all attributes of every | RAN | ODUFunction | /attributes | | | All ODUFunctions | | | instance of the entityTypeName used | | | | | | with every attribute | | | in the query. | | | | | | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return every instance of the | RAN | GNBDUFunction | /attributes | | | All gNBIds of every | -| | entityTypeName used in the query, but | | | (gNBId) | | | GNBDUFunction | +| | To return every instance of the | RAN | ODUFunction | /attributes | | | All gNBIds of every | +| | entityTypeName used in the query, but | | | (gNBId) | | | ODUFunction | | | only the attribute that was | | | | | | | | defined in the *targetFilter* | | | | | | | | parameter. Note: The attribute must be | | | | | | | | a valid field of the object. | | | | | | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return every instance of the | RAN | GNBDUFunction | /attributes | | | All gNBIds and | +| | To return every instance of the | RAN | ODUFunction | /attributes | | | All gNBIds and | | | entityTypeName used in the query, but | | | | | | gNBIdLengths of | -| | only the attributes that were | | | (gNBId, | | | every GNBDUFunction | +| | only the attributes that were | | | (gNBId, | | | every ODUFunction | | | defined in the *targetFilter* | | | gNBIdLength) | | | | | parameter. Note: The attributes must | | | | | | | | be separated by a comma "," when | | | | | | | | using parenthesis "()". | | | | | | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return the ids for all instances of | RAN | GNBDUFunction | | /sourceIds | | Unique set of ids | -| | the entityTypeName used in the query, | | | | [contains (@item, | | of GNBDUFunctions, | +| | To return the ids for all instances of | RAN | ODUFunction | | /sourceIds | | Unique set of ids | +| | the entityTypeName used in the query, | | | | [contains (@item, | | of ODUFunctions, | | | that matches the given | | | | 'SubNetwork=Ireland')] | | where sourceIds | | | property in the *scopeFilter* | | | | | | contains | | | parameter. | | | | | | *SubNetwork=Ireland* | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return the ids for all instances of | RAN | GNBDUFunction | | /attributes | | Unique set of ids of | -| | the entityTypeName used in the query, | | | | [@gNBId | | GNBDUFunctions,where | +| | To return the ids for all instances of | RAN | ODUFunction | | /attributes | | Unique set of ids of | +| | the entityTypeName used in the query, | | | | [@gNBId | | ODUFunctions,where | | | that matches the given attributes in | | | | Length=3 and | | the gNBIdLength | | | the *scopeFilter* parameter. Note: The | | | | @gNBId=111] | | equals 3 and the | | | attributes must be separated by a | | | | | | gNBId equals 111 | | | *AND* or *OR*". | | | | | | +------------------------------------------+--------+----------------+--------------+------------------------+------------------------+ -| | To return the ids for all instances of | RAN | GNBDUFunction | | /attributes | | Unique set of ids of | -| | the entityTypeName used in the query, | | | | [@gNBId Length=3] | | | GNBDUFunctions, | +| | To return the ids for all instances of | RAN | ODUFunction | | /attributes | | Unique set of ids of | +| | the entityTypeName used in the query, | | | | [@gNBId Length=3] | | | ODUFunctions, | | | that satisfies one of | | | | | | where the | | | the conditions in the *scopeFilter* | | | | /sourceIds | | gNBIdLength equals 3 | | | parameter. A condition is a complete | | | | [contains (@item, | | or the sourceIds | @@ -101,16 +101,16 @@ The *entityTypeName* is used as the root of the queries. +------------------------------------------+-------------+----------------+--------------+----------------------------+--------------------------------------------------+ | Use case | domainName | entityTypeName | targetFilter | scopeFilter | Query result | +==========================================+=============+================+==============+============================+==================================================+ -| | To return the ids for all instances of | REL_OAM_RAN | GNBDUFunction | | /managed-by-managedElement | | All GNBDUFunction entities that are managed | +| | To return the ids for all instances of | REL_OAM_RAN | ODUFunction | | /managed-by-managedElement | | All ODUFunction entities that are managed | | | an entityTypeName related by an | | | | | | by any Managed Element. | | | association. | | | | | | +------------------------------------------+-------------+----------------+--------------+----------------------------+--------------------------------------------------+ -| | To return the ids for all instances of | REL_OAM_RAN | GNBDUFunction | | /managed-by-managedElement | | All GNBDUFunction entities that are managed | +| | To return the ids for all instances of | REL_OAM_RAN | ODUFunction | | /managed-by-managedElement | | All ODUFunction entities that are managed | | | an entityTypeName related by an | | | | [@id = 'urn\:3gpp:dn: | | by the Managed Element | | | association to another entity | | | | ManagedElement=1'] | | *urn\:3gpp:dn: ManagedElement=1*. | | | specified by its *id*. | | | | | | +------------------------------------------+-------------+----------------+--------------+----------------------------+--------------------------------------------------+ -| | To return the attributes for all | REL_OAM_RAN | GNBDUFunction | /attributes | /attributes [@enbId=1]; | | All GNBDUFunction entities with enbId as *1* | +| | To return the attributes for all | REL_OAM_RAN | ODUFunction | /attributes | /attributes [@enbId=1]; | | All ODUFunction entities with enbId as *1* | | | instances of an entityTypeName | | | | | | managed by the Managed Element | | | related by one or more associations | | | | /managed-by-managedElement | | *urn\:3gpp:dn: ManagedElement=1* or | | | to other entities specified by their | | | | [@id='urn\:3gpp:dn: | | *urn\:3gpp:dn: ManagedElement=2* | @@ -135,17 +135,17 @@ The *entityTypeName* is used as the root of the queries. | | | | | | | | | | | | | | | | +==========================================+=============+================+===================+=================+============================+=====================================================+ -| | To return the relationships for a | RAN | GNBDUFunction | urn\:3gpp:dn: | | | | All relations for the GNBDUFunction with id | -| | given entity specified by its id. | | | ManagedElement=1, | | | | *urn\:3gpp:dn: ManagedElement=1, GNBDUFunction=1* | -| | | | GNBDUFunction=1 | | | | +| | To return the relationships for a | RAN | ODUFunction | urn\:3gpp:dn: | | | | All relations for the ODUFunction with id | +| | given entity specified by its id. | | | ManagedElement=1, | | | | *urn\:3gpp:dn: ManagedElement=1, ODUFunction=1* | +| | | | ODUFunction=1 | | | | +------------------------------------------+-------------+----------------+-------------------+-----------------+----------------------------+-----------------------------------------------------+ -| | To return specific relationships for a | REL_OAM_RAN | GNBDUFunction | urn\:3gpp:dn: | /MANAGEDELEMENT | | | All *MANAGEDELEMENT _MANAGES _GNBDUFUNCTION* | -| | given entity specified by its id. | | | ManagedElement=1, | _MANAGES | | | relations for the GNBDUFunction with id | -| | | | GNBDUFunction=1 | _GNBDUFUNCTION | | | *urn\:3gpp:dn: ManagedElement=1, GNBDUFunction=1* | +| | To return specific relationships for a | REL_OAM_RAN | ODUFunction | urn\:3gpp:dn: | /MANAGEDELEMENT | | | All *MANAGEDELEMENT _MANAGES _ODUFUNCTION* | +| | given entity specified by its id. | | | ManagedElement=1, | _MANAGES | | | relations for the ODUFunction with id | +| | | | ODUFunction=1 | _ODUFUNCTION | | | *urn\:3gpp:dn: ManagedElement=1, ODUFunction=1* | +------------------------------------------+-------------+----------------+-------------------+-----------------+----------------------------+-----------------------------------------------------+ -| | To return specific relationships for | REL_OAM_RAN | GNBDUFunction | urn\:3gpp:dn: | | /managed-by-managedElement | | All *MANAGEDELEMENT _MANAGES _GNBDUFUNCTION* | -| | an entity specified by its id to | | | ManagedElement=1, | | [@id = 'urn\:3gpp:dn: | | relations for the GNBDUFunction with id | -| | another entity using its id and | | | GNBDUFunction=1 | | ManagedElement=1'] | | *urn\:3gpp:dn: ManagedElement=1, GNBDUFunction=1* | +| | To return specific relationships for | REL_OAM_RAN | ODUFunction | urn\:3gpp:dn: | | /managed-by-managedElement | | All *MANAGEDELEMENT _MANAGES _ODUFUNCTION* | +| | an entity specified by its id to | | | ManagedElement=1, | | [@id = 'urn\:3gpp:dn: | | relations for the ODUFunction with id | +| | another entity using its id and | | | ODUFunction=1 | | ManagedElement=1'] | | *urn\:3gpp:dn: ManagedElement=1, ODUFunction=1* | | | association. | | | | | | | where the managed element is | | | | | | | | | *urn\:3gpp:dn: ManagedElement=1*. | +------------------------------------------+-------------+----------------+-------------------+-----------------+----------------------------+-----------------------------------------------------+ @@ -163,13 +163,13 @@ Here, the *relationshipTypeName* is used as the root of the queries. | | | Type Name | | | | | | | | Filter | | | +==========================================+=============+=================+========+============================+=================================================+ -| | To return all relationships for a | REL_OAM_RAN | MANAGEDELEMENT | | | | All MANAGEDELEMENT_MANAGES_ENODEBFUNCTION | +| | To return all relationships for a | REL_OAM_RAN | MANAGEDELEMENT | | | | All MANAGEDELEMENT_MANAGES_ORUFUNCTION | | | specified relationship | | _MANAGES | | | | relationships | -| | | _ENODEBFUNCTION | | | | +| | | _ORUFUNCTION | | | | +------------------------------------------+-------------+-----------------+--------+----------------------------+-------------------------------------------------+ -| | To return all relationships for a | REL_OAM_RAN | MANAGEDELEMENT | | /managed-by-managedElement | | All MANAGEDELEMENT_MANAGES_ENODEBFUNCTION | +| | To return all relationships for a | REL_OAM_RAN | MANAGEDELEMENT | | /managed-by-managedElement | | All MANAGEDELEMENT_MANAGES_ORUFUNCTION | | | specified relationship type with a | | _MANAGES | | [@id='urn\:3gpp:dn: | | relationships having an association | -| | specified association to an entity. | | _ENODEBFUNCTION | | ManagedElement=1'] | | *managed-by-managedElement* to ManagedElement | +| | specified association to an entity. | | _ORUFUNCTION | | ManagedElement=1'] | | *managed-by-managedElement* to ManagedElement | | | | | | | | *urn\:3gpp:dn: ManagedElement=1*. | +------------------------------------------+-------------+-----------------+--------+----------------------------+-------------------------------------------------+ @@ -178,12 +178,12 @@ Here, the *relationshipTypeName* is used as the root of the queries. To get a relationship with a specific id, use: **/domains/{domainName}/relationship-types/{relationshipTypeName}/relationships/{relationshipId}** -**Example:** Get the *MANAGEDELEMENT_MANAGES_ENODEBFUNCTION* +**Example:** Get the *MANAGEDELEMENT_MANAGES_ORUFUNCTION* relationship with id *rel1* in the *REL_OAM_RAN* domain: :: - GET https:///topology-inventory//domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ENODEBFUNCTION/relationships/rel1 + GET https:///topology-inventory//domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ORUFUNCTION/relationships/rel1 Querying on classifiers and decorators ************************************** @@ -200,7 +200,7 @@ This functionality is supported by the following endpoints | | Name | Filter | | | +===========================================+========+========+=======================+==========================================+ | | Return all related entity IDs that are | RAN | | /classifiers[@item = | | All the entity IDs that are classified | -| | exactly matched with the specified | | | 'gnbdu-function-model | | with "gnbdu-function-model:Indoor" | +| | exactly matched with the specified | | | 'odu-function-model | | with "odu-function-model:Indoor" | | | classifier with given domain name. | | | :Indoor'] | | in RAN domain. | +-------------------------------------------+--------+--------+-----------------------+------------------------------------------+ | | Return all related entity IDs that are | RAN | | /classifiers[contains | | All the entity IDs that are partially | @@ -208,17 +208,17 @@ This functionality is supported by the following endpoints | | classifier with given domain name. | | | | | +-------------------------------------------+--------+--------+-----------------------+------------------------------------------+ | | Return all related entity IDs that are | RAN | | /decorators[ | | All the entity IDs that are exactly | -| | exactly matched with the key-value pair | | | @gnbdu-function-model | | matched with | -| | that specified decorators | | | :textdata = | | "gnbdu-function-model:textdata = | +| | exactly matched with the key-value pair | | | @odu-function-model | | matched with | +| | that specified decorators | | | :textdata = | | "odu-function-model:textdata = | | | with given domain name. | | | 'Stockholm'] | | 'Stockholm'" in RAN domain. | +-------------------------------------------+--------+--------+-----------------------+------------------------------------------+ | | Return all related entity IDs that are | RAN | | /decorators[contains( | | All the entity IDs that are exactly | -| | exactly matched with key parameter | | | @gnbdu-function-model | | matched with | -| | where the value of the decorator is | | | :textdata, "")] | | "gnbdu-function-model:textdata as key | +| | exactly matched with key parameter | | | @odu-function-model | | matched with | +| | where the value of the decorator is | | | :textdata, "")] | | "odu-function-model:textdata as key | | | unknown with given domain name. | | | | | of the decorator in RAN domain. | +-------------------------------------------+--------+--------+-----------------------+------------------------------------------+ -**Example:** Get the decorators *gnbdu-function-model:textdata = 'Stockholm' in the RAN domain* +**Example:** Get the decorators *odu-function-model:textdata = 'Stockholm' in the RAN domain* :: @@ -231,23 +231,23 @@ This functionality is supported by the following endpoints { "items": [ { - "o-ran-smo-teiv-ran:GNBDUFunction": [ + "o-ran-smo-teiv-ran:ODUFunction": [ { - "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=13,GNBDUFunction=13" + "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=13,ODUFunction=13" } ] }, { - "o-ran-smo-teiv-ran:GNBDUFunction": [ + "o-ran-smo-teiv-ran:ODUFunction": [ { - "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=14,GNBDUFunction=14" + "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=14,ODUFunction=14" } ] }, { - "o-ran-smo-teiv-ran:GNBDUFunction": [ + "o-ran-smo-teiv-ran:ODUFunction": [ { - "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=16,GNBDUFunction=16" + "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=16,ODUFunction=16" } ] } @@ -285,23 +285,23 @@ This functionality is supported by the following endpoints | | Return all related entity IDs and | NRCellDU | | /decorators | | All NRCellDU IDs and decorators. | | | decorators. | | | | | | +-------------------------------------+--------------+--------------+---------------------------+--------------------------------------------------------+---------------------------------------------------+ -| | Return all related entity IDs | NRCellDU | | | | /classifiers[@item = 'gnbdu-function-model:Indoor']; | | All NRCellDU IDs where key of the decorator is | -| | that are an exact match for the | | | | | /decorators[@gnbdu-function-model:textdata = | | "gnbdu-function-model:textdata" and the value | +| | Return all related entity IDs | NRCellDU | | | | /classifiers[@item = 'odu-function-model:Indoor']; | | All NRCellDU IDs where key of the decorator is | +| | that are an exact match for the | | | | | /decorators[@odu-function-model:textdata = | | "odu-function-model:textdata" and the value | | | given classifiers and decorators. | | | | | 'Stockholm'] | | of the decorator is 'Stockholm' and classifiers | -| | | | | | | exactly contain "gnbdu-function-model:Indoor". | +| | | | | | | exactly contain "odu-function-model:Indoor". | +-------------------------------------+--------------+--------------+---------------------------+--------------------------------------------------------+---------------------------------------------------+ | | Return all related entity IDs and | NRCellDU | | /classifiers | /classifiers[contains(@item, 'Ind')] | | All NRCellDU IDs and classifiers partially | | | classifiers that are partially | | | | | | contain the text "Ind". | | | matched for the given classifier. | | | | | | +-------------------------------------+--------------+--------------+---------------------------+--------------------------------------------------------+---------------------------------------------------+ -| | Return all related entity IDs and | NRCellDU | | /decorators | | /decorators[contains(@gnbdu-function-model:textdata, | | All NRCellDU IDs and where key of the decorator | -| | decorators where the key is an | | | | | 'Stoc')] | | is "gnbdu-function-model:textdata" and the | +| | Return all related entity IDs and | NRCellDU | | /decorators | | /decorators[contains(@odu-function-model:textdata, | | All NRCellDU IDs and where key of the decorator | +| | decorators where the key is an | | | | | 'Stoc')] | | is "odu-function-model:textdata" and the | | | exact match and the value is a | | | | | | value of the decorator partially contains | | | partial match. | | | | | | 'Stoc' | +-------------------------------------+--------------+--------------+---------------------------+--------------------------------------------------------+---------------------------------------------------+ | | Return all related entity IDs and | NRCellDU | | /classifiers; /decorators | | /classifiers[contains(@item, 'Ind')]; | | All NRCellDU IDs and decorators where the key | -| | decorators where the key is an | | | | | /decorators[contains(@gnbdu-function-model:textdata, | | of the decorator is | -| | exact match and the value is a | | | | | 'Stoc')] | | "gnbdu-function-model:textdata", the value of | +| | decorators where the key is an | | | | | /decorators[contains(@odu-function-model:textdata, | | of the decorator is | +| | exact match and the value is a | | | | | 'Stoc')] | | "odu-function-model:textdata", the value of | | | partial match. | | | | | | the decorator partially contains 'Stoc', and | | | | | | | | the classifiers partially contain "Ind". | +-------------------------------------+--------------+--------------+---------------------------+--------------------------------------------------------+---------------------------------------------------+ @@ -324,7 +324,7 @@ This functionality is supported by the following endpoints "classifiers": [ "o-ran-smo-teiv-ran:Rural" ], - "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=19,GNBDUFunction=19,NRCellDU=93" + "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=19,ODUFunction=19,NRCellDU=93" } ] } @@ -357,36 +357,36 @@ This functionality is supported by the following endpoints | | Name | | | | +===============================+========+=========================+====================+=============================+ | | Return all related | | MANAGEDELEMENT _MANAGES | /classifiers | | -| | relationship IDs and | | _ENODEBFUNCTION | | | +| | relationship IDs and | | _ORUFUNCTION | | | | | classifiers. | | | | | +-------------------------------+--------+-------------------------+--------------------+-----------------------------+ | | Return all related | | MANAGEDELEMENT _MANAGES | /decorators | | -| | relationship IDs and | | _ENODEBFUNCTION | | | +| | relationship IDs and | | _ORUFUNCTION | | | | | decorators. | | | | | +-------------------------------+--------+-------------------------+--------------------+-----------------------------+ | | Return related relationship | | MANAGEDELEMENT _MANAGES | | /classifiers[@item = | -| | IDs that match the | | _ENODEBFUNCTION | | 'gnbdu-function-model | +| | IDs that match the | | _ORUFUNCTION | | 'odu-function-model | | | classifier and decorator. | | | | :Indoor']; | | | | | | | -| | | | | /decorators[@gnbdu-function | +| | | | | /decorators[@odu-function | | | | | | -model:textdata = | | | | | | 'Stockholm'] | +-------------------------------+--------+-------------------------+--------------------+-----------------------------+ | | Return related relationship | | MANAGEDELEMENT _MANAGES | /classifiers | /classifiers[contains | -| | IDs and classifiers that | | _ENODEBFUNCTION | | (@item, 'Ind')] | +| | IDs and classifiers that | | _ORUFUNCTION | | (@item, 'Ind')] | | | are partially matched | | | | | | | for the classifier. | | | | | +-------------------------------+--------+-------------------------+--------------------+-----------------------------+ | | Return related relationship | | MANAGEDELEMENT _MANAGES | /decorators | /decorators[contains | -| | IDs and decorators where | | _ENODEBFUNCTION | | (@gnbdu-function-model: | +| | IDs and decorators where | | _ORUFUNCTION | | (@odu-function-model: | | | the key matches exactly and | | | | textdata, 'Stock')] | | | the value matches | | | | | | | partially. | | | | | +-------------------------------+--------+-------------------------+--------------------+-----------------------------+ | | Return related relationship | | MANAGEDELEMENT _MANAGES | | /classifiers | /classifiers[contains | -| | IDs, decorators, and | | _ENODEBFUNCTION | | /decorators | (@item, 'Ind')]; | +| | IDs, decorators, and | | _ORUFUNCTION | | /decorators | (@item, 'Ind')]; | | | classifiers where decorator | | | | /decorators[contains | -| | key is exact and value | | | | (@gnbdu-function-model: | +| | key is exact and value | | | | (@odu-function-model: | | | partially matches, and | | | | textdata, 'Stock')] | | | classifiers partially match | | | | | | | the parameters. | | | | | @@ -400,33 +400,33 @@ This functionality is supported by the following endpoints { "items": [ { - "o-ran-smo-teiv-rel-oam-ran:MANAGEDELEMENT_MANAGES_GNBDUFUNCTION": [ + "o-ran-smo-teiv-rel-oam-ran:MANAGEDELEMENT_MANAGES_ODUFUNCTION": [ { - "bSide": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=10,GNBDUFunction=10", + "bSide": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=10,ODUFunction=10", "aSide": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=10", "classifiers": [ "o-ran-smo-teiv-ran:Rural", "o-ran-smo-teiv-ran:Weekend" ], - "id": "urn:o-ran:smo:teiv:sha512:MANAGEDELEMENT_MANAGES_GNBDUFUNCTION=661A89AD3C2702233CD9E96E97E738C05C35EC5FDF32DC78D149B773726350067315B72448D004C938BCD0263F0C4BCCC8A5F9CDD145B9B740983D1523664328" + "id": "urn:o-ran:smo:teiv:sha512:MANAGEDELEMENT_MANAGES_ODUFUNCTION=661A89AD3C2702233CD9E96E97E738C05C35EC5FDF32DC78D149B773726350067315B72448D004C938BCD0263F0C4BCCC8A5F9CDD145B9B740983D1523664328" } ] } ], "self": { - "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_GNBDUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" + "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ODUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" }, "first": { - "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_GNBDUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" + "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ODUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" }, "prev": { - "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_GNBDUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" + "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ODUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" }, "next": { - "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_GNBDUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" + "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ODUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" }, "last": { - "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_GNBDUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" + "href": "/domains/REL_OAM_RAN/relationship-types/MANAGEDELEMENT_MANAGES_ODUFUNCTION/relationships?offset=0&limit=500&scopeFilter=/classifiers[@item = 'o-ran-smo-teiv-ran:Rural']&targetFilter=/classifiers" }, "totalCount": 1 } \ No newline at end of file diff --git a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGenerator.java b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGenerator.java index 35b6a92..8245b66 100644 --- a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGenerator.java +++ b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGenerator.java @@ -27,9 +27,9 @@ import guru.nidi.graphviz.model.Factory; import guru.nidi.graphviz.model.MutableGraph; import guru.nidi.graphviz.model.MutableNode; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.oran.smo.teiv.pgsqlgenerator.Attribute; import org.oran.smo.teiv.pgsqlgenerator.Entity; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -49,6 +49,9 @@ public class EntityGraphGenerator { @Value("${graphs.output}") private String graphOutput; + @Autowired + private final HelperFunctions helperFunctions = new HelperFunctions(); + public void generate(List entities) throws IOException { if (generateEntityGraph) { List moduleNames = entities.stream().map(Entity::getModuleReferenceName).distinct().toList(); @@ -71,9 +74,9 @@ public class EntityGraphGenerator { } private MutableGraph prepareGraph(List moduleEntities, String moduleName) { + Color fillColour = Color.rgba(helperFunctions.getNodeFillColour(moduleName)).fill(); MutableGraph g = Factory.mutGraph(moduleName).setDirected(true).graphAttrs().add(Rank.dir(RankDir.LEFT_TO_RIGHT)) - .nodeAttrs().add(Shape.RECT, Style.BOLD, Color.BLACK, Style.FILLED, Color.LIGHTGRAY.fill(), Font.name( - "Arial")); + .nodeAttrs().add(Shape.RECT, Style.BOLD, Color.BLACK, Style.FILLED, fillColour, Font.name("Arial")); MutableNode moduleNameNode = Factory.mutNode(moduleName).attrs().add(Color.LIGHTBLUE.fill()); g.add(moduleNameNode); for (Entity moduleEntity : moduleEntities) { @@ -93,7 +96,7 @@ public class EntityGraphGenerator { String label = ""; for (Attribute attribute : attributes) { label = label.concat(""); } label = label.concat("
" + attribute - .getName() + " " + escapeHtml(attribute + .getName() + " " + helperFunctions.escapeHtml(attribute .getYangDataType()) + "
"); @@ -102,8 +105,4 @@ public class EntityGraphGenerator { graph.add(attributeNode); graph.add(moduleNode.addLink(attributeNode)); } - - private String escapeHtml(String text) { - return StringUtils.replaceEach(text, new String[] { "<", ">" }, new String[] { "<", ">" }); - } } diff --git a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGeneratorUml.java b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGeneratorUml.java index 9cd0e0a..54aa6f0 100644 --- a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGeneratorUml.java +++ b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/EntityGraphGeneratorUml.java @@ -27,6 +27,7 @@ import java.util.List; import org.oran.smo.teiv.pgsqlgenerator.Attribute; import org.oran.smo.teiv.pgsqlgenerator.Entity; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import lombok.extern.slf4j.Slf4j; @@ -41,6 +42,9 @@ public class EntityGraphGeneratorUml { @Value("${graphs.output}") private String graphOutput; + @Autowired + private final HelperFunctions helperFunctions = new HelperFunctions(); + public void generate(List entities) throws IOException { if (generateEntityGraph) { List moduleNames = entities.stream().map(Entity::getModuleReferenceName).distinct().toList(); @@ -67,7 +71,7 @@ public class EntityGraphGeneratorUml { StringBuilder sb = new StringBuilder(); sb.append("@startuml\n"); sb.append("skinparam class {\n"); - sb.append(" BackgroundColor<> LightGray\n"); + sb.append(" BackgroundColor<> " + helperFunctions.getNodeFillColour(moduleName) + " \n"); sb.append(" BackgroundColor<> LightBlue\n"); sb.append("}\n"); sb.append(String.format("class %s <> {\n}\n", moduleName)); diff --git a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/HelperFunctions.java b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/HelperFunctions.java new file mode 100644 index 0000000..4a375ec --- /dev/null +++ b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/HelperFunctions.java @@ -0,0 +1,57 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2024 Ericsson + * Modifications Copyright (C) 2024 OpenInfra Foundation Europe + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.oran.smo.teiv.pgsqlgenerator.graphgenerator; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +public class HelperFunctions { + + @Value("${graphs.relationship-entities-bg-colour}") + private boolean bgColour; + + public String getNodeFillColour(String input) { + if (bgColour) { + int hash = input.hashCode(); + + int r = (hash >> 16) & 0xFF; + int g = (hash >> 8) & 0xFF; + int b = hash & 0xFF; + + return String.format("#%02X%02X%02X%02X", r, g, b, 65); + } + return "#FFFFFFFF"; + } + + public String getCardinality(long minCardinality, long maxCardinality) { + return formatCardinality(minCardinality) + ".." + formatCardinality(maxCardinality); + } + + public String formatCardinality(long cardinality) { + return cardinality == Long.MAX_VALUE ? "*" : String.valueOf(cardinality); + } + + public String escapeHtml(String text) { + return StringUtils.replaceEach(text, new String[] { "<", ">" }, new String[] { "<", ">" }); + } +} diff --git a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGenerator.java b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGenerator.java index d1737d9..173e4ad 100644 --- a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGenerator.java +++ b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGenerator.java @@ -27,6 +27,7 @@ import guru.nidi.graphviz.attribute.EndLabel; import guru.nidi.graphviz.attribute.Font; import guru.nidi.graphviz.attribute.ForAll; import guru.nidi.graphviz.attribute.Shape; +import guru.nidi.graphviz.attribute.Style; import guru.nidi.graphviz.model.Factory; import guru.nidi.graphviz.model.MutableGraph; import guru.nidi.graphviz.model.MutableNode; @@ -36,6 +37,7 @@ import guru.nidi.graphviz.engine.Format; import guru.nidi.graphviz.engine.Graphviz; import org.oran.smo.teiv.pgsqlgenerator.Entity; import org.oran.smo.teiv.pgsqlgenerator.Relationship; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -53,6 +55,9 @@ public class RelationshipGraphGenerator { @Value("${graphs.output}") private String graphOutput; + @Autowired + private final HelperFunctions helperFunctions = new HelperFunctions(); + public void generate(List relationships, List entities) throws IOException { if (generateRelationshipGraph) { List moduleNames = relationships.stream().map(Relationship::getModuleReferenceName).distinct().toList(); @@ -82,36 +87,27 @@ public class RelationshipGraphGenerator { MutableGraph g = Factory.mutGraph("moduleName").setDirected(true).linkAttrs().add(Color.DARKSLATEGRAY4, arialFont) .nodeAttrs().add(Shape.BOX, arialFont); for (Entity moduleEntity : moduleEntities) { - MutableNode node = Factory.mutNode(moduleEntity.getEntityName()); + Color fillColour = Color.rgba(helperFunctions.getNodeFillColour(moduleEntity.getModuleReferenceName())).fill(); + MutableNode node = Factory.mutNode(moduleEntity.getEntityName()).attrs().add(Style.FILLED, fillColour); g.add(node); } for (Relationship moduleRelationship : moduleRelationships) { - MutableNode nodeA = Factory.mutNode(moduleRelationship.getASideMOType()); + MutableNode nodeA = Factory.mutNode(moduleRelationship.getASideMOType()).attrs().add(Style.FILLED, Color.rgba( + helperFunctions.getNodeFillColour(moduleRelationship.getASideModule())).fill()); g.add(nodeA); - MutableNode nodeB = Factory.mutNode(moduleRelationship.getBSideMOType()); + MutableNode nodeB = Factory.mutNode(moduleRelationship.getBSideMOType()).attrs().add(Style.FILLED, Color.rgba( + helperFunctions.getNodeFillColour(moduleRelationship.getBSideModule())).fill()); g.add(nodeB); String label = moduleRelationship.getName().split("_")[1]; - Label aSideCardinality = Label.of(getCardinality(moduleRelationship.getASideMinCardinality(), moduleRelationship - .getASideMaxCardinality())); - Label bSideCardinality = Label.of(getCardinality(moduleRelationship.getBSideMinCardinality(), moduleRelationship - .getBSideMaxCardinality())); + Label aSideCardinality = Label.of(helperFunctions.getCardinality(moduleRelationship.getASideMinCardinality(), + moduleRelationship.getASideMaxCardinality())); + Label bSideCardinality = Label.of(helperFunctions.getCardinality(moduleRelationship.getBSideMinCardinality(), + moduleRelationship.getBSideMaxCardinality())); g.add(nodeA.addLink(Factory.to(nodeB).with(Label.of(label), EndLabel.head(aSideCardinality, null, null), EndLabel.tail(bSideCardinality, null, null), Arrow.VEE))); } return g; } - - private String getCardinality(long minCardinality, long maxCardinality) { - return formatCardinality(minCardinality) + ".." + formatCardinality(maxCardinality); - } - - private String formatCardinality(long cardinality) { - if (cardinality == Long.MAX_VALUE) { - return "*"; - } else { - return String.valueOf(cardinality); - } - } } diff --git a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGeneratorUml.java b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGeneratorUml.java index 692771f..50202e3 100644 --- a/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGeneratorUml.java +++ b/pgsql-schema-generator/src/main/java/org/oran/smo/teiv/pgsqlgenerator/graphgenerator/RelationshipGraphGeneratorUml.java @@ -27,6 +27,7 @@ import java.util.List; import org.oran.smo.teiv.pgsqlgenerator.Entity; import org.oran.smo.teiv.pgsqlgenerator.Relationship; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -42,6 +43,9 @@ public class RelationshipGraphGeneratorUml { @Value("${graphs.output}") private String graphOutput; + @Autowired + private final HelperFunctions helperFunctions = new HelperFunctions(); + public void generate(List relationships, List entities) throws IOException { if (generateRelationshipGraph) { List moduleNames = relationships.stream().map(Relationship::getModuleReferenceName).distinct().toList(); @@ -72,14 +76,15 @@ public class RelationshipGraphGeneratorUml { sb.append("@startuml\n"); sb.append("skinparam componentStyle rectangle\n"); for (Entity entity : entities) { - sb.append(String.format("class %s {\n", entity.getEntityName())); + sb.append(String.format("class %s %s {\n", entity.getEntityName(), helperFunctions.getNodeFillColour(entity + .getModuleReferenceName()))); sb.append("}\n"); } for (Relationship relationship : relationships) { String label = relationship.getName().split("_")[1]; - String aSideCardinality = getCardinality(relationship.getASideMinCardinality(), relationship + String aSideCardinality = helperFunctions.getCardinality(relationship.getASideMinCardinality(), relationship .getASideMaxCardinality()); - String bSideCardinality = getCardinality(relationship.getBSideMinCardinality(), relationship + String bSideCardinality = helperFunctions.getCardinality(relationship.getBSideMinCardinality(), relationship .getBSideMaxCardinality()); sb.append(String.format("%s \"%s\" --> \"%s\" %s : %s\n", relationship.getASideMOType(), aSideCardinality, @@ -88,12 +93,4 @@ public class RelationshipGraphGeneratorUml { sb.append("@enduml\n"); return sb.toString(); } - - private String getCardinality(long minCardinality, long maxCardinality) { - return formatCardinality(minCardinality) + ".." + formatCardinality(maxCardinality); - } - - private String formatCardinality(long cardinality) { - return cardinality == Long.MAX_VALUE ? "*" : String.valueOf(cardinality); - } } diff --git a/pgsql-schema-generator/src/main/resources/application.yaml b/pgsql-schema-generator/src/main/resources/application.yaml index 21a8b06..1464aab 100644 --- a/pgsql-schema-generator/src/main/resources/application.yaml +++ b/pgsql-schema-generator/src/main/resources/application.yaml @@ -42,4 +42,5 @@ exclusions: model-names: metadata, decorators graphs: generate: true + relationship-entities-bg-colour: true output: target/graphs diff --git a/pgsql-schema-generator/src/test/resources/application.yaml b/pgsql-schema-generator/src/test/resources/application.yaml index c234b3f..cabe4ce 100644 --- a/pgsql-schema-generator/src/test/resources/application.yaml +++ b/pgsql-schema-generator/src/test/resources/application.yaml @@ -47,4 +47,5 @@ exclusions: model-names: metadata, decorators graphs: generate: true + relationship-entities-bg-colour: true output: target/test-classes/graphs \ No newline at end of file -- 2.16.6