Add flexible mount point naming strategy
[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       leaf mount-point-naming-strategy {
48         type enumeration {
49             enum IP_PORT;
50             enum IP_ONLY;
51         }
52         default IP_PORT;
53         description "Mount name will be chosen as per this strategy in the absence of per device settings. Default is IP_PORT";
54       }
55     }
56
57     container allowed-devices {
58       description "A list of allowed devices";
59       list device {
60         key unique-id;
61         leaf unique-id {
62           description "Identifier of device, which will be used to identify device.";
63           type string;
64         }
65         leaf ssh-host-key {
66           description "BASE-64 encoded public key which device will use during connection.";
67           type string;
68         }
69         unique ssh-host-key;
70         uses credentials;
71       }
72     }
73   }
74 }