module irt-traffic { yang-version 1.1; namespace urn:fr:irt:eden:yang:irt-traffic; prefix irttf; import ietf-network { prefix nw; revision-date "2018-02-26"; } import ietf-interfaces { prefix if; revision-date "2018-02-20"; } import irt-types { prefix irtty; } organization "IRT Saint Exupéry - Toulouse"; contact "IRT Saint Exupéry - Toulouse EDEN project team "; description "This module is containing a whole set of artifacts in order to describe the traffic."; revision 2023-04-28 { description "Initial revision."; } typedef tBenchGenerator { type enumeration { enum automatic { description "The traffic is to be automatically generated, based on its characteristics (periodic, burst, protocol,...), for example with trafgen. No parameter is used in that case."; } enum manual { description "The traffic must not automatically generated: the operator has to generate the traffic for this flow manually. No parameter is used in that case."; } enum command { description "One parameter is used, and is the command to execute remotely on the emitter node."; } enum script { description "One parameter is used, and is the path to a shell script to upload and execute remotely on the emitter node"; } enum mediaStream { description "Two parameter are used, both are a path to a shell script. The first is to be uploaded and executed remotely on the talker node, the second is to upload and executed remotely on the emitter node"; } enum pcapReplay { description "Two parameters are used. The first is the path to a pcap file to upload and replay on the emitter node. The second contains the pcap replay utility parameters, if needed."; } } } container traffics { list Traffic { key "name"; leaf name { type string; } container flows { list Flow { key "name"; leaf name { type string; } leaf vlan-id { type uint16 { range "0..4094"; } description "VLAN identifier. Special value 0 means no QTAG. Note: the presence/absence of QTAG is accounted in protocol-overhead"; } leaf payload-min { type irtty:tDataByte; description "Minimal number of bytes for the payload. Note: it is the payload at system/functional level, not the Ethernet payload. As a consequence, if this payload size is 0, the Ethernet payload will be padded up to minimal Ethernet PDU size, 42 bytes"; } leaf payload-max { type irtty:tDataByte; description "Maximal number of bytes for the payload. Note: it is the payload at system/functional level, not the Ethernet payload. As a consequence, if this payload size is 0, the Ethernet payload will be padded up to minimal Ethernet PDU size, 42 bytes"; } leaf protocol-id { type leafref { path "/traffics/Traffic/protocols/Protocol/name"; } } leaf protocol-overhead { type irtty:tDataByte; } leaf burst { type irtty:tDataByte; } leaf periodic { type boolean; } leaf minimal-inter-arrival-time { type irtty:tDurationMilli; } leaf interFrame { type irtty:tDurationMilli; } leaf offset { type irtty:tDurationNano; } leaf offset-type { type irtty:tOffsetType; } leaf source-jitter { type irtty:tDurationMilli; } leaf synchronization { type boolean; } leaf best-effort { type boolean; } leaf source-id { type nw:node-id; } leaf class-id { type leafref { path "/traffics/Traffic/classes/Class/name"; } } leaf maximal-latency { type irtty:tDurationMilli; } leaf maximal-jitter { type irtty:tDurationMilli; } list Cast { description "One (unicast) or more (multicast) ways to reach different destinations."; key "id"; leaf id { type uint32; description "Uniquely identifies an entry in the list."; } leaf label { type string; } leaf dest-id { description "Destination of the cast"; type nw:node-id; } container path { description "Definition of the sub-paths of the path, with or without redundancy. If there is no redundancy, a unique Segment is used to define the the path of a cast, whereas multiple segments are needed to describe the redondancy."; list Sub-path { key "id"; leaf id { description "Uniquely identifies an entry in the list."; type uint32; } list Segment { description "The list of segments of the subpath. When there is a unique segment, there is no FRER. When there are at least two segments means FRER is used. The first port gives the replication node. The elimination port is given by the first segment of the next subpath."; key "id"; leaf id { type uint32; description "Uniquely identifies an entry in the list."; } leaf-list egress-port { type if:interface-ref; } } } } } container bench-generator { leaf type { type tBenchGenerator; } leaf-list parameters { type string; description "Depends on the generator type: see tBenchGenerator descriptions."; } } } } container classes { list Class { key "name"; leaf name { type string; } leaf priority { type irtty:tPriority; } leaf ATS { type boolean; } leaf CBS { type boolean; } leaf CQF { type boolean; } leaf TAS { type boolean; } leaf FRER { type boolean; } leaf synchronization { type boolean; } leaf preemptive { type boolean; } leaf iDSL { type irtty:tCBSSlope; } } } container protocols { list Protocol { key "name"; leaf name { type string; } leaf overHead { type int32; units "byte"; } leaf supportsFragmentation { type boolean; } } } container cycles { list CEW { key "name"; leaf name { type string; } leaf period { type irtty:tDurationNano; } leaf offset { type irtty:tDurationNano; } leaf duration { type irtty:tDurationNano; } } } list Constraint { key "name"; leaf name { type string; } leaf cycle-id { type leafref { path "/traffics/Traffic/cycles/CEW/name"; } } leaf maximal-delay { type irtty:tDurationMicro; } leaf maximal-jitter { type irtty:tDurationMicro; } leaf cycle-shift { type uint16; } choice ConstraintCategory{ case ChainedConstraint { list ChainItem { key "id"; leaf id { type uint16; } leaf flow-id { type leafref { path "/traffics/Traffic/flows/Flow/name"; } } leaf minimal-latency { type irtty:tDurationMicro; } leaf maximal-latency { type irtty:tDurationMicro; } leaf exclusive { type boolean; } } } case SingleFlowConstraint { leaf flow-id { type leafref { path "/traffics/Traffic/flows/Flow/name"; } } leaf from-id { type nw:node-id; } leaf to-id { type nw:node-id; } } } } } } }