blob: f835e35445913d44974bdd406e56e5d7c28fc66d [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-system-terminal {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/system/terminal";
7
8 prefix "oc-sys-term";
9
10 // import some basic types
11 import openconfig-extensions { prefix oc-ext; }
12
13
14 // meta
15 organization "OpenConfig working group";
16
17 contact
18 "OpenConfig working group
19 www.openconfig.net";
20
21 description
22 "This module defines configuration and operational state data
23 related to remote terminal services such as ssh and telnet.";
24
25 oc-ext:openconfig-version "0.2.0";
26
27 revision "2017-07-06" {
28 description
29 "Move to oc-inet types, add IETF attribution, add RADIUS
30 counters, changed password leaf names to indicate hashed";
31 reference "0.2.0";
32 }
33
34 revision "2017-01-29" {
35 description
36 "Initial public release";
37 reference "0.1.0";
38 }
39
40
41 // identity statements
42
43 // typedef statements
44
45 // grouping statements
46
47 grouping system-terminal-common-config {
48 description
49 "Common configuration data for terminal services";
50
51 leaf timeout {
52 type uint16;
53 units seconds;
54 description
55 "Set the idle timeout in seconds on terminal connections to
56 the system for the protocol.";
57 }
58
59 leaf rate-limit {
60 type uint16;
61 units "conn/min";
62 description
63 "Set a limit on the number of connection attempts per
64 minute to the system for the protocol.";
65 }
66
67 leaf session-limit {
68 type uint16;
69 description
70 "Set a limit on the number of simultaneous active terminal
71 sessions to the system for the protocol (e.g., ssh,
72 telnet, ...) ";
73 }
74 }
75
76 grouping system-terminal-common-state {
77 description
78 "Common operational state data for terminal services";
79 }
80
81 grouping system-terminal-common-top {
82 description
83 "Top-level grouping for common terminal service data";
84
85 container terminal-servers {
86 description
87 "Top-level container for terminal services";
88
89 container config {
90 description
91 "Configuration data for terminal services";
92
93 uses system-terminal-common-config;
94 }
95
96 container state {
97
98 config false;
99
100 description
101 "Operational state data ";
102
103 uses system-terminal-common-config;
104 uses system-terminal-common-state;
105 }
106 }
107 }
108
109 grouping system-ssh-server-config {
110 description
111 "Configuration data for system ssh configuration";
112
113 leaf enable {
114 type boolean;
115 default true;
116 description
117 "Enables the ssh server. The ssh server is enabled by
118 default.";
119 }
120
121 leaf protocol-version {
122 type enumeration {
123 enum V2 {
124 description
125 "Use SSH v2 only";
126 }
127 enum V1 {
128 description
129 "Use SSH v1 only";
130 }
131 enum V1_V2 {
132 description
133 "Use either SSH v1 or v2";
134 }
135 }
136 default V2;
137 description
138 "Set the protocol version for SSH connections to the system";
139 }
140
141 uses system-terminal-common-config;
142 }
143
144 grouping system-ssh-server-state {
145 description
146 "Operational state data for ssh server";
147 }
148
149 grouping system-ssh-server-top {
150 description
151 "Top-level grouping for ssh server data";
152
153 container ssh-server {
154 description
155 "Top-level container for ssh server";
156
157 container config {
158 description
159 "Configuration data for the system ssh server";
160
161 uses system-ssh-server-config;
162 }
163
164 container state {
165
166 config false;
167
168 description
169 "Operational state data for the system ssh server";
170
171 uses system-ssh-server-config;
172 uses system-ssh-server-state;
173 }
174 }
175 }
176
177 grouping system-telnet-server-config {
178 description
179 "Configuration data for telnet server";
180
181 leaf enable {
182 type boolean;
183 default false;
184 description
185 "Enables the telnet server. Telnet is disabled by
186 default";
187 }
188 uses system-terminal-common-config;
189
190 }
191
192 grouping system-telnet-server-state {
193 description
194 "Operational state data for telnet server";
195 }
196
197 grouping system-telnet-server-top {
198 description
199 "Top-level grouping for telnet server ";
200
201 container telnet-server {
202 description
203 "Top-level container for telnet terminal servers";
204
205 container config {
206 description
207 "Configuration data for telnet";
208
209 uses system-telnet-server-config;
210 }
211
212 container state {
213
214 config false;
215
216 description
217 "Operational state data for telnet";
218
219 uses system-telnet-server-config;
220 uses system-telnet-server-state;
221 }
222 }
223 }
224
225 // data definition statements
226
227 // augment statements
228
229 // rpc statements
230
231 // notification statements
232
233}