+module o-ran-sc-topology {
+ yang-version 1.1;
+ namespace "urn:o-ran-sc:yang:o-ran-sc-topology:1.0";
+ prefix osct;
+
+ import tapi-common {
+ prefix tapi-common;
+ }
+ import tapi-topology {
+ prefix tapi-topology;
+ }
+ import o-ran-sc-topology-common {
+ prefix osctc;
+ }
+
+ organization
+ "O-RAN Software Community";
+ contact
+ "www.o-ran.org";
+ description
+ "This module contains YANG definitions for the O-RAN Topology augmentation
+ of TAPI Topology.
+
+ Copyright 2022 the O-RAN Software Community.
+
+ 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.";
+
+ revision 2022-02-05 {
+ description
+ "Initial revision";
+ reference
+ "O-RAN-SC: https://jira.o-ran-sc.org/browse/OAM-248";
+ }
+
+ typedef geographic-coordinate-degree {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "Decimal degree (DD) used to express latitude and longitude
+ geographic coordinates.
+ Copied from ietf-te-topology@2020-08-06.yang";
+ }
+
+ // geographic-coordinate-degree
+
+ grouping geolocation-container {
+ description
+ "Contains a GPS location.
+ Copied from ietf-te-topology@2020-08-06.yang";
+ container geolocation {
+ description
+ "Contains a GPS location.";
+ leaf altitude {
+ type int64;
+ units "millimeters";
+ description
+ "Distance above sea level.";
+ }
+ leaf latitude {
+ type geographic-coordinate-degree {
+ range "-90..90";
+ }
+ description
+ "Relative position north or south on the Earth's surface.";
+ }
+ leaf longitude {
+ type geographic-coordinate-degree {
+ range "-180..180";
+ }
+ description
+ "Angular distance east or west on the Earth's surface.";
+ }
+ }
+ // geolocation
+ }
+
+ augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
+ description
+ "Augments the TAPI Topology node Context with geolocation information.";
+ uses geolocation-container;
+ }
+
+ augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
+ description
+ "Augments the TAPI Topology node Context with the (network) function type";
+ leaf function {
+ type identityref {
+ base osctc:function-type ;
+ }
+ description
+ "The type of the (Network) Function.";
+ }
+ }
+ augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {
+ description
+ "Augments the TAPI Topology Owned Node Edge Points with the (network) function type";
+ leaf function {
+ type identityref {
+ base osctc:interface-type ;
+ }
+ description
+ "The type of the Node Edge Point interface type.";
+ }
+ }
+}