Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / template / yes-o1-notify-pnf-registration.yang
1 module yes-o1-notify-pnf-registration {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:params:xml:ns:yang:yes-o1-notify-pnf-registration";
4   prefix ypr;
5
6   import yang-based-event-stream {
7     prefix yes;
8     reference
9       "wiki.opnfv.org/display/ves/VES+goes+YES";
10   }
11   import yes-types {
12     prefix yt;
13     reference
14       "wiki.opnfv.org/display/ves/VES+goes+YES";
15   }
16   import ietf-inet-types {
17     prefix inet;
18     reference
19       "RFC 6991: YANG data types for Internet addresses and related
20        things.";
21   }
22   import ietf-yang-types {
23     prefix yang;
24     reference
25       "RFC 6991: Common YANG Data Types.";
26   }
27
28   organization
29     "O-RAN Software Community";
30   contact
31     "www.o-ran-sc.org";
32   description
33     "This module is inspired by VES 7.1.1 but uses YANG concepts and types to
34      describe the exchanged data format.
35      The module yes-o1-notify-pnf-registration is only required, if the
36      network function does not support NETCONF CALL HOME but RESTCONF
37      asynchronous messages
38
39      Due to the different hardware definitions by 3GPP and by IETF two
40      additional and complimentary yang models are available. It is recommended
41      that the NETCONF-Server offers an implementation at least of one of the
42      following additional yang modules:
43
44       - yes-o1-notify-pnf-registration-3gpp-hardware
45       - yes-o1-notify-pnf-registration-ietf-hardware
46
47      Copyright 2022 highstreet technologies GmbH and others.
48
49      Licensed under the Apache License, Version 2.0 (the 'License');
50      you may not use this file except in compliance with the License.
51      You may obtain a copy of the License at
52
53       http://www.apache.org/licenses/LICENSE-2.0
54
55      Unless required by applicable law or agreed to in writing, software
56      distributed under the License is distributed on an 'AS IS' BASIS,
57      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
58      See the License for the specific language governing permissions and
59      limitations under the License.";
60
61   revision 2022-09-12 {
62     description
63       "Initial version;
64        including feedback from WG4 about the usage of RFC 8348.";
65     reference
66       "ONAP SDN-R: wiki.onap.org/display/DW/SDN-R
67        VES: wiki.opnfv.org/display/ves/VES+Home
68             docs.onap.org/en/frankfurt/submodules/dcaegen2.git/docs/sections/services/ves-http
69        YES: wiki.opnfv.org/display/ves/VES+goes+YES
70        O-RAN Operations and Maintenance Interface Specification (O-RAN.WG10.O1-Interface.0-v07.00)
71              section 2.7.2.4 Operations and Notifications
72        RFC 8348: A YANG Data Model for Hardware Management";
73   }
74
75   /*
76    * Identities
77    */
78
79   identity o1-notify-pnf-registration {
80     base yt:domain-id;
81     description
82       "Indicates, that the event body contains o1-notify-nf-registration
83        asynchronous message context.";
84   }
85
86   /*
87    * Groupings
88    */
89
90   grouping o1-notify-pnf-registration-grp {
91     leaf object-class {
92       type string {
93         length "3..255";
94       }
95       mandatory true;
96       description
97         "The name of the object class describing a PNF in the context of
98          PNF registration. ";
99     }
100     leaf object-instance {
101       type yt:resource;
102       mandatory true;
103       description
104         "Reference to the object representing the PNF.";
105     }
106     leaf notification-identifier {
107       type uint64;
108       mandatory true;
109       description
110         "An notification identifier of this event as defined in ITU-T Rec. X.733.";
111       reference
112         "ITU-T Rec. X.733 - section 8.1.2.8.";
113     }
114     leaf notification-type {
115       type yt:domain-id;
116       mandatory true;
117       description
118         "Only the domain identity 'o1-notify-pnf-registration' is allowed.";
119     }
120     leaf event-time {
121       type yang:date-and-time;
122       mandatory true;
123       description
124         "The earliest time aka epoch time associated with the event from
125          any component.";
126     }
127     leaf system-distinguished-name {
128       type string;
129       mandatory true;
130       description
131         "Distinguished Name of the management service provider of the notification";
132     }
133     leaf o1-specification-version {
134       type string {
135         length "1..5";
136       }
137       mandatory true;
138       description
139         "The version of the O1 Specification defining the format of this PNF registration notification";
140     }
141     choice vendor {
142       case vendor-private-enterprise-number {
143         leaf vendor-pen {
144           type uint32;
145           description
146             "Network function vendor IANA private enterprise number.";
147         }
148       }
149       description
150         "The network function vendor can be identified by its name or by its
151          IANA private enterprise number (PEN)";
152       reference
153         "IANA Private Enterprise Numbers
154           http://www.iana.org/assignments/enterprise-numbers/enterprise-numbers";
155     }
156     leaf oam-host {
157       type inet:host;
158       mandatory true;
159       description
160         "The m-plane fully qualified domain name (host) or IP address to
161          be used by the manager to contact the PNF.";
162       reference
163         "O-RAN Operations and Maintenance Interface Specification (O-RAN.WG10.O1-Interface.0-v07.00)
164            section 2.7.2.4 Operations and Notifications - oamV4IpAddress and oamV6IpAddress";
165     }
166     leaf oam-port {
167       type inet:port-number;
168       default "830";
169       description
170         "The port number the PNF listens for OAM commands..";
171     }
172     leaf unit-family {
173       type string {
174         length "1..255";
175       }
176       description
177         "The general type of hardware.";
178       reference
179         "3GPP TS 28.632 vendorUnitFamilyType";
180     }
181     leaf unit-type {
182       type string {
183         length "1..255";
184       }
185       description
186         "Vendor name for the network function";
187       reference
188         "3GPP TS 28.632 vendorUnitTypeNumber";
189     }
190     leaf restart-reason {
191       type string {
192         length "1..255";
193       }
194       description
195         "The reason the network function restarted.";
196     }
197     description
198       "An object class containing o1-notify-pnf-registration specific parameters.";
199   }
200
201   /*
202    * Augmentation of YES
203    */
204
205   augment "/yes:event-history/yes:event" {
206     when "derived-from-or-self(/yes:event-history/yes:event/yes:header/yes:domain, 'ypr:o1-notify-pnf-registration')" {
207       description
208         "The event header must indicate 'o1-notify-pnf-registration'.";
209     }
210     if-feature "yes:event-history";
211     container o1-notify-pnf-registration {
212       uses o1-notify-pnf-registration-grp;
213       description
214         "A single object for specific parameters, used for the registration of
215          physical network functions (PNF).";
216     }
217     description
218       "Adds to YES the specifics of o1-notify-pnf-registration notifications.";
219   }
220
221   augment "/yes:yang-based-event-stream/yes:event" {
222     when "derived-from-or-self(/yes:yang-based-event-stream/yes:event/yes:header/yes:domain, 'ypr:o1-notify-pnf-registration')" {
223       description
224         "The event header must indicate 'o1-notify-pnf-registration'.";
225     }
226     container o1-notify-pnf-registration {
227       uses o1-notify-pnf-registration-grp;
228       description
229         "A single object for specific parameters, used for the registration of
230          physical network functions (PNF).";
231     }
232     description
233       "Adds to YES the specifics of o1-notify-pnf-registration notifications.";
234   }
235 }