ietf-ioam

This YANG module specifies a vendor-independent data model for In Situ Operations, Administration, and Maintenance (IOAM). The ...

  • Version: 2024-08-27

    ietf-ioam@2024-08-27


    
      module ietf-ioam {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-ioam";
    
        prefix ioam;
    
        import ietf-access-control-list {
          prefix acl;
          reference
            "RFC 8519: YANG Data Model for Network Access Control
            Lists (ACLs)";
    
    
        }
        import ietf-interfaces {
          prefix if;
          reference
            "RFC 8343: A YANG Data Model for Interface Management";
    
    
        }
        import ietf-lime-time-types {
          prefix lime;
          reference
            "RFC 8532: Generic YANG Data Model for the Management of
            Operations, Administration, and Maintenance (OAM) Protocols
            That Use Connectionless Communications";
    
    
        }
    
        organization
          "IETF IPPM (IP Performance Measurement) Working Group";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/ippm>
         WG List:  <mailto:ippm@ietf.org>
         Editor:   Tianran Zhou
                   <mailto:zhoutianran@huawei.com>
         Author:   Jim Guichard
                   <mailto:james.n.guichard@futurewei.com>
         Author:   Frank Brockners
                   <mailto:fbrockne@cisco.com>
         Author:   Srihari Raghavan
                   <mailto:srihari@cisco.com>";
    
        description
          "This YANG module specifies a vendor-independent data model
         for In Situ Operations, Administration, and Maintenance
         (IOAM).
    
         The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
         NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
         'MAY', and 'OPTIONAL' in this document are to be interpreted as
         described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
         they appear in all capitals, as shown here.
    
         Copyright (c) 2024 IETF Trust and the persons identified as
         authors of the code.  All rights reserved.
    
         Redistribution and use in source and binary forms, with or
         without modification, is permitted pursuant to, and subject to
         the license terms contained in, the Revised BSD License set
         forth in Section 4.c of the IETF Trust's Legal Provisions
         Relating to IETF Documents
         (https://trustee.ietf.org/license-info).
    
         This version of this YANG module is part of RFC 9617; see the
         RFC itself for full legal notices.";
    
        revision "2024-08-27" {
          description "Initial revision.";
          reference
            "RFC 9617: A YANG Data Model for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
    
        feature incremental-trace {
          description
            "This feature indicates that the Incremental Trace-Option is
           supported.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        feature preallocated-trace {
          description
            "This feature indicates that the Pre-allocated Trace-Option
           is supported.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        feature direct-export {
          description
            "This feature indicates that the Direct Export Option is
           supported.";
          reference
            "RFC 9326: In Situ Operations, Administration, and
            Maintenance (IOAM) Direct Exporting";
    
        }
    
        feature proof-of-transit {
          description
            "This feature indicates that the Proof of Transit Option is
           supported.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        feature edge-to-edge {
          description
            "This feature indicates that the Edge-to-Edge Option is
           supported.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        identity filter {
          description
            "Base identity to represent a filter.  A filter is used to
           specify the flow to apply the IOAM profile.";
        }
    
        identity acl-filter {
          base filter;
          description
            "Apply Access Control List (ACL) rules to specify the
           flow.";
        }
    
        identity protocol {
          description
            "Base identity to represent the carrier protocol.  It is
           used to indicate in what layer and protocol the IOAM data
           is embedded.";
        }
    
        identity ipv6 {
          base protocol;
          description
            "The described IOAM data is embedded in IPv6.";
          reference
            "RFC 9486: IPv6 Options for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        identity nsh {
          base protocol;
          description
            "The described IOAM data is embedded in the Network Service
           Header (NSH).";
          reference
            "RFC 9452: Network Service Header (NSH) Encapsulation for
            In Situ OAM (IOAM) Data";
    
        }
    
        identity node-action {
          description
            "Base identity to represent the node actions.  It is used to
           indicate what action the node will take.";
        }
    
        identity action-encapsulate {
          base node-action;
          description
            "This identity indicates that the node is used to
           encapsulate the IOAM packet.";
        }
    
        identity action-decapsulate {
          base node-action;
          description
            "This identity indicates that the node is used to
           decapsulate the IOAM packet.";
        }
    
        identity action-transit {
          base node-action;
          description
            "This identity indicates that the node is used to transit
           the IOAM packet.";
        }
    
        identity trace-type {
          description
            "Base identity to represent trace types.";
        }
    
        identity trace-hop-lim-node-id {
          base trace-type;
          description
            "This identity indicates the presence of 'Hop_Lim' and
           'node_id' in the node data.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        identity trace-if-id {
          base trace-type;
          description
            "This identity indicates the presence of 'ingress_if_id' and
           'egress_if_id' (short format) in the node data.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        identity trace-timestamp-seconds {
          base trace-type;
          description
            "This identity indicates the presence of timestamp seconds
           in the node data.";
        }
    
        identity trace-timestamp-fraction {
          base trace-type;
          description
            "This identity indicates the presence of a timestamp
           fraction in the node data.";
        }
    
        identity trace-transit-delay {
          base trace-type;
          description
            "This identity indicates the presence of transit delay in
           the node data.";
        }
    
        identity trace-namespace-data {
          base trace-type;
          description
            "This identity indicates the presence of namespace-specific
           data (short format) in the node data.";
        }
    
        identity trace-queue-depth {
          base trace-type;
          description
            "This identity indicates the presence of queue depth in the
           node data.";
        }
    
        identity trace-checksum-complement {
          base trace-type;
          description
            "This identity indicates the presence of the Checksum
           Complement in the node data.";
          reference
            "RFC 9197: Data Fields for In Situ Operations,
            Administration, and Maintenance (IOAM)";
    
        }
    
        identity trace-hop-lim-node-id-wide {
          base trace-type;
          description
            "This identity indicates the presence of 'Hop_Lim' and
           'node_id' (wide format) in the node data.";
        }
    
        identity trace-if-id-wide {
          base trace-type;
          description
            "This identity indicates the presence of 'ingress_if_id' and
           'egress_if_id' (wide format) in the node data.";
        }
    
        identity trace-namespace-data-wide {
          base trace-type;
          description
            "This identity indicates the presence of
           IOAM-namespace-specific data (wide format) in the
           node data.";
        }
    
        identity trace-buffer-occupancy {
          base trace-type;
          description
            "This identity indicates the presence of buffer occupancy
           in the node data.";
        }
    
        identity trace-opaque-state-snapshot {
          base trace-type;
          description
            "This identity indicates the presence of the variable-length
           Opaque State Snapshot field.";
        }
    
        identity pot-type {
          description
            "Base identity to represent Proof of Transit (POT) types.";
        }
    
        identity pot-type-0 {
          base pot-type;
          description
            "The IOAM field value for the POT type is 0, and POT data is
           a 16-octet field to carry data associated with POT
           procedures.";
        }
    
        identity e2e-type {
          description
            "Base identity to represent edge-to-edge types.";
        }
    
        identity e2e-seq-num-64 {
          base e2e-type;
          description
            "This identity indicates the presence of a 64-bit
           sequence number.";
        }
    
        identity e2e-seq-num-32 {
          base e2e-type;
          description
            "This identity indicates the presence of a 32-bit
           sequence number.";
        }
    
        identity e2e-timestamp-seconds {
          base e2e-type;
          description
            "This identity indicates the presence of timestamp seconds
           representing the time at which the packet entered the
           IOAM domain.";
        }
    
        identity e2e-timestamp-fraction {
          base e2e-type;
          description
            "This identity indicates the presence of a timestamp
           fraction representing the time at which the packet entered
           the IOAM domain.";
        }
    
        identity namespace {
          description
            "Base identity to represent the Namespace-ID.";
        }
    
        identity default-namespace {
          base namespace;
          description
            "The Namespace-ID value of 0x0000 is defined as the
           Default-Namespace-ID and MUST be known to all the nodes
           implementing IOAM.";
        }
    
        typedef ioam-filter-type {
          type identityref {
            base filter;
          }
          description
            "This type specifies a known type of filter.";
        }
    
        typedef ioam-protocol-type {
          type identityref {
            base protocol;
          }
          description
            "This type specifies a known type of carrier protocol for
           the IOAM data.";
        }
    
        typedef ioam-node-action {
          type identityref {
            base node-action;
          }
          description
            "This type specifies a known type of node action.";
        }
    
        typedef ioam-trace-type {
          type identityref {
            base trace-type;
          }
          description
            "This type specifies a known trace type.";
        }
    
        typedef ioam-pot-type {
          type identityref {
            base pot-type;
          }
          description
            "This type specifies a known POT type.";
        }
    
        typedef ioam-e2e-type {
          type identityref {
            base e2e-type;
          }
          description
            "This type specifies a known edge-to-edge type.";
        }
    
        typedef ioam-namespace {
          type identityref {
            base namespace;
          }
          description
            "This type specifies the supported namespace.";
        }
    
        container ioam {
          description
            "IOAM top-level container.";
          container info {
            config false;
            description
              "Describes information, such as units or timestamp format,
             that assists monitoring systems in the interpretation of
             the IOAM data.";
            leaf timestamp-type {
              type identityref {
                base lime:timestamp-type;
              }
              description
                "Type of timestamp, such as Truncated PTP (Precision
               Time Protocol) or NTP.";
            }
    
            list available-interface {
              key "if-name";
              description
                "A list of available interfaces that support IOAM.";
              leaf if-name {
                type if:interface-ref;
                description
                  "This is a reference to the interface name.";
              }
            }  // list available-interface
          }  // container info
    
          container admin-config {
            description
              "Contains all the administrative configurations related to
             the IOAM functionalities and all the IOAM profiles.";
            leaf enabled {
              type boolean;
              default "false";
              description
                "This object is used to control the availability of
    configuration.  It MUST be set to 'true' before anything
    in the /ioam/profiles/profile subtree can be edited.
    If 'false', any configuration in place is not used.";
            }
          }  // container admin-config
    
          container profiles {
            description
              "Contains a list of IOAM profiles.";
            list profile {
              key "profile-name";
              description
                "A list of IOAM profiles that are configured on the
               node.  There is no mandatory type of profile (e.g.,
               'incremental-trace', 'preallocated-trace') in the list.
               But at least one profile should be added.";
              leaf profile-name {
                type string {
                  length "1..300";
                }
                description
                  "Unique identifier for each IOAM profile.";
              }
    
              container filter {
                description
                  "The filter that is used to indicate the flow to apply
                 IOAM.";
                leaf filter-type {
                  type ioam-filter-type;
                  description "Filter type.";
                }
    
                leaf ace-name {
                  when
                    "derived-from-or-self(../filter-type, 'ioam:acl-filter')";
                  type leafref {
                    path "/acl:acls/acl:acl/acl:aces/acl:ace/acl:name";
                  }
                  description
                    "The Access Control Entry name is used to refer to an ACL
    specification.";
                }
              }  // container filter
    
              leaf protocol-type {
                type ioam-protocol-type;
                description
                  "This object is used to indicate the carrier protocol
                 where IOAM is applied.";
              }
    
              container incremental-tracing-profile {
                if-feature incremental-trace;
                presence
                  "Enables the Incremental Trace-Option.";
                description
                  "This container describes the profile for the
                 Incremental Trace-Option.";
                leaf node-action {
                  type ioam-node-action;
                  default "action-transit";
                  description
                    "This object indicates the action the node needs to
    take, e.g., encapsulation.";
                }
    
                container trace-types {
                  description
                    "This container provides the list of trace types for
    encapsulation.";
                  leaf use-namespace {
                    type ioam-namespace;
                    default "default-namespace";
                    description
                      "This object indicates the namespace used for
    encapsulation.";
                  }
    
                  leaf-list trace-type {
                    type ioam-trace-type;
                    description
                      "The trace type is only defined at the encapsulation
    node.";
                  }
                }  // container trace-types
    
                leaf max-length {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  type uint32;
                  units "bytes";
                  description
                    "This field specifies the maximum length of the node data
    list in octets.  'max-length' is only defined at the
    encapsulation node.";
                }
              }  // container incremental-tracing-profile
    
              container preallocated-tracing-profile {
                if-feature preallocated-trace;
                presence
                  "Enables the Pre-allocated Trace-Option.";
                description
                  "This container describes the profile for the
                 Pre-allocated Trace-Option.";
                leaf node-action {
                  type ioam-node-action;
                  default "action-transit";
                  description
                    "This object indicates the action the node needs to
    take, e.g., encapsulation.";
                }
    
                container trace-types {
                  description
                    "This container provides the list of trace types for
    encapsulation.";
                  leaf use-namespace {
                    type ioam-namespace;
                    default "default-namespace";
                    description
                      "This object indicates the namespace used for
    encapsulation.";
                  }
    
                  leaf-list trace-type {
                    type ioam-trace-type;
                    description
                      "The trace type is only defined at the encapsulation
    node.";
                  }
                }  // container trace-types
    
                leaf max-length {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  type uint32;
                  units "bytes";
                  description
                    "This field specifies the maximum length of the node data
    list in octets.  'max-length' is only defined at the
    encapsulation node.";
                }
              }  // container preallocated-tracing-profile
    
              container direct-export-profile {
                if-feature direct-export;
                presence
                  "Enables the Direct Export Option.";
                description
                  "This container describes the profile for the
                 Direct Export Option.";
                leaf node-action {
                  type ioam-node-action;
                  default "action-transit";
                  description
                    "This object indicates the action the node needs to
    take, e.g., encapsulation.";
                }
    
                container trace-types {
                  description
                    "This container provides the list of trace types for
    encapsulation.";
                  leaf use-namespace {
                    type ioam-namespace;
                    default "default-namespace";
                    description
                      "This object indicates the namespace used for
    encapsulation.";
                  }
    
                  leaf-list trace-type {
                    type ioam-trace-type;
                    description
                      "The trace type is only defined at the encapsulation
    node.";
                  }
                }  // container trace-types
    
                leaf max-length {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  type uint32;
                  units "bytes";
                  description
                    "This field specifies the maximum length of the node data
    list in octets.  'max-length' is only defined at the
    encapsulation node.";
                }
    
                leaf flow-id {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  type uint32;
                  description
                    "A 32-bit flow identifier.  The field is set at the
    encapsulating node.  The Flow ID can be uniformly
    assigned by a central controller or algorithmically
    generated by the encapsulating node.  The latter approach
    cannot guarantee the uniqueness of the Flow ID, yet the
    probability of conflict is small due to the large Flow ID
    space.  'flow-id' is used to correlate the exported data
    of the same flow from multiple nodes and from multiple
    packets.";
                }
    
                leaf enable-sequence-number {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  type boolean;
                  default "false";
                  description
                    "This boolean value indicates whether the sequence number
    is used in the Direct Export Option's 32-bit flow
    identifier.  If this value is set to 'true', the sequence
    number is used.  It is turned off by default.";
                }
              }  // container direct-export-profile
    
              container pot-profile {
                if-feature proof-of-transit;
                presence
                  "Enables the Proof of Transit Option.";
                description
                  "This container describes the profile for the
                 Proof of Transit Option.";
                leaf use-namespace {
                  type ioam-namespace;
                  default "default-namespace";
                  description
                    "This object indicates the namespace used for the
                   POT types.";
                }
    
                leaf pot-type {
                  type ioam-pot-type;
                  description
                    "The type of a particular POT variant that specifies
                   the POT data that is included.";
                }
              }  // container pot-profile
    
              container e2e-profile {
                if-feature edge-to-edge;
                presence
                  "Enables the Edge-to-Edge Option.";
                description
                  "This container describes the profile for the
                 Edge-to-Edge Option.";
                leaf node-action {
                  type ioam-node-action;
                  default "action-transit";
                  description
                    "This object indicates the action the node needs to
    take, e.g., encapsulation.";
                }
    
                container e2e-types {
                  when
                    "derived-from-or-self(../node-action,
    'ioam:action-encapsulate')";
                  description
                    "This container provides the list of edge-to-edge types
    for encapsulation.";
                  leaf use-namespace {
                    type ioam-namespace;
                    default "default-namespace";
                    description
                      "This object indicates the namespace used for
    encapsulation.";
                  }
    
                  leaf-list e2e-type {
                    type ioam-e2e-type;
                    description
                      "The edge-to-edge type is only defined at the
    encapsulation node.";
                  }
                }  // container e2e-types
              }  // container e2e-profile
            }  // list profile
          }  // container profiles
        }  // container ioam
      }  // module ietf-ioam
    

© 2024 YumaWorks, Inc. All rights reserved.