1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2 <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-netconf-server {
4 namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-server";
7 import ietf-inet-types {
10 "RFC 6991: Common YANG Data Types";
13 import ietf-x509-cert-to-name {
16 "RFC 7407: A YANG Data Model for SNMP Configuration";
19 import ietf-ssh-server {
21 revision-date 2016-11-02;
23 "RFC YYYY: SSH Client and Server Models";
26 import ietf-tls-server {
28 revision-date 2016-11-02;
30 "RFC ZZZZ: TLS Client and Server Models";
34 "IETF NETCONF (Network Configuration) Working Group";
36 "WG Web: <http://tools.ietf.org/wg/netconf/>
37 WG List: <mailto:netconf@ietf.org>
39 WG Chair: Mehmet Ersue
40 <mailto:mehmet.ersue@nsn.com>
42 WG Chair: Mahesh Jethanandani
43 <mailto:mjethanandani@gmail.com>
46 <mailto:kwatsen@juniper.net>";
48 "This module contains a collection of YANG definitions for
49 configuring NETCONF servers.
51 Copyright (c) 2014 IETF Trust and the persons identified as
52 authors of the code. All rights reserved.
54 Redistribution and use in source and binary forms, with or
55 without modification, is permitted pursuant to, and subject
56 to the license terms contained in, the Simplified BSD
57 License set forth in Section 4.c of the IETF Trust's
58 Legal Provisions Relating to IETF Documents
59 (http://trustee.ietf.org/license-info).
61 This version of this YANG module is part of RFC XXXX; see
62 the RFC itself for full legal notices.";
68 "RFC XXXX: NETCONF Client and Server Models";
73 "The 'listen' feature indicates that the NETCONF server
74 supports opening a port to accept NETCONF client connections
75 using at least one transport (e.g., SSH, TLS, etc.).";
80 "The 'ssh-listen' feature indicates that the NETCONF server
81 supports opening a port to accept NETCONF over SSH
84 "RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)";
89 "The 'tls-listen' feature indicates that the NETCONF server
90 supports opening a port to accept NETCONF over TLS
93 "RFC 7589: Using the NETCONF Protocol over Transport
94 Layer Security (TLS) with Mutual X.509
100 "The 'call-home' feature indicates that the NETCONF server
101 supports initiating NETCONF call home connections to NETCONF
102 clients using at least one transport (e.g., SSH, TLS, etc.).";
104 "RFC YYYY: NETCONF Call Home and RESTCONF Call Home";
107 feature ssh-call-home {
109 "The 'ssh-call-home' feature indicates that the NETCONF
110 server supports initiating a NETCONF over SSH call
111 home connection to NETCONF clients.";
113 "RFC YYYY: NETCONF Call Home and RESTCONF Call Home";
116 feature tls-call-home {
118 "The 'tls-call-home' feature indicates that the NETCONF
119 server supports initiating a NETCONF over TLS call
120 home connection to NETCONF clients.";
122 "RFC YYYY: NETCONF Call Home and RESTCONF Call Home";
125 grouping cert-maps-grouping {
127 "A grouping that defines a container around the
128 cert-to-name structure defined in RFC 7407.";
129 container cert-maps {
131 "The cert-maps container is used by a TLS-based NETCONF
132 server to map the NETCONF client's presented X.509
133 certificate to a NETCONF username. If no matching and
134 valid cert-to-name list entry can be found, then the
135 NETCONF server MUST close the connection, and MUST NOT
136 accept NETCONF messages over it.";
138 "RFC WWWW: NETCONF over TLS, Section 7";
139 uses x509c2n:cert-to-name;
143 grouping endpoints-container {
145 "This grouping is used by both the ssh and tls containers
146 for call-home configurations.";
147 container endpoints {
149 "Container for the list of endpoints.";
155 "User-ordered list of endpoints for this NETCONF client.
156 Defining more than one enables high-availability.";
160 "An arbitrary name for this endpoint.";
167 "The IP address or hostname of the endpoint. If a
168 hostname is configured and the DNS resolution results
169 in more than one IP address, the NETCONF server
170 will process the IP addresses as if they had been
171 explicitly configured in place of the hostname.";
175 type inet:port-number;
177 "The IP port for this endpoint. The NETCONF server will
178 use the IANA-assigned well-known port if no value is
185 container netconf-server {
187 "Top-level container for NETCONF server configuration.";
188 container session-options {
190 "NETCONF session options, independent of transport
191 or connection strategy.";
197 "Specifies the maximum number of seconds that a SSH/TLS
198 connection may wait for a hello message to be received.
199 A connection will be dropped if no hello message is
200 received before this number of seconds elapses. If set
201 to zero, then the server will wait forever for a hello
209 "Configures listen behavior";
214 "Specifies the maximum number of concurrent sessions
215 that can be active at one time. The value 0 indicates
216 that no artificial session limit should be used.";
224 "Specifies the maximum number of seconds that a NETCONF
225 session may remain idle. A NETCONF session will be dropped
226 if it is idle for an interval longer than this number of
227 seconds. If set to zero, then the server will never drop
228 a session because it is idle. Sessions that have a
229 notification subscription active are never dropped.";
235 "List of endpoints to listen for NETCONF connections on.";
239 "An arbitrary name for the NETCONF listen endpoint.";
245 "Selects between available transports.";
247 if-feature "ssh-listen";
250 "SSH-specific listening configuration for inbound
252 uses ss:listening-ssh-server-grouping {
261 if-feature "tls-listen";
264 "TLS-specific listening configuration for inbound
266 uses ts:listening-tls-server-grouping {
270 augment "client-auth" {
272 "Augments in the cert-to-name structure.";
273 uses cert-maps-grouping;
282 container call-home {
283 if-feature "call-home";
285 "Configures call-home behavior";
286 list netconf-client {
289 "List of NETCONF clients the NETCONF server is to initiate
290 call-home connections to.";
294 "An arbitrary name for the remote NETCONF client.";
300 "Selects between available transports.";
302 if-feature "ssh-call-home";
305 "Specifies SSH-specific call-home transport
307 uses endpoints-container {
308 refine "endpoints/endpoint/port" {
313 uses ss:non-listening-ssh-server-grouping;
318 if-feature "tls-call-home";
321 "Specifies TLS-specific call-home transport
323 uses endpoints-container {
324 refine "endpoints/endpoint/port" {
329 uses ts:non-listening-tls-server-grouping {
330 augment "client-auth" {
332 "Augments in the cert-to-name structure.";
333 uses cert-maps-grouping;
340 container connection-type {
342 "Indicates the kind of connection to use.";
343 choice connection-type {
345 "Selects between available connection types.";
346 case persistent-connection {
347 container persistent {
350 "Maintain a persistent connection to the NETCONF
351 client. If the connection goes down, immediately
352 start trying to reconnect to it, using the
353 reconnection strategy.
355 This connection type minimizes any NETCONF client
356 to NETCONF server data-transfer delay, albeit at
357 the expense of holding resources longer.";
363 "Specifies the maximum number of seconds that a
364 a NETCONF session may remain idle. A NETCONF
365 session will be dropped if it is idle for an
366 interval longer than this number of seconds.
367 If set to zero, then the server will never drop
368 a session because it is idle. Sessions that
369 have a notification subscription active are
373 container keep-alives {
375 "Configures the keep-alive policy, to proactively
376 test the aliveness of the SSH/TLS client. An
377 unresponsive SSH/TLS client will be dropped after
378 approximately max-attempts * max-wait seconds.";
380 "RFC YYYY: NETCONF Call Home and RESTCONF Call
381 Home, Section 3.1, item S6";
389 "Sets the amount of time in seconds after which
390 if no data has been received from the SSH/TLS
391 client, a SSH/TLS-level message will be sent
392 to test the aliveness of the SSH/TLS client.";
399 "Sets the maximum number of sequential keep-alive
400 messages that can fail to obtain a response from
401 the SSH/TLS client before assuming the SSH/TLS
402 client is no longer alive.";
408 case periodic-connection {
412 "Periodically connect to the NETCONF client, so that
413 the NETCONF client may deliver messages pending for
414 the NETCONF server. The NETCONF client must close
415 the connection when it is ready to release it. Once
416 the connection has been closed, the NETCONF server
417 will restart its timer until the next connection.";
423 "Specifies the maximum number of seconds that a
424 a NETCONF session may remain idle. A NETCONF
425 session will be dropped if it is idle for an
426 interval longer than this number of seconds.
427 If set to zero, then the server will never drop
428 a session because it is idle. Sessions that
429 have a notification subscription active are
433 leaf reconnect_timeout {
440 "Sets the maximum amount of unconnected time the
441 NETCONF server will wait before re-establishing
442 a connection to the NETCONF client. The NETCONF
443 server may initiate a connection before this
444 time if desired (e.g., to deliver an event
445 notification message).";
452 container reconnect-strategy {
454 "The reconnection strategy directs how a NETCONF server
455 reconnects to a NETCONF client, after discovering its
456 connection to the client has dropped, even if due to a
457 reboot. The NETCONF server starts with the specified
458 endpoint and tries to connect to it max-attempts times
459 before trying the next endpoint in the list (round
463 enum "first-listed" {
465 "Indicates that reconnections should start with
466 the first endpoint listed.";
468 enum "last-connected" {
470 "Indicates that reconnections should start with
471 the endpoint last connected to. If no previous
472 connection has ever been established, then the
473 first endpoint configured is used. NETCONF
474 servers SHOULD be able to remember the last
475 endpoint connected to across reboots.";
478 default "first-listed";
480 "Specifies which of the NETCONF client's endpoints the
481 NETCONF server should start with when trying to connect
482 to the NETCONF client.";
491 "Specifies the number times the NETCONF server tries to
492 connect to a specific endpoint before moving on to the
493 next endpoint in the list (round robin).";