Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / o-ran-sc-topology / o-ran-sc-topology.yang
1 module o-ran-sc-topology {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:yang:o-ran-sc-topology:1.0";
4   prefix osct;
5
6   import tapi-common {
7     prefix tapi-common;
8   }
9   import tapi-topology {
10     prefix tapi-topology;
11   }
12   import o-ran-sc-topology-common {
13     prefix osctc;
14   }
15
16   organization
17     "O-RAN Software Community";
18   contact
19     "www.o-ran.org";
20   description
21     "This module contains YANG definitions for the O-RAN Topology augmentation
22      of TAPI Topology.
23
24      Copyright 2022 the O-RAN Software Community.
25
26      Licensed under the Apache License, Version 2.0 (the 'License');
27      you may not use this file except in compliance with the License.
28      You may obtain a copy of the License at
29
30      http://www.apache.org/licenses/LICENSE-2.0
31
32      Unless required by applicable law or agreed to in writing, software
33      distributed under the License is distributed on an 'AS IS' BASIS,
34      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35      See the License for the specific language governing permissions and
36      limitations under the License.";
37
38   revision 2022-02-05 {
39     description
40       "Initial revision";
41     reference
42       "O-RAN-SC: https://jira.o-ran-sc.org/browse/OAM-248";
43   }
44
45   typedef geographic-coordinate-degree {
46     type decimal64 {
47       fraction-digits 8;
48     }
49     description
50       "Decimal degree (DD) used to express latitude and longitude
51        geographic coordinates.
52        Copied from ietf-te-topology@2020-08-06.yang";
53   }
54
55   // geographic-coordinate-degree
56
57   grouping geolocation-container {
58     description
59       "Contains a GPS location.
60        Copied from ietf-te-topology@2020-08-06.yang";
61     container geolocation {
62       description
63         "Contains a GPS location.";
64       leaf altitude {
65         type int64;
66         units "millimeters";
67         description
68           "Distance above sea level.";
69       }
70       leaf latitude {
71         type geographic-coordinate-degree {
72           range "-90..90";
73         }
74         description
75           "Relative position north or south on the Earth's surface.";
76       }
77       leaf longitude {
78         type geographic-coordinate-degree {
79           range "-180..180";
80         }
81         description
82           "Angular distance east or west on the Earth's surface.";
83       }
84     }
85     // geolocation
86   }
87
88   augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
89     description
90       "Augments the TAPI Topology node Context with geolocation information.";
91     uses geolocation-container;
92   }
93
94   augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node" {
95     description
96       "Augments the TAPI Topology node Context with the (network) function type";
97     leaf function {
98       type identityref {
99         base osctc:function-type;
100       }
101       description
102         "The type of the (Network) Function.";
103     }
104   }
105
106   augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {
107     description
108       "Augments the TAPI Topology Owned Node Edge Points with the (network) function type";
109     leaf function {
110       type identityref {
111         base osctc:interface-type;
112       }
113       description
114         "The type of the Node Edge Point interface type.";
115     }
116   }
117 }