module odl-netconf-callhome-server { namespace "urn:opendaylight:params:xml:ns:yang:netconf-callhome-server"; prefix "callhome"; organization "OpenDaylight Project"; contact "netconf-dev@lists.opendaylight.org"; description "This module defines the northbound interface for OpenDaylight NETCONF Callhome."; revision 2024-01-29 { description "A number of improvements to the sematics of this model. In concrete terms: - every device now has to have a transport - previously-deprecated 'ssh-host-key' is now obsolete - 'credentials; is obsoleted as well - 'host-key' is now a dedicated typedef based on 'type binary'"; } revision 2023-04-28 { description "This revision integrates device-status leaf, formerly hosted in callhome-device.yang"; } revision 2020-10-15 { description "This revision adds connectivity details for one of the supported transport protocols"; reference "RFC 8071: NETCONF Call Home and RESTCONF Call Home"; } revision "2016-11-09" { description "Initial version"; } typedef ssh-public-key { description "An SSH public key encoded in RFC4253 format"; reference "RFC4253 section 6.6"; type binary { // Note: the format requires at least 8 bytes for length of the algo and its bytes length "8..max"; } } grouping credentials { container credentials { presence "Credentials to device."; leaf username { mandatory true; description "Username to be used for authentication"; type string { length "1..max"; } } leaf-list passwords { description "Passwords to be used for authentication."; type string; } } } container netconf-callhome-server { description "Settings for call home server administration"; container global { presence "global credentials are enabled."; uses credentials; leaf accept-all-ssh-keys { type boolean; default false; } leaf mount-point-naming-strategy { type enumeration { enum IP_PORT; enum IP_ONLY; } default IP_PORT; description "Mount name will be chosen as per this strategy in the absence of per device settings. Default is IP_PORT"; } } container allowed-devices { description "A list of allowed devices"; list device { key unique-id; leaf unique-id { description "Identifier of device, which will be used to identify device."; type string; } choice transport { description "Provides connectivity details for one of the supported transport protocols"; mandatory true; case ssh { container ssh-client-params { leaf host-key { mandatory true; description "Public key which device will use during connection."; type ssh-public-key; } uses credentials; } } case tls { container tls-client-params { leaf certificate-id { mandatory true; description "Certificate identifier which will be used during two-way TLS authentication."; type string; } leaf key-id { mandatory true; description "Key identifier inside the NetConf keystore which will be used during two-way TLS authentication."; type string; } } } } unique transport/ssh/ssh-client-params/host-key; unique transport/tls/tls-client-params/certificate-id; leaf device-status { config false; type enumeration { enum CONNECTED; enum FAILED_AUTH_FAILURE; enum FAILED_NOT_ALLOWED; enum FAILED; enum DISCONNECTED; } default DISCONNECTED; } leaf ssh-host-key { description "Obsolete, a 'host-key' from the 'ssh-client-params' containers should be used instead."; status obsolete; type string; } unique ssh-host-key; uses credentials { status obsolete; } } } } }