Subject: [Netconf] parameter list for netconf-server module action item

From: Andy Bierman <[email-masked]>
Date: Fri, 26 Sep 2014 18:05:46 -0700

Hi,

I was asked to look through our proprietary server config module
and pick out the leafs that were not implementation-specific.
I picked a server subset (left out all logging, module config).

I am not proposing that all these leafs be added to the netconf-server
module.  I am just completing an action item from
the last virtual interim to post this list to the mailing list.
I would suggest that "hello-timeout" and "idle-timeout"
are common enough to add. Not sure about the rest.

    leaf default-style {
      type enumeration {
        enum "report-all" {
          value 0;
        }
        enum "trim" {
          value 1;
        }
        enum "explicit" {
          value 2;
        }
      }
      default 'explicit';
      description
        "Selects the type of filtering behavior the server will
            advertise as the 'basic' behavior in the 'with-defaults'
            capability.  The server will use this default handling
            behavior if the 'with-defaults' parameter is not
            explicitly set.

            Also, when saving a configuration to NV-storage,
            this value will be used for filtering defaults
            from the saved configuration.

            See wd:with-defaults leaf for enumeration details.";
    }

    leaf eventlog-size {
      type uint32;
      default '1000';
      description
        "Specifies the maximum number of notification events
            that will be saved in the notification replay buffer.
            The oldest entries will be deleted first.";
    }

    leaf hello-timeout {
      type uint32 {
        range "0 | 10 .. 3600";
      }
      units "seconds";
      default '600';
      description
        "Specifies the number of seconds that a session
            may exist before the hello PDU is received.
            A session will be dropped if no hello PDU
            is received before this number of seconds elapses.

            If this parameter is set to zero, then the server
            will wait forever for a hello message, and not
            drop any sessions stuck in 'hello-wait' state.

            Setting this parameter to zero may permit
            denial of service attacks, since only a limited
            number of concurrent sessions are supported
            by the server.";
    }

    leaf idle-timeout {
      type uint32 {
        range "0 | 10 .. 360000";
      }
      units "seconds";
      default '3600';
      description
        "Specifies the number of seconds that a session
            may remain idle without issuing any RPC requests.
            A session will be dropped if it is idle for an
            interval longer than this number of seconds.

            Sessions that have a notification subscription
            active are never dropped.

            If this parameter is set to zero, then the server
            will never drop a session because it is idle.";
    }

    leaf max-sessions {
      type uint16 {
        range "0 .. 1024";
      }
      default '8';
      description
        "Specifies the maximum number of concurrent sessions
           that can be active at one time.  The value 0 indicates
           that no artificial session limit should be used.";
    }

    leaf message-indent {
      type int8 {
        range "-1 .. 9";
      }
      default "-1";
      description
        "The number of spaces to indent for each level of
         output in a protocol message, e.g. NETCONF request.
         The value zero means no indent, just line feeds.
         The value -1 means no indent and no line feeds either.";
    }

    leaf protocols {
      type bits {
        bit netconf1.0 {
          position 0;
          description "RFC 4741 base:1.0";
        }
        bit netconf1.1 {
          position 1;
          description "RFC 6241 base:1.1";
        }
      }
      must ". != ''";
      description
        "Specifies which protocol versions the program or session
         will attempt to use. Empty set is not allowed.";
    }

    leaf superuser {
      type union {
        type nt:NcxName;
        type string {
          length "0";
        }
      }
      description
        "The user name to use as the superuser account.
           Any session associated with this user name
           will bypass all access control enforcement.
           See yuma-nacm.yang for more details.

           To disable the superuser account completely,
           set this parameter to the empty string or do
           not set it at all. The default mode is to
          disable superuser access.";
    }

    leaf system-sorted {
      type boolean;
      default 'true';
      description
        "Indicates whether ordered-by system leaf-lists
           and lists will be kept in sorted order.";
    }

    leaf target {
      type enumeration {
        enum "running" {
          value 0;
          description
            "Write to the running config and support
              the :writable-running capability.";
        }
        enum "candidate" {
          value 1;
          description
            "Write to the candidate config and support
               the :candidate and :confirmed-commit
               capabilities.";
        }
      }
      default 'candidate';
      description
        "The database to use as the target of edit-config
           operations.";
    }

    leaf usexmlorder {
      type empty;
      description
        "If present, then XML element order will be enforced.
           Otherwise, XML element order errors will not be
           generated if possible. Default is no enforcement of
           strict XML order.";
    }

    leaf with-notifications {
      type boolean;
      default 'true';
      description
        "If set to 'true', then the :notification:1.0 and
           :interleave:1.0 capabilities will be enabled.
           Otherwise, these capabilities will not be enabled.";
    }

    leaf with-startup {
      type boolean;
      default 'false';
      description
        "If set to 'true', then the :startup capability will be
           enabled. Otherwise, the :startup capability
           will not be enabled.  This capability
           makes the NV-save operation an explicit operation
           instead of an automatic save.";
    }

    leaf with-url {
      type boolean;
      default 'true';
      description
        "If set to 'true', then the :url capability will be
           enabled. Otherwise, the :url capability
           will not be enabled.  This capability requires a
           file system and may introduce security risks
           because internal files such as startup-cfg.xml
           and backup-cfg.xml will be exposed.";
    }

    leaf with-validate {
      type boolean;
      default 'true';
      description
        "If set to 'true', then the :validate capability will be
           enabled. Otherwise, the :validate capability
           will not be enabled.  This capability requires
           extensive memory resources.";
    }