52a9b0f4c34985ca60e40361dbdfc7e0c655bd26
[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 "2016-11-09" {
16     description "Initial version";
17   }
18
19   grouping credentials {
20     container credentials {
21       presence "Credentials to device.";
22       leaf username {
23         mandatory true;
24         description "Username to be used for authentication";
25         type string {
26           length "1..max";
27         }
28       }
29       leaf-list passwords {
30         description "Passwords to be used for authentication.";
31         type string;
32       }
33     }
34   }
35
36   container netconf-callhome-server {
37     description "Settings for call home server administration";
38
39     container global {
40       presence "global credentials are enabled.";
41       uses credentials;
42       leaf accept-all-ssh-keys {
43         type boolean;
44         default false;
45       }
46     }
47
48     container allowed-devices {
49       description "A list of allowed devices";
50       list device {
51         key unique-id;
52         leaf unique-id {
53           description "Identifier of device, which will be used to identify device.";
54           type string;
55         }
56         leaf ssh-host-key {
57           description "BASE-64 encoded public key which device will use during connection.";
58           type string;
59         }
60         unique ssh-host-key;
61         uses credentials;
62       }
63     }
64   }
65 }