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