Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-ssh-server@2016-11-02.yang
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-ssh-server {
3   yang-version 1.1;
4   namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-server";
5   prefix sshs;
6
7   import ietf-inet-types {
8     prefix inet;
9     reference
10       "RFC 6991: Common YANG Data Types";
11   }
12
13   import ietf-keystore {
14     prefix ks;
15     reference
16       "RFC YYYY: Keystore Model";
17   }
18
19   organization
20     "IETF NETCONF (Network Configuration) Working Group";
21   contact
22     "WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;
23      WG List:  &lt;mailto:netconf@ietf.org&gt;
24
25      WG Chair: Mehmet Ersue
26                &lt;mailto:mehmet.ersue@nsn.com&gt;
27
28      WG Chair: Mahesh Jethanandani
29                &lt;mailto:mjethanandani@gmail.com&gt;
30
31      Editor:   Kent Watsen
32                &lt;mailto:kwatsen@juniper.net&gt;";
33   description
34     "This module defines a reusable grouping for a SSH server that
35      can be used as a basis for specific SSH server instances.
36
37      Copyright (c) 2014 IETF Trust and the persons identified as
38      authors of the code. All rights reserved.
39
40      Redistribution and use in source and binary forms, with or
41      without modification, is permitted pursuant to, and subject
42      to the license terms contained in, the Simplified BSD
43      License set forth in Section 4.c of the IETF Trust's
44      Legal Provisions Relating to IETF Documents
45      (http://trustee.ietf.org/license-info).
46
47      This version of this YANG module is part of RFC XXXX; see
48      the RFC itself for full legal notices.";
49
50   revision 2016-11-02 {
51     description
52       "Initial version";
53     reference
54       "RFC XXXX: SSH Client and Server Models";
55   }
56
57   feature ssh-x509-certs {
58     description
59       "The ssh-x509-certs feature indicates that the NETCONF
60        server supports RFC 6187";
61     reference
62       "RFC 6187: X.509v3 Certificates for Secure Shell
63        Authentication";
64   }
65
66   grouping non-listening-ssh-server-grouping {
67     description
68       "A reusable grouping for a SSH server that can be used as a
69        basis for specific SSH server instances.";
70     container host-keys {
71       description
72         "The list of host-keys the SSH server will present when
73          establishing a SSH connection.";
74       list host-key {
75         key "name";
76         min-elements 1;
77         ordered-by user;
78         description
79           "An ordered list of host keys the SSH server will use to
80            construct its ordered list of algorithms, when sending
81            its SSH_MSG_KEXINIT message, as defined in Section 7.1
82            of RFC 4253.";
83         reference
84           "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
85         leaf name {
86           type string;
87           description
88             "An arbitrary name for this host-key";
89         }
90
91         choice host-key-type {
92           mandatory true;
93           description
94             "The type of host key being specified";
95           leaf public-key {
96             type leafref {
97               path "/ks:keystore/ks:private-keys/ks:private-key/ks:name";
98             }
99             description
100               "The public key is actually identified by the name of
101                its cooresponding private-key in the keystore.";
102           }
103
104           leaf certificate {
105             if-feature "ssh-x509-certs";
106             type leafref {
107               path "/ks:keystore/ks:private-keys/ks:private-key/ks:certificate-chains/ks:certificate-chain/ks:name";
108             }
109             description
110               "The name of a certificate in the keystore.";
111           }
112         }
113       }
114     }
115
116     container client-cert-auth {
117       if-feature "ssh-x509-certs";
118       description
119         "A reference to a list of trusted certificate authority (CA)
120          certificates and a reference to a list of trusted client
121          certificates.";
122       leaf trusted-ca-certs {
123         type leafref {
124           path "/ks:keystore/ks:trusted-certificates/ks:name";
125         }
126         description
127           "A reference to a list of certificate authority (CA)
128            certificates used by the SSH server to authenticate
129            SSH client certificates.";
130       }
131
132       leaf trusted-client-certs {
133         type leafref {
134           path "/ks:keystore/ks:trusted-certificates/ks:name";
135         }
136         description
137           "A reference to a list of client certificates used by
138            the SSH server to authenticate SSH client certificates.
139            A clients certificate is authenticated if it is an
140            exact match to a configured trusted client certificate.";
141       }
142     }
143   }
144
145   grouping listening-ssh-server-grouping {
146     description
147       "A reusable grouping for a SSH server that can be used as a
148        basis for specific SSH server instances.";
149     leaf address {
150       type inet:ip-address;
151       description
152         "The IP address of the interface to listen on.  The SSH
153          server will listen on all interfaces if no value is
154          specified.  Please note that some addresses have special
155          meanings (e.g., '0.0.0.0' and '::').";
156     }
157
158     leaf port {
159       type inet:port-number;
160       description
161         "The local port number on this interface the SSH server
162          listens on.  When this grouping is used, it is RECOMMENED
163          that refine statement is used to either set a default port
164          value or to set mandatory true.";
165     }
166
167     uses non-listening-ssh-server-grouping;
168   }
169 }
170 </data>
171 </rpc-reply>