module ietf-ipfix-packet-sampling { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-ipfix-packet-sampling"; prefix ips; import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-interfaces { prefix if; reference "RFC 8343: A YANG Model for Interface Management"; } import ietf-hardware { prefix hw; reference "RFC 8348: A YANG Data Model for Hardware Management"; } import ietf-ipfix { prefix ipfix; reference "RFC XXXX: YANG Data Models for the IP Flow Information Export (IPFIX) Protocol, Packet Sampling (PSAMP) Protocol, and Bulk Data Export"; } organization "IETF"; contact "Web: TBD List: TBD Editor: Joey Boyd Editor: Marta Seda "; // RFC Ed.: replace XXXX with actual RFC numbers and // remove this note. description "This module contains a collection of YANG definitions for the management Packet Sampling (PSAMP) over IPFIX. This data model is designed for the Network Management Datastore Architecture defined in RFC 8342. 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) 2019 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 Simplified 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 XXXX (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself for full legal notices."; revision 2020-03-05 { description "Initial revision."; reference "RFC XXXX: YANG Data Models for the IP Flow Information Export (IPFIX) Protocol, Packet Sampling (PSAMP) Protocol, and Bulk Data Export"; } feature if-mib { description "This feature indicates that the device implements the IF-MIB."; reference "RFC 2863: The Interfaces Group MIB"; } feature entity-mib { description "This feature indicates that the device implements the ENTITY-MIB."; reference "RFC 6933: Entity MIB (Version 4)"; } feature psamp-samp-count-based { description "If supported, the Monitoring Device supports count-based sampling. The Selector method sampCountBased can be configured."; reference "RFC 5475, Section 5.1"; } feature psamp-samp-time-based { description "If supported, the Monitoring Device supports time-based sampling. The Selector method sampTimeBased can be configured."; reference "RFC 5475, Section 5.1"; } feature psamp-samp-rand-out-of-n { description "If supported, the Monitoring Device supports random n-out-of-N sampling. The Selector method sampRandOutOfN can be configured."; reference "RFC 5475, Section 5.2.1"; } feature psamp-samp-uni-prob { description "If supported, the Monitoring Device supports uniform probabilistic sampling. The Selector method sampUniProb can be configured."; reference "RFC 5475, Section 5.2.2"; } feature psamp-filter-match { description "If supported, the Monitoring Device supports property match filtering. The Selector method filterMatch can be configured."; reference "RFC 5475, Section 6.1"; } feature psamp-filter-hash { description "If supported, the Monitoring Device supports hash-based filtering. The Selector method filterHash can be configured."; reference "RFC 5475, Section 6.2"; } feature immediate-cache { description "If supported, the Monitoring Device supports Caches generating PSAMP Packet Reports by configuration with immediateCache."; } feature timeout-cache { description "If supported, the Monitoring Device supports Caches generating IPFIX Flow Records by configuration with timeoutCache."; } feature natural-cache { description "If supported, the Monitoring Device supports Caches generating IPFIX Flow Records by configuration with naturalCache."; } feature permanent-cache { description "If supported, the Monitoring Device supports Caches generating IPFIX Flow Records by configuration with permanentCache."; } identity hash-function { description "Base identity for all hash functions used for hash-based packet Filtering."; } identity bob { base hash-function; description "BOB hash function."; reference "RFC 5475, Section 6.2.4.1"; } identity ipsx { base hash-function; description "IPSX hash function."; reference "RFC 5475, Section 6.2.4.1"; } identity crc { base hash-function; description "CRC hash function."; reference "RFC 5475, Section 6.2.4.1"; } typedef hardware-ref { type leafref { path "/hw:hardware/hw:component/hw:name"; } description "This type is used to reference hardware components."; reference "RFC 8348"; } typedef if-name-type { type string { length "1..255"; } description "This corresponds to the DisplayString textual convention of SNMPv2-TC, which is used for ifName in the IF MIB module."; reference "RFC 2863 (ifName)"; } typedef direction { type enumeration { enum "ingress" { value 0; description "This value is used for monitoring incoming packets."; } enum "egress" { value 1; description "This value is used for monitoring outgoing packets."; } enum "both" { value 2; description "This value is used for monitoring incoming and outgoing packets."; } } description "Direction of packets going through an interface."; } grouping observation-point-parameters { description "Interface as input to Observation Point."; leaf observation-domain-id { type uint32; mandatory true; description "The Observation Domain ID associates the Observation Point to an Observation Domain. Observation Points with identical Observation Domain IDs belong to the same Observation Domain. Note that this parameter corresponds to ipfixObservationPointObservationDomainId in the IPFIX MIB module."; reference "RFC 7011; RFC 6615, Section 8 (ipfixObservationPointObservationDomainId)"; } leaf-list interface-ref { type if:interface-ref; description "List of interfaces of the Monitoring Device. The Observation Point observes packets at the specified interfaces."; } leaf-list if-name { if-feature if-mib; type if-name-type; description "List of names identifying interfaces of the Monitoring Device. The Observation Point observes packets at the specified interfaces."; } leaf-list if-index { if-feature if-mib; type uint32; description "List of if-index values pointing to entries in the ifTable of the IF-MIB module maintained by the Monitoring Device. The Observation Point observes packets at the specified interfaces. This parameter SHOULD only be used if an SNMP agent enables access to the ifTable. Note that this parameter corresponds to ipfixObservationPointPhysicalInterface in the IPFIX MIB module."; reference "RFC 2863; RFC 6615, Section 8 (ipfixObservationPointPhysicalInterface)"; } leaf-list hardware-ref { type hardware-ref; description "List of hardware components of the Monitoring Device. The Observation Points observes packets at the specified hardware components."; reference "RFC 8348"; } leaf-list ent-physical-name { if-feature entity-mib; type string; description "List of names identifying physical entities of the Monitoring Device. The Observation Point observes packets at the specified entities."; } leaf-list ent-physical-index { if-feature entity-mib; type uint32; description "List of ent-physical-index values pointing to entries in the entPhysicalTable of the ENTITY-MIB module maintained by the Monitoring Device. The Observation Point observes packets at the specified entities. This parameter SHOULD only be used if an SNMP agent enables access to the entPhysicalTable. Note that this parameter corresponds to ipfixObservationPointPhysicalEntity in the IPFIX MIB module."; reference "RFC 33; RFC 6615, Section 8 (ipfixObservationPointPhysicalInterface)"; } leaf direction { type direction; default "both"; description "Direction of packets. If not applicable (e.g., in the case of a sniffing interface in promiscuous mode), this parameter is ignored."; } } grouping samp-count-based-parameters { description "Configuration parameters of a Selector applying systematic count-based packet Sampling to the packet stream."; reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.1."; leaf packet-interval { type uint32; units "packets"; mandatory true; description "The number of packets that are consecutively sampled between gaps of length packetSpace. This parameter corresponds to the Information Element samplingPacketInterval and to psampSampCountBasedInterval in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.2; RFC 6727, Section 6 (psampSampCountBasedInterval)"; } leaf packet-space { type uint32; units "packets"; mandatory true; description "The number of unsampled packets between two Sampling intervals. This parameter corresponds to the Information Element samplingPacketSpace and to psampSampCountBasedSpace in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.3; RFC 6727, Section 6 (psampSampCountBasedSpace)"; } } grouping samp-time-based-parameters { description "Configuration parameters of a Selector applying systematic time-based packet Sampling to the packet stream."; reference "RFC 5475, Section 5.1; RFC 5476, Section 6.5.2.2"; leaf time-interval { type uint32; units "microseconds"; mandatory true; description "The time interval in microseconds during which all arriving packets are sampled between gaps of length timeSpace. This parameter corresponds to the Information Element samplingTimeInterval and to psampSampTimeBasedInterval in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.4; RFC 6727, Section 6 (psampSampTimeBasedInterval)"; } leaf time-space { type uint32; units "microseconds"; mandatory true; description "The time interval in microseconds during which no packets are sampled between two Sampling intervals specified by timeInterval. This parameter corresponds to the Information Element samplingTimeInterval and to psampSampTimeBasedSpace in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.5; RFC 6727, Section 6 (psampSampTimeBasedSpace)"; } } grouping samp-rand-out-of-n-parameters { description "Configuration parameters of a Selector applying n-out-of-N packet Sampling to the packet stream."; reference "RFC 5475, Section 5.2.1; RFC 5476, Section 6.5.2.3."; leaf size { type uint32; units "packets"; mandatory true; description "The number of elements taken from the parent population. This parameter corresponds to the Information Element samplingSize and to psampSampRandOutOfNSize in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.6; RFC 6727, Section 6 (psampSampRandOutOfNSize)"; } leaf population { type uint32; units "packets"; mandatory true; description "The number of elements in the parent population. This parameter corresponds to the Information Element samplingPopulation and to psampSampRandOutOfNPopulation in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.7; RFC 6727, Section 6 (psampSampRandOutOfNPopulation)"; } } grouping samp-uni-prob-parameters { description "Configuration parameters of a Selector applying uniform probabilistic packet Sampling (with equal probability per packet) to the packet stream."; reference "RFC 5475, Section 5.2.2.1; RFC 5476, Section 6.5.2.4"; leaf probability { type decimal64 { fraction-digits 18; range "0..1"; } mandatory true; description "Probability that a packet is sampled, expressed as a value between 0 and 1. The probability is equal for every packet. This parameter corresponds to the Information Element samplingProbability and to psampSampUniProbProbability in the PSAMP MIB module."; reference "RFC 5477, Section 8.2.8; RFC 6727, Section 6 (psampSampUniProbProbability)"; } } grouping filter-match-parameters { description "Configuration parameters of a Selector applying property match Filtering to the packet stream. The field to be matched is specified as an Information Element."; reference "RFC 5475, Section 6.1; RFC 5476, Section 6.5.2.5"; choice information-element { mandatory true; description "The Information Element field to be matched."; case ie-name { leaf ie-name { type ipfix:ie-name-type; description "Name of the Information Element."; } } case ie-id { leaf ie-id { type ipfix:ie-id-type; description "ID of the Information Element."; } } } leaf ie-enterprise-number { type uint32; default '0'; description "If this parameter is zero, the Information Element is registered in the IANA registry of IPFIX Information Elements. If this parameter is configured with a non-zero private enterprise number, the Information Element is enterprise-specific."; reference "IANA registry for Private Enterprise Numbers, http://www.iana.org/assignments/enterprise-numbers; IANA registry for IPFIX Entities, http://www.iana.org/assignments/ipfix."; } leaf value { type string; mandatory true; description "Matching value of the Information Element"; } } grouping filter-hash-parameters { description "Configuration parameters of a Selector applying hash-based Filtering to the packet stream."; reference "RFC 5475, Section 6.2; RFC 5476, Section 6.5.2.6"; leaf hash-function { type identityref { base hash-function; } default 'bob'; description "Hash function to be applied. According to RFC 5475, Section 6.2.4.1, 'BOB' must be used in order to be compliant with PSAMP. This parameter functionally corresponds to psampFiltHashFunction in the PSAMP MIB module."; reference "RFC 6727, Section 6 (psampFiltHashFunction)"; } leaf initializer-value { type uint64; description "Initializer value to the hash function. If not configured by the user, the Monitoring Device arbitrarily chooses an initializer value. This parameter corresponds to the Information Element hashInitialiserValue and to psampFiltHashInitializerValue in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.9; RFC 6727, Section 6 (psampFiltHashInitializerValue)"; } leaf ip-payload-offset { type uint64; units "octets"; default '0'; description "IP payload offset indicating the position of the first payload byte considered as input to the hash function. Default value 0 corresponds to the minimum offset that must be configurable according to RFC 5476, Section 6.5.2.6. This parameter corresponds to the Information Element hashIPPayloadOffset and to psampFiltHashIpPayloadOffset in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.2; RFC 6727, Section 6 (psampFiltHashIpPayloadOffset)"; } leaf ip-payload-size { type uint64; units "octets"; default '8'; description "Number of IP payload bytes used as input to the hash function, counted from the payload offset. If the IP payload is shorter than the payload range, all available payload octets are used as input. Default value 8 corresponds to the minimum IP payload size that must be configurable according to RFC 5476, Section 6.5.2.6. This parameter corresponds to the Information Element hashIPPayloadSize and to psampFiltHashIpPayloadSize in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.3; RFC 6727, Section 6 (psampFiltHashIpPayloadSize)"; } leaf digest-output { type boolean; default 'false'; description "If true, the output from this Selector is included in the Packet Report as a packet digest. Therefore, the configured Cache Layout needs to contain a digestHashValue field. This parameter corresponds to the Information Element hashDigestOutput."; reference "RFC 5477, Section 8.3.8"; } list selected-range { key "name"; min-elements 1; description "List of hash function return ranges for which packets are selected."; leaf name { type ipfix:name-type; description "An arbitrary string which uniquely identifies the hash function's selected range."; } leaf min { type uint64; description "Beginning of the hash function's selected range. This parameter corresponds to the Information Element hashSelectedRangeMin and to psampFiltHashSelectedRangeMin in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.6; RFC 6727, Section 6 (psampFiltHashSelectedRangeMin)"; } leaf max { type uint64; description "End of the hash function's selected range. This parameter corresponds to the Information Element hashSelectedRangeMax and to psampFiltHashSelectedRangeMax in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.7; RFC 6727, Section 6 (psampFiltHashSelectedRangeMax)"; } } } grouping filter-hash-parameters-state { description "Configuration parameters of a Selector applying hash-based Filtering to the packet stream."; reference "RFC 5475, Section 6.2; RFC 5476, Section 6.5.2.6"; leaf output-range-min { type uint64; config false; description "Beginning of the hash function's potential range. This parameter corresponds to the Information Element hashOutputRangeMin and to psampFiltHashOutputRangeMin in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.4; RFC 6727, Section 6 (psampFiltHashOutputRangeMin)"; } leaf output-range-max { type uint64; config false; description "End of the hash function's potential range. This parameter corresponds to the Information Element hashOutputRangeMax and to psampFiltHashOutputRangeMax in the PSAMP MIB module."; reference "RFC 5477, Section 8.3.5; RFC 6727, Section 6 (psampFiltHashOutputRangeMax)"; } } grouping selector-parameters { description "Configuration and state parameters of a Selector."; choice method { mandatory true; description "Packet selection method applied by the Selector."; case select-all { leaf select-all { type empty; description "Method that selects all packets."; } } case samp-count-based { container samp-count-based { if-feature psamp-samp-count-based; description "Systematic count-based packet Sampling."; uses samp-count-based-parameters; } } case samp-time-based { container samp-time-based { if-feature psamp-samp-time-based; description "Systematic time-based packet Sampling."; uses samp-time-based-parameters; } } case samp-rand-out-of-n { container samp-rand-out-of-n { if-feature psamp-samp-rand-out-of-n; description "n-out-of-N packet Sampling."; uses samp-rand-out-of-n-parameters; } } case samp-uni-prob { container samp-uni-prob { if-feature psamp-samp-uni-prob; description "Uniform probabilistic packet Sampling."; uses samp-uni-prob-parameters; } } case filter-match { container filter-match { if-feature psamp-filter-match; description "Property match Filtering."; uses filter-match-parameters; } } case filter-hash { container filter-hash { if-feature psamp-filter-hash; description "Hash-based Filtering."; uses filter-hash-parameters; uses filter-hash-parameters-state; } } } } grouping selector-parameters-state { description "Configuration and state parameters of a Selector."; leaf packets-observed { type yang:counter64; config false; description "The number of packets observed at the input of the Selector. If this is the first Selector in the Selection Process, this counter corresponds to the total number of packets in all Observed Packet Streams at the input of the Selection Process. Otherwise, the counter corresponds to the total number of packets at the output of the preceding Selector. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of selectorDiscontinuityTime. Note that this parameter corresponds to ipfixSelectorStatsPacketsObserved in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixSelectorStatsPacketsObserved)"; } leaf packets-dropped { type yang:counter64; config false; description "The total number of packets discarded by the Selector. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of selectorDiscontinuityTime. Note that this parameter corresponds to ipfixSelectorStatsPacketsDropped in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixSelectorStatsPacketsDropped)"; } leaf selector-discontinuity-time { type yang:date-and-time; config false; description "Timestamp of the most recent occasion at which one or more of the Selector counters suffered a discontinuity. Note that this parameter functionally corresponds to ipfixSelectionProcessStatsDiscontinuityTime in the IPFIX MIB module. In contrast to ipfixSelectionProcessStatsDiscontinuityTime, the time is absolute and not relative to sysUpTime."; reference "RFC 6615, Section 8 (ipfixSelectionProcessStatsDiscontinuityTime)"; } } grouping cache-layout-parameters { description "Cache Layout parameters used by immediate cache, timeout cache, natural cache, and permanent cache."; container cache-layout { description "Cache Layout parameters."; list cache-field { key "name"; min-elements 1; description "Superset of fields that are included in the Packet Reports or Flow Records generated by the Cache."; leaf name { type ipfix:name-type; description "An arbitrary string which uniquely identifies the cache field."; } choice information-element { mandatory true; description "The Information Element to be added to the template."; reference "RFC 7012, Section 2; IANA registry for IPFIX Entities, http://www.iana.org/assignments/ipfix"; case ie-name { leaf ie-name { type ipfix:ie-name-type; description "Name of the Information Element."; } } case ie-id { leaf ie-id { type ipfix:ie-id-type; description "ID of the Information Element."; } } } leaf ie-length { type uint16; units "octets"; description "Length of the field in which the Information Element is encoded. A value of 65535 specifies a variable-length Information Element. For Information Elements of integer and float type, the field length MAY be set to a smaller value than the standard length of the abstract data type if the rules of reduced size encoding are fulfilled. If not configured by the user, this parameter is set by the Monitoring Device."; reference "RFC 7011, Section 6.2"; } leaf ie-enterprise-number { type uint32; default '0'; description "If this parameter is zero, the Information Element is registered in the IANA registry of IPFIX Information Elements. If this parameter is configured with a non-zero private enterprise number, the Information Element is enterprise-specific. If the enterprise number is set to 29305, this field contains a Reverse Information Element. In this case, the Cache MUST generate Data Records in accordance to RFC 5103."; reference "RFC 7011; RFC 5103; IANA registry for Private Enterprise Numbers, http://www.iana.org/assignments/enterprise-numbers; IANA registry for IPFIX Entities, http://www.iana.org/assignments/ipfix"; } } } } grouping flow-cache-base-parameters { description "Configuration parameters of a Cache generating Flow Records which are common to all Cache types."; leaf max-flows { type uint32; units "flows"; description "This parameter configures the maximum number of Flows in the Cache, which is the maximum number of Flows that can be measured simultaneously. The Monitoring Device MUST ensure that sufficient resources are available to store the configured maximum number of Flows. If the maximum number of Flows is measured, an additional Flow can be measured only if an existing entry is removed. However, traffic that pertains to existing Flows can continue to be measured."; } } grouping flow-permanent-cache-parameters { description "Configuration parameters of a Permanent Cache generating Flow Records."; uses flow-cache-base-parameters; leaf export-interval { type uint32; units "seconds"; description "This parameter configures the interval (in seconds) for periodical export of Flow Records. If not configured by the user, the Monitoring Device sets this parameter."; } } grouping flow-timeout-natural-cache-parameters { description "Configuration parameters of a Timeout or Natural Cache generating Flow Records."; uses flow-cache-base-parameters; leaf active-timeout { type uint32; units "seconds"; description "This parameter configures the time in seconds after which a Flow is expired even though packets matching this Flow are still received by the Cache. The parameter value zero indicates infinity, meaning that there is no active timeout. If not configured by the user, the Monitoring Device sets this parameter. Note that this parameter corresponds to ipfixMeteringProcessCacheActiveTimeout in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixMeteringProcessCacheActiveTimeout)"; } leaf idle-timeout { type uint32; units "seconds"; description "This parameter configures the time in seconds after which a Flow is expired if no more packets matching this Flow are received by the Cache. The parameter value zero indicates infinity, meaning that there is no idle timeout. If not configured by the user, the Monitoring Device sets this parameter. Note that this parameter corresponds to ipfixMeteringProcessCacheIdleTimeout in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixMeteringProcessCacheIdleTimeout)"; } } grouping flow-cache-parameters-state { description "State parameters of a Cache generating Flow Records."; leaf active-flows { type yang:gauge32; units "flows"; config false; description "The number of Flows currently active in this Cache. Note that this parameter corresponds to ipfixMeteringProcessCacheActiveFlows in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixMeteringProcessCacheActiveFlows)"; } leaf unused-cache-entries { type yang:gauge32; units "flows"; config false; description "The number of unused Cache entries in this Cache. Note that this parameter corresponds to ipfixMeteringProcessCacheUnusedCacheEntries in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixMeteringProcessCacheUnusedCacheEntries)"; } } augment '/ipfix:ipfix' { description "Augment IPFIX to add PSAMP."; container psamp { description "Container for PSAMP nodes."; list observation-point { key "name"; description "Observation Point of the Monitoring Device."; leaf name { type ipfix:name-type; description "An arbitrary string which uniquely identifies the Observation Point."; } uses observation-point-parameters; leaf-list selection-process { type leafref { path "/ipfix:ipfix/psamp/selection-process/name"; } description "Selection Processes in this list process packets in parallel."; } leaf observation-point-id { type uint32; config false; description "Observation Point ID (i.e., the value of the Information Element observationPointId) assigned by the Monitoring Device."; reference "IANA registry for IPFIX Entities, http://www.iana.org/assignments/ipfix"; } } list selection-process { key "name"; description "Selection Process of the Monitoring Device."; leaf name { type ipfix:name-type; description "An arbitrary string which uniquely identifies the Selectiong Process."; } list selector { key "name"; min-elements 1; ordered-by user; description "List of Selectors that define the action of the Selection Process on a single packet. The Selectors are serially invoked in the same order as they appear in this list."; leaf name { type ipfix:name-type; description "Name of the selector."; } uses selector-parameters; uses selector-parameters-state; } leaf cache { type leafref { path "/ipfix:ipfix/psamp/cache/name"; } description "Cache that receives the output of the Selection Process."; } list selection-sequence { config false; description "This list contains the Selection Sequence IDs that are assigned by the Monitoring Device to distinguish different Selection Sequences passing through the Selection Process. As Selection Sequence IDs are unique per Observation Domain, the corresponding Observation Domain IDs are included as well. With this information, it is possible to associate Selection Sequence (Statistics) Report Interpretations exported according to the PSAMP protocol with a Selection Process in the configuration data."; reference "RFC 5476"; leaf observation-domain-id { type uint32; description "Observation Domain ID for which the Selection Sequence ID is assigned."; } leaf selection-sequence-id { type uint64; description "Selection Sequence ID used in the Selection Sequence (Statistics) Report Interpretation."; } } } list cache { key "name"; description "Cache of the Monitoring Device."; leaf name { type ipfix:name-type; description "An arbitrary string which uniquely identifies the cache."; } leaf enabled { type boolean; default "true"; description "If true, this cache is enabled and the specified data is able to be exported."; } choice cache-type { mandatory true; description "Type of Cache and specific parameters."; case immediate-cache { container immediate-cache { if-feature immediate-cache; description "Flow expiration after the first packet; generation of Packet Records."; uses cache-layout-parameters; } } case timeout-cache { container timeout-cache { if-feature timeout-cache; description "Flow expiration after active and idle timeout; generation of Flow Records."; uses flow-timeout-natural-cache-parameters; uses cache-layout-parameters { augment "cache-layout/cache-field" { description "Augment the Cache layout with timeout cache specific configuration."; leaf is-flow-key { when "../ie-enterprise-number != 29305" { description "This parameter is not available for Reverse Information Elements (which have enterprise number 29305)."; } type empty; description "If present, this is a flow key."; } } } uses flow-cache-parameters-state; } } case natural-cache { container natural-cache { if-feature natural-cache; description "Flow expiration after active and idle timeout, or on natural termination (e.g., TCP FIN or TCP RST) of the Flow; generation of Flow Records."; uses flow-timeout-natural-cache-parameters; uses cache-layout-parameters { augment "cache-layout/cache-field" { description "Augment the Cache layout with timeout cache specific configuration."; leaf is-flow-key { when "../ie-enterprise-number != 29305" { description "This parameter is not available for Reverse Information Elements (which have enterprise number 29305)."; } type empty; description "If present, this is a flow key."; } } } uses flow-cache-parameters-state; } } case permanent-cache { container permanent-cache { if-feature permanent-cache; description "No flow expiration, periodical export with time interval exportInterval; generation of Flow Records."; uses flow-permanent-cache-parameters; uses cache-layout-parameters { augment "cache-layout/cache-field" { description "Augment the Cache layout with timeout cache specific configuration."; leaf is-flow-key { when "../ie-enterprise-number != 29305" { description "This parameter is not available for Reverse Information Elements (which have enterprise number 29305)."; } type empty; description "If present, this is a flow key."; } } } uses flow-cache-parameters-state; } } } leaf-list exporting-process { if-feature ipfix:exporter; type leafref { path "/ipfix:ipfix" + "/ipfix:exporting-process" + "/ipfix:name"; } description "Records are exported by all Exporting Processes in the list."; } leaf metering-process-id { type uint32; config false; description "The identifier of the Metering Process this Cache belongs to. This parameter corresponds to the Information Element meteringProcessId. Its occurrence helps to associate Cache parameters with Metering Process statistics exported by the Monitoring Device using the Metering Process (Reliability) Statistics Template as defined by the IPFIX protocol specification."; reference "RFC 7011, Sections 4.1 and 4.2; IANA registry for IPFIX Entities, http://www.iana.org/assignments/ipfix"; } leaf data-records { type yang:counter64; units "Data Records"; config false; description "The number of Data Records generated by this Cache. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of cacheDiscontinuityTime. Note that this parameter corresponds to ipfixMeteringProcessDataRecords in the IPFIX MIB module."; reference "RFC 6615, Section 8 (ipfixMeteringProcessDataRecords)"; } leaf cache-discontinuity-time { type yang:date-and-time; config false; description "Timestamp of the most recent occasion at which the counter dataRecords suffered a discontinuity. Note that this parameter functionally corresponds to ipfixMeteringProcessDiscontinuityTime in the IPFIX MIB module. In contrast to ipfixMeteringProcessDiscontinuityTime, the time is absolute and not relative to sysUpTime."; reference "RFC 6615, Section 8 (ipfixMeteringProcessDiscontinuityTime)"; } } } } }