Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-gnmi@2020-05-29.yang
1 module org-openroadm-gnmi {
2   yang-version 1.1;
3   namespace "http://org/openroadm/gnmi";
4   prefix org-openroadm-gnmi;
5
6   import org-openroadm-device {
7     prefix org-openroadm-device;
8     revision-date 2020-05-29;
9   }
10   import org-openroadm-security {
11     prefix org-openroadm-security;
12     revision-date 2020-05-29;
13   }
14   import ietf-inet-types {
15     prefix inet;
16     revision-date 2013-07-15;
17   }
18
19   organization
20     "Open ROADM MSA";
21   contact
22     "OpenROADM.org";
23   description
24     "YANG definitions for gnmi protocol.
25
26      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
27      All other rights reserved.
28
29      Redistribution and use in source and binary forms, with or without modification,
30      are permitted provided that the following conditions are met:
31
32      * Redistributions of source code must retain the above copyright notice, this
33        list of conditions and the following disclaimer.
34      * Redistributions in binary form must reproduce the above copyright notice,
35        this list of conditions and the following disclaimer in the documentation and/or
36        other materials provided with the distribution.
37      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
38        contributors may be used to endorse or promote products derived from this software
39        without specific prior written permission.
40
41      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
42      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
43      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
44      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
45      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
47      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
48      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
50      POSSIBILITY OF SUCH DAMAGE.";
51
52   revision 2020-05-29 {
53     description
54       "Version 7.1.0";
55   }
56   revision 2020-03-27 {
57     description
58       "Version 7.0.0";
59   }
60   revision 2019-11-29 {
61     description
62       "Version 6.1.0";
63   }
64   revision 2019-09-27 {
65     description
66       "Version 6.0.0";
67   }
68   revision 2019-05-31 {
69     description
70       "Version 5.1.0";
71   }
72   revision 2019-03-29 {
73     description
74       "Initial revision.";
75   }
76
77   grouping gnmi_container {
78     description
79       "Grouping for setting of GNMI attributes ";
80     container gnmi {
81       description
82         "gRPC Network Management Interface related configurations";
83       leaf enabled {
84         type boolean;
85         must "(current()='true' and ../certificate-id) or current()='false'" {
86           error-message "certificate-id should be configured to enable gNMI.";
87         }
88         default "false";
89         description
90           "Enable/Disable gNMI.";
91       }
92       leaf certificate-id {
93         type leafref {
94           path "/org-openroadm-device:org-openroadm-device/org-openroadm-security:security/org-openroadm-security:certificate/org-openroadm-security:certificate-id";
95         }
96         description
97           "ID of the certificate from security table";
98       }
99       leaf port {
100         type inet:port-number;
101         default "6030";
102         description
103           "gNMI port to listen on";
104       }
105     }
106   }
107
108   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
109     description
110       "Creation of GNMI container under device protols ";
111     uses gnmi_container;
112   }
113 }