module netconfd-ex {

  namespace
    "http://yuma123.org/ns/netconfd-ex";

  prefix "netconfd-ex";

  import netconfd { prefix netconfd; }

  import yuma-types { prefix nt; }

  import ietf-inet-types { prefix inet; }

  organization
    "Yuma123";

  contact
    "Vladimir Vassilev <mailto:vladimir@transpacket.com>";

  description
    "This module contains extra parameters for netconfd";

  revision 2018-08-14 {
    description
      "Removed yet unimplemented yang-library-spec case
       augmentation. Shall be restored when implemented.";
  }

  augment "/netconfd:netconfd" {
    description
      "Adds extra parameters to netconfd.";
     leaf ncxserver-sockname {
       description
         "Overrides the default /tmp/ncxserver.sock UNIX
          socket name netconfd listens on for incoming connections.
          You have to add corresponding entry to /etc/ssh/sshd_config e.g.:
          ...
          Port 1830
          Subsystem netconf \"/usr/sbin/netconf-subsystem \\
          --ncxserver-sockname=/tmp/ncxserver1.sock\"
          ...";
       type string;
     }

     leaf tcp-direct-address {
       description
         "The server will use this local TCP address to listen for
          incoming connections instead of the default
          /tmp/ncxserver.sock UNIX socket. By default if only
          tcp-direct-port is specified the addressed used is
          localhost.";

       type inet:host;
     }

     leaf tcp-direct-port {
       description
         "The server will use this local TCP port to listen for
          incoming connections instead of the default
          /tmp/ncxserver.sock UNIX socket. tcp-direct-address controls
          the server bind address.";

        type inet:port-number;
     }

     leaf non-advertised-module {
       description
         "Specifying a module as non advertised excludes it from the
          capabilities list in the <hello> message. For example taking
          out the RPCs defined in a given module from the list of
          available commands in a cli.";

       type nt:NcModuleSpec;
     }

     leaf max-sessions {
       description
         "Specifies the maximum number of sessions
          that can be accepted.";
       type uint32;
       default 1024;
     }

     leaf validate-config-only {
       description
         "When present netconfd returns immediately after initialization
          and startup configuration validation is complete without opening
          socket and waiting for incoming NETCONF sessions. Enables use
          of netconfd as command line configuration validator.";
       type empty;
     }
     leaf with-nmda {
       description
          "If set to 'true', then NMDA is enabled.";
       type boolean;
       default false;
    }
  }
}
