netconfcentral logo

openconfig-messages

HTML

openconfig-messages@2018-08-13



  module openconfig-messages {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/messages";

    prefix oc-messages;

    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-system-logging {
      prefix oc-log;
    }

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    www.openconfig.net";

    description
      "This module defines configuration and operational state data
    related to Syslog messages that a device may generate.

    These messages are historically obtained through the Syslog
    transport, however this module allows for obtaining them through
    an alternative transport, such as a Subscribe operation over an
    RPC.

    This module does not usurp traditional syslog servers, which may
    still be configured through the
    /yang/system/openconfig-system.yang model, rather it provies the
    Operator with an alternative method of consuming messages.";

    revision "2018-08-13" {
      description "Initial draft.";
      reference
        "0.0.1";

    }

    oc-ext:openconfig-version "0.0.1";

    identity DEBUG_SERVICE {
      base 
      description
        "Base identity for debug services. Identities within this base
      identity are to be augmented in by vendors.";
    }

    grouping messages-config {
      description
        "Configuration data for defining Syslog message severity.";
      leaf severity {
        type oc-log:syslog-severity;
        description
          "Specifies that only messages of the given severity (or
        greater severity) are sent over the RPC.

        This is analogous to differentiating which severity is to be
        sent to legacy Syslog servers, as opposed to local buffer or
        files.";
      }
    }  // grouping messages-config

    grouping messages-state {
      description
        "Operational state data for Syslog messages.";
      container message {
        oc-ext:telemetry-atomic;
        config false;
        description
          "Syslog messages the client is Subscribing to. This is all
        messages currently configured to be sent according to
        syslog-severity.";
        reference
          "IETF RFC 5424 - The Syslog Protocol";

        leaf msg {
          type string;
          description
            "Message payload. If other leafs within this container not
          supported, this leaf MAY include the entire message,
          inclding pri, procid, app-name etc..";
        }

        leaf priority {
          type uint8;
          description
            "The Priority value (PRIVAL) represents both the
          Facility and Severity.";
          reference
            "IETF RFC 5424, Section 6.2.1";

        }

        leaf app-name {
          type string;
          description
            "The APP-NAME field SHOULD identify the device or
          application that originated the message.";
          reference
            "IETF RFC 5424, Section 6.2.5.";

        }

        leaf procid {
          type string;
          description
            "PROCID is a value that is included in the message, having
          no interoperable meaning, except that a change in the value
          indicates there has been a discontinuity in syslog
          reporting.";
          reference
            "IETF RFC 5424, Section 6.2.6.";

        }

        leaf msgid {
          type string;
          description
            "The MSGID SHOULD identify the type of message. For
          example, a firewall might use the MSGID 'TCPIN' for
          incoming TCP traffic and the MSGID 'TCPOUT' for outgoing
          TCP traffic.";
          reference
            "IETF RFC 5424, Section 6.2.7.";

        }
      }  // container message
    }  // grouping messages-state

    grouping debug-messages-config {
      description
        "Configuration data for enabling debug messages.";
      leaf service {
        type identityref {
          base DEBUG_SERVICE;
        }
        description
          "Enumeration of all services which can have debugging enabled.
        Vendors are to augment this base identity with their platform
        or OS specific debug options.";
      }

      leaf enabled {
        type boolean;
        default 'false';
        description
          "Enable and disable debugging.";
      }
    }  // grouping debug-messages-config

    grouping debug-messages-top {
      description
        "Configuration data for enabling Syslog debug messages.";
      container debug-entries {
        description
          "Enclosing container for list of debugs to enable.";
        list debug-service {
          key "service";
          description
            "List of debugging entries.";
          leaf service {
            type leafref {
              path "../config/service";
            }
            description
              "Reference to the debug-enable service key.";
          }

          container config {
            description
              "Configuration data for debug service entries.";
            uses debug-messages-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for enabled debugs.";
            uses debug-messages-config;
          }  // container state
        }  // list debug-service
      }  // container debug-entries
    }  // grouping debug-messages-top

    grouping messages-top {
      description
        "Top-level grouping for Syslog messages.";
      container messages {
        description
          "Top-level container for Syslog messages.";
        container config {
          description
            "Configuration data for Syslog messages.";
          uses messages-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state data for a Syslog messages.";
          uses messages-config;

          uses messages-state;
        }  // container state

        uses debug-messages-top;
      }  // container messages
    }  // grouping messages-top

    uses messages-top;
  }  // module openconfig-messages

Summary

  
  
Organization OpenConfig working group
  
Module openconfig-messages
Version 2018-08-13
File openconfig-messages.yang
  
Prefix oc-messages
Namespace http://openconfig.net/yang/messages
  
Cooked /cookedmodules/openconfig-messages/2018-08-13
YANG /src/openconfig-messages@2018-08-13.yang
XSD /xsd/openconfig-messages@2018-08-13.xsd
  
Abstract This module defines configuration and operational state data related to Syslog messages that a device may generate. These messa...
  
Contact
OpenConfig working group
www.openconfig.net

Description

 
This module defines configuration and operational state data
related to Syslog messages that a device may generate.

These messages are historically obtained through the Syslog
transport, however this module allows for obtaining them through
an alternative transport, such as a Subscribe operation over an
RPC.

This module does not usurp traditional syslog servers, which may
still be configured through the
/yang/system/openconfig-system.yang model, rather it provies the
Operator with an alternative method of consuming messages.

Groupings

Grouping Objects Abstract
debug-messages-config service enabled Configuration data for enabling debug messages.
debug-messages-top debug-entries Configuration data for enabling Syslog debug messages.
messages-config severity Configuration data for defining Syslog message severity.
messages-state message Operational state data for Syslog messages.
messages-top messages Top-level grouping for Syslog messages.

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
messages container Top-level container for Syslog messages.
   config container Configuration data for Syslog messages.
      severity leaf Specifies that only messages of the given severity (or greater severity) are sent over the RPC. This is analogous to differentiating which severity is to be sent to legacy Syslog servers, as opposed to local buffer or files.
   debug-entries container Enclosing container for list of debugs to enable.
      debug-service list List of debugging entries.
         config container Configuration data for debug service entries.
            enabled leaf Enable and disable debugging.
            service leaf Enumeration of all services which can have debugging enabled. Vendors are to augment this base identity with their platform or OS specific debug options.
         service leaf Reference to the debug-enable service key.
         state container Operational state data for enabled debugs.
            enabled leaf Enable and disable debugging.
            service leaf Enumeration of all services which can have debugging enabled. Vendors are to augment this base identity with their platform or OS specific debug options.
   state container Operational state data for a Syslog messages.
      message container Syslog messages the client is Subscribing to. This is all messages currently configured to be sent according to syslog-severity.
         app-name leaf The APP-NAME field SHOULD identify the device or application that originated the message.
         msg leaf Message payload. If other leafs within this container not supported, this leaf MAY include the entire message, inclding pri, procid, app-name etc..
         msgid leaf The MSGID SHOULD identify the type of message. For example, a firewall might use the MSGID 'TCPIN' for incoming TCP traffic and the MSGID 'TCPOUT' for outgoing TCP traffic.
         priority leaf The Priority value (PRIVAL) represents both the Facility and Severity.
         procid leaf PROCID is a value that is included in the message, having no interoperable meaning, except that a change in the value indicates there has been a discontinuity in syslog reporting.
      severity leaf Specifies that only messages of the given severity (or greater severity) are sent over the RPC. This is analogous to differentiating which severity is to be sent to legacy Syslog servers, as opposed to local buffer or files.