Add new revision for odl-netconf-callhome-server.yang
[netconf.git] / netconf / callhome-model / src / main / yang / odl-netconf-callhome-server.yang
1 module odl-netconf-callhome-server {
2
3   namespace "urn:opendaylight:params:xml:ns:yang:netconf-callhome-server";
4   prefix "callhome";
5
6   organization
7    "OpenDaylight Project";
8
9   contact
10    "netconf-dev@lists.opendaylight.org";
11
12   description
13    "This module defines the northbound interface for OpenDaylight NETCONF Callhome.";
14
15   revision 2020-10-15 {
16     description
17      "This revision adds connectivity details for one of the supported transport protocols";
18     reference
19      "RFC 8071: NETCONF Call Home and RESTCONF Call Home";
20   }
21
22   revision "2016-11-09" {
23     description "Initial version";
24   }
25
26   grouping credentials {
27     container credentials {
28       presence "Credentials to device.";
29       leaf username {
30         mandatory true;
31         description "Username to be used for authentication";
32         type string {
33           length "1..max";
34         }
35       }
36       leaf-list passwords {
37         description "Passwords to be used for authentication.";
38         type string;
39       }
40     }
41   }
42
43   container netconf-callhome-server {
44     description "Settings for call home server administration";
45
46     container global {
47       presence "global credentials are enabled.";
48       uses credentials;
49       leaf accept-all-ssh-keys {
50         type boolean;
51         default false;
52       }
53
54       leaf mount-point-naming-strategy {
55         type enumeration {
56             enum IP_PORT;
57             enum IP_ONLY;
58         }
59         default IP_PORT;
60         description "Mount name will be chosen as per this strategy in the absence of per device settings. Default is IP_PORT";
61       }
62     }
63
64     container allowed-devices {
65       description "A list of allowed devices";
66       list device {
67         key unique-id;
68         leaf unique-id {
69           description "Identifier of device, which will be used to identify device.";
70           type string;
71         }
72         leaf ssh-host-key {
73           description "BASE-64 encoded public key which device will use during connection.
74                        Deprecated, a 'host-key' from the  'ssh-client-params' containers should be used instead.";
75           status deprecated;
76           type string;
77         }
78         unique ssh-host-key;
79         uses credentials;
80
81         choice transport {
82           description "Provides connectivity details for one of the supported transport protocols";
83           case ssh {
84             container ssh-client-params {
85               leaf host-key {
86                 mandatory true;
87                 description "BASE-64 encoded public key which device will use during connection.";
88                 type string;
89               }
90               uses credentials;
91             }
92           }
93           case tls {
94             container tls-client-params {
95               leaf certificate-id {
96                 mandatory true;
97                 description "Certificate identifier which will be used during two-way TLS authentication.";
98                 type string;
99               }
100               leaf key-id {
101                 mandatory true;
102                 description "Key identifier inside the NetConf keystore which will be used during two-way TLS authentication.";
103                 type string;
104               }
105             }
106           }
107         }
108         unique certificate-id;
109         unique host-key;
110       }
111     }
112   }
113 }