summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-system-terminal.yang
blob: dc44dc543e68bfcb23f439db61b82fca436a8e09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
module openconfig-system-terminal {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/system/terminal";

  prefix "oc-sys-term";

  // import some basic types
  import openconfig-extensions { prefix oc-ext; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module defines configuration and operational state data
    related to remote terminal services such as ssh and telnet.";

  oc-ext:openconfig-version "0.3.0";

  revision "2017-09-18" {
    description
      "Updated to use OpenConfig types modules";
    reference "0.3.0";
  }

  revision "2017-07-06" {
    description
      "Move to oc-inet types, add IETF attribution, add RADIUS
      counters, changed password leaf names to indicate hashed";
    reference "0.2.0";
  }

  revision "2017-01-29" {
    description
      "Initial public release";
    reference "0.1.0";
  }


  // identity statements

  // typedef statements

  // grouping statements

  grouping system-terminal-common-config {
    description
      "Common configuration data for terminal services";

    leaf timeout {
      type uint16;
      units seconds;
      description
        "Set the idle timeout in seconds on terminal connections to
        the system for the protocol.";
    }

    leaf rate-limit {
      type uint16;
      units "conn/min";
      description
        "Set a limit on the number of connection attempts per
        minute to the system for the protocol.";
    }

    leaf session-limit {
      type uint16;
      description
        "Set a limit on the number of simultaneous active terminal
        sessions to the system for the protocol (e.g., ssh,
        telnet, ...) ";
    }
  }

  grouping system-terminal-common-state {
    description
      "Common operational state data for terminal services";
  }

  grouping system-terminal-common-top {
    description
      "Top-level grouping for common terminal service data";

    container terminal-servers {
      description
        "Top-level container for terminal services";

      container config {
        description
          "Configuration data for terminal services";

        uses system-terminal-common-config;
      }

      container state {

        config false;

        description
          "Operational state data ";

        uses system-terminal-common-config;
        uses system-terminal-common-state;
      }
    }
  }

  grouping system-ssh-server-config {
    description
      "Configuration data for system ssh configuration";

    leaf enable {
      type boolean;
      default true;
      description
        "Enables the ssh server.  The ssh server is enabled by
        default.";
    }

    leaf protocol-version {
      type enumeration {
        enum V2 {
          description
            "Use SSH v2 only";
        }
        enum V1 {
          description
            "Use SSH v1 only";
        }
        enum V1_V2 {
          description
            "Use either SSH v1 or v2";
        }
      }
      default V2;
      description
        "Set the protocol version for SSH connections to the system";
    }

    uses system-terminal-common-config;
  }

  grouping system-ssh-server-state {
    description
      "Operational state data for ssh server";
  }

  grouping system-ssh-server-top {
    description
      "Top-level grouping for ssh server data";

    container ssh-server {
      description
        "Top-level container for ssh server";

      container config {
        description
          "Configuration data for the system ssh server";

        uses system-ssh-server-config;
      }

      container state {

        config false;

        description
          "Operational state data for the system ssh server";

        uses system-ssh-server-config;
        uses system-ssh-server-state;
      }
    }
  }

  grouping system-telnet-server-config {
    description
      "Configuration data for telnet server";

      leaf enable {
        type boolean;
        default false;
        description
          "Enables the telnet server.  Telnet is disabled by
          default";
      }
      uses system-terminal-common-config;

  }

  grouping system-telnet-server-state {
    description
      "Operational state data for telnet server";
  }

  grouping system-telnet-server-top {
    description
      "Top-level grouping for telnet server ";

    container telnet-server {
      description
        "Top-level container for telnet terminal servers";

      container config {
        description
          "Configuration data for telnet";

        uses system-telnet-server-config;
      }

      container state {

        config false;

        description
          "Operational state data for telnet";

        uses system-telnet-server-config;
        uses system-telnet-server-state;
      }
    }
  }

  // data definition statements

  // augment statements

  // rpc statements

  // notification statements

}