Honeynode test tool
[transportpce.git] / tests / honeynode / honeynode-plugin-api / src / main / yang / org-openroadm-ethernet-interfaces.yang
1 module org-openroadm-ethernet-interfaces {
2   namespace "http://org/openroadm/ethernet-interfaces";
3   prefix org-openroadm-eth-interfaces;
4
5   import org-openroadm-device {
6     prefix org-openroadm-device;
7   }
8   import org-openroadm-interfaces {
9     prefix openROADM-if;
10   }
11
12   organization "Open ROADM MSA";
13   contact
14     "OpenROADM.org";
15   description
16     "YANG definitions for device facility ethernet interfaces.
17
18      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
19      AT&T Intellectual Property.  All other rights reserved.
20
21      Redistribution and use in source and binary forms, with or without modification,
22      are permitted provided that the following conditions are met:
23
24      * Redistributions of source code must retain the above copyright notice, this
25        list of conditions and the following disclaimer.
26      * Redistributions in binary form must reproduce the above copyright notice,
27        this list of conditions and the following disclaimer in the documentation and/or
28        other materials provided with the distribution.
29      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
30        contributors may be used to endorse or promote products derived from this software
31        without specific prior written permission.
32
33      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
34      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
36      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
37      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
38      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
39      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42      POSSIBILITY OF SUCH DAMAGE.
43
44      Also contains code components extracted from IETF Interfaces.  These code components
45      are copyrighted and licensed as follows:
46
47      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
48      All rights reserved.
49
50      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
51      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
52      publication of this document. Please review these documents carefully, as they
53      describe your rights and restrictions with respect to this document. Code Components
54      extracted from this document must include Simplified BSD License text as described in
55      Section 4.e of the Trust Legal Provisions and are provided without warranty as
56      described in the Simplified BSD License.";
57
58   revision 2016-10-14 {
59     description
60       "Version 1.2";
61   }
62
63   grouping eth-attributes {
64     leaf speed {
65       type uint32;
66       description
67         "Set speed of the interface, unit mbps.
68          This is for ETH facility. ";
69     }
70     leaf fec {
71       type enumeration {
72         enum off;
73         enum rsfec;
74       }
75       description "Forward Error Correction Choices. ";
76     }
77     leaf duplex {
78       type enumeration {
79         enum "half" {
80           value 0;
81           description
82             "half duplex";
83         }
84         enum "full" {
85           value 1;
86           description
87             "full duplex";
88         }
89       }
90       default "full";
91       description
92         "Set duplex selections.";
93     }
94     leaf mtu {
95       type uint32 {
96         range "1518..9000";
97       }
98       default "1522";
99       description
100         "Set Maximum Frame Size.";
101     }
102     leaf auto-negotiation {
103       type enumeration {
104         enum "enabled" {
105           value 1;
106           description
107             "Auto Negotiation enabled";
108         }
109         enum "disabled" {
110           value 0;
111           description
112             "Auto Negotiation disabled";
113         }
114       }
115       default "enabled";
116       description
117         "Set Auto Negotiation: Enabled/Disabled.";
118     }
119     leaf curr-speed {
120       config false;
121       type string;
122       description
123         "speed (UNKNOWN/AUTO/10/100/1000/10000) corresponding to the interface";
124     }
125     leaf curr-duplex {
126       config false;
127       type string;
128       description
129         "duplex (HALF/FULL) corresponding to the interface";
130     }
131   }
132
133   grouping ethernet-container {
134     container ethernet {
135       description
136         "Ethernet Interfaces";
137       uses eth-attributes;
138     }
139   }
140
141   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
142     when "org-openroadm-device:type = 'openROADM-if:ethernetCsmacd'";
143     uses ethernet-container;
144   }
145 }