Add TAPI Topology simulated network function type.
[sim/o1-interface.git] / ntsimulator / deploy / smo-nts-ng-topology-server / yang / o-ran-topology.yang
1 module o-ran-topology {
2   yang-version 1.1;
3   namespace "urn:o-ran-common:topology:1.0";
4   prefix o-ran-topo;
5
6   import tapi-common {
7     prefix tapi-common;
8   }
9   import tapi-topology {
10     prefix tapi-topology;
11   }
12   import o-ran-common-identity-refs {
13     prefix o-ran-common;
14   }
15
16   organization
17     "O-RAN Alliance";
18   contact
19     "www.o-ran.org";
20   description
21     "This module contains YANG definitions for the O-RAN Topology augmentation of TAPI Topology.";
22
23   revision 2021-08-06 {
24     description
25       "Initial revision";
26     reference
27       "O-RAN";
28   }
29
30   typedef geographic-coordinate-degree {
31     type decimal64 {
32       fraction-digits 8;
33     }
34     description
35       "Decimal degree (DD) used to express latitude and longitude
36        geographic coordinates.
37        Copied from ietf-te-topology@2020-08-06.yang";
38   }
39
40   // geographic-coordinate-degree
41
42   grouping geolocation-container {
43     description
44       "Contains a GPS location.
45        Copied from ietf-te-topology@2020-08-06.yang";
46     container geolocation {
47       description
48         "Contains a GPS location.";
49       leaf altitude {
50         type int64;
51         units "millimeters";
52         description
53           "Distance above sea level.";
54       }
55       leaf latitude {
56         type geographic-coordinate-degree {
57           range "-90..90";
58         }
59         description
60           "Relative position north or south on the Earth's surface.";
61       }
62       leaf longitude {
63         type geographic-coordinate-degree {
64           range "-180..180";
65         }
66         description
67           "Angular distance east or west on the Earth's surface.";
68       }
69     }
70     // geolocation
71   }
72
73   augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
74     description
75       "Augments the TAPI Topology node Context with geolocation information.";
76     uses geolocation-container;
77   }
78
79   augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
80     description
81       "Augments the TAPI Topology node Context with the network function type";
82     leaf function {
83       type identityref {
84         base o-ran-common:o-ran-function-base;
85       }
86       description
87         "The type of the Network Function.";
88     }
89   }
90 }