Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / template / yes-o1-notify-pnf-registration-ietf-hardware.yang
1 module yes-o1-notify-pnf-registration-ietf-hardware {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:params:xml:ns:yang:yes-o1-notify-pnf-registration-ietf-hardware";
4   prefix ypri;
5
6   import ietf-interfaces {
7     prefix "if";
8     reference
9       "RFC: 8343: A YANG Data Model for Interface Management";
10   }
11
12   import o-ran-wg4-features {
13     prefix "o-ran-feat";
14     reference
15       "ORAN-WG4.M.0-v05.00";
16   }
17
18   import o-ran-interfaces {
19     prefix "o-ran-int";
20     reference
21       "ORAN-WG4.M.0-v05.00";
22   }
23
24   import o-ran-hardware {
25     prefix "o-ran-hw";
26     reference
27       "ORAN-WG4.M.0-v05.00";
28   }
29
30   import yang-based-event-stream {
31     prefix yes;
32     reference
33       "wiki.opnfv.org/display/ves/VES+goes+YES";
34   }
35   import yes-o1-notify-pnf-registration {
36     prefix ypr;
37   }
38   import ietf-hardware {
39     prefix hw;
40     reference
41       "RFC 8348: A YANG Data Model for Hardware Management";
42   }
43
44   organization
45     "O-RAN Software Community";
46   contact
47     "www.o-ran-sc.org";
48   description
49     "The module extends yes-o1-notify-pnf-registration with hardware information
50      and parameters according to RFC 8348.
51
52      Copyright 2022 highstreet technologies GmbH and others.
53
54      Licensed under the Apache License, Version 2.0 (the 'License');
55      you may not use this file except in compliance with the License.
56      You may obtain a copy of the License at
57
58       http://www.apache.org/licenses/LICENSE-2.0
59
60      Unless required by applicable law or agreed to in writing, software
61      distributed under the License is distributed on an 'AS IS' BASIS,
62      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63      See the License for the specific language governing permissions and
64      limitations under the License.";
65
66   revision 2022-09-12 {
67     description
68       "Initial version";
69     reference
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    * Groupings
77    */
78   grouping hardware-grp {
79     leaf serial-number {
80       type leafref {
81         path '/hw:hardware/hw:component/hw:serial-num';
82       }
83       // mandatory true;
84       description
85         "The serial number of the network function.";
86     }
87     // macAddress - O /if:interfaces/if:interface/o-ran-int:mac-address
88     leaf mac-address {
89       type leafref {
90         path '/if:interfaces/if:interface/o-ran-int:mac-address';
91       }
92       description
93         "The MAC address of OAM interface of the network function.";
94     }
95     leaf model-number {
96       type leafref {
97         path '/hw:hardware/hw:component/hw:model-name';
98       }
99       description
100         "Version or name of the network function from the vendor.";
101     }
102     leaf software-version {
103       type leafref {
104         path '/hw:hardware/hw:component/hw:software-rev';
105       }
106       description
107         "The active software version running on the network function.";
108     }
109     leaf manufacture-date {
110       type leafref {
111         path '/hw:hardware/hw:component/hw:mfg-date';
112       }
113       description
114         "Manufacture date of the network function.";
115     }
116     leaf last-service-date {
117       if-feature "o-ran-feat:NON-PERSISTENT-MPLANE";
118       type leafref {
119         path '/hw:hardware/hw:component/o-ran-hw:last-service-date';
120       }
121       description
122         "Date when the field operation staff way on-side.";
123     }
124     description
125       "An object class containing o1-notify-pnf-registration specific parameters
126        according to RFC 8348.";
127   }
128
129   /*
130    * Augmentation of o1-notify-pnf-registration
131    */
132
133   // vendorName M /hw:hardware/hw:component/hw:mfg-name
134   augment "/yes:event-history/yes:event/ypr:o1-notify-pnf-registration/ypr:vendor" {
135     case name {
136       leaf vendor-name {
137         type leafref {
138           path '/hw:hardware/hw:component/hw:mfg-name';
139         }
140         description
141           "Network function vendor name according to IANA Private Enterprise Numbers";
142       }
143     }
144     description
145       "Exposing the vendor-name as defined by IETF.";
146   }
147
148   augment "/yes:yang-based-event-stream/yes:event/ypr:o1-notify-pnf-registration/ypr:vendor" {
149     case name {
150       leaf vendor-name {
151         type leafref {
152           path '/hw:hardware/hw:component/hw:mfg-name';
153         }
154         description
155           "Network function vendor name according to IANA Private Enterprise Numbers";
156       }
157     }
158     description
159       "Exposing the vendor-name as defined by ietf:";
160     reference
161       "3GPP TS 28.632 vendorName";
162   }
163
164   augment "/yes:event-history/yes:event/ypr:o1-notify-pnf-registration" {
165     if-feature "yes:event-history";
166     uses hardware-grp;
167     description
168       "Adds to o1-notify-pnf-registration container within the historic data
169        the hardware information and parameters according to ietf.";
170   }
171
172   augment "/yes:yang-based-event-stream/yes:event/ypr:o1-notify-pnf-registration" {
173     uses hardware-grp;
174     description
175       "Adds to o1-notify-pnf-registration container within the notification
176        syntax the hardware information and parameters according to ietf.";
177   }
178 }