Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / template / o-ran-sc-hardware-v1.yang
1 module o-ran-sc-hardware-v1 {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:yang:o-ran-sc-hardware-v1";
4   prefix ohw;
5
6   import o-ran-sc-root-v1 {
7     prefix root;
8   }
9   import ietf-hardware {
10     prefix hw;
11     reference
12       "RFC 8348: A YANG Data Model for Hardware Management";
13   }
14
15   organization
16     "O-RAN Software Community";
17   contact
18     "www.o-ran-sc.org";
19   description
20     "This module augments the  o-ran-sc-controlled-element and
21      o-ran-sc-controlled-function object by adding ietf-hardware.
22
23      Copyright 2021 the O-RAN Software Community.
24
25      Licensed under the Apache License, Version 2.0 (the 'License');
26      you may not use this file except in compliance with the License.
27      You may obtain a copy of the License at
28
29      http://www.apache.org/licenses/LICENSE-2.0
30
31      Unless required by applicable law or agreed to in writing, software
32      distributed under the License is distributed on an 'AS IS' BASIS,
33      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34      See the License for the specific language governing permissions and
35      limitations under the License.";
36
37   revision 2021-03-09 {
38     description
39       "The namespace was updated according to O-RAN-SC yang guidelines.
40        The namespace must end with the full module name.";
41     reference
42       "https://jira.o-ran-sc.org/browse/OAM-168";
43   }
44   revision 2020-03-09 {
45     description
46       "initial revision";
47     reference
48       "O-RAN-OAM-Interface-Specification (O1)";
49   }
50
51   /*
52    * Type definitions
53    */
54
55   typedef hardware-ref {
56     type leafref {
57       path "/hw:hardware/hw:component/hw:name";
58     }
59     description
60       "This type is used by data models that need to reference
61        hardware.";
62   }
63
64   /*
65    * Groupings
66    */
67
68   grouping hardware-grp {
69     leaf-list hardware-reference {
70       type hardware-ref;
71       config false;
72       description
73         "A list of ietf-hardware references using the hardware name as key.";
74     }
75     description
76       "A group adding ietf-hardware references.";
77   }
78
79   /*
80    * Data nodes
81    */
82
83   augment "/root:controlled-element" {
84     uses hardware-grp;
85     description
86       "An augmentation, which adds ietf-hardware
87        to root:controlled-element.";
88   }
89
90   augment "/root:controlled-element/root:controlled-function" {
91     uses hardware-grp;
92     description
93       "An augmentation, which adds ietf-hardware
94        to root:controlled-function.";
95   }
96 }