module ietf-lspping { namespace "urn:ietf:params:xml:ns:yang:ietf-lspping"; //namespace need to be assigned by IANA prefix "lspping"; import ietf-inet-types { prefix inet; } import ietf-yang-types{ prefix yang; } organization "IETF Multiprotocl Label Switching Working Group"; contact "draft-zheng-mpls-lsp-ping-yang-cfg"; description "MPLS LSP-Ping YANG Module"; revision "2017-10-29" { description "06 version, refine the target fec type, as per RFC8029"; reference "draft-zheng-mpls-lsp-ping-yang-cfg"; } typedef target-fec-type { type enumeration { enum ip-prefix { value "0"; description "IPv4/IPv6 prefix"; } enum bgp { value "1"; description "BGP IPv4/IPv6 prefix"; } enum rsvp { value "2"; description "Tunnel interface"; } enum vpn { value "3"; description "VPN IPv4/IPv6 prefix"; } enum pw { value "4"; description "FEC 128 pseudowire IPv4/IPv6"; } enum vpls { value "5"; description "FEC 129 pseudowire IPv4/IPv6"; } } description "Target FEC type."; } typedef reply-mode { type enumeration { enum do-not-reply { value "1"; description "Do not reply"; } enum reply-via-udp { value "2"; description "Reply via an IPv4/IPv6 UDP packet"; } enum reply-via-udp-router-alert { value "3"; description "Reply via an IPv4/IPv6 UDP packet with Router Alert"; } enum reply-via-control-channel { value "4"; description "Reply via application level control channel"; } } description "Reply mode."; } typedef units { type enumeration { enum seconds { description "Seconds"; } enum milliseconds { description "Milliseconds"; } enum microseconds { description "Microseconds"; } enum nanoseconds { description "Nanoseconds"; } } description "Time units"; } typedef operational-status { type enumeration { enum enabled { value "1"; description "The Test is active."; } enum disabled { value "2"; description "The test has stopped."; } enum completed { value "3"; description "The test is completed."; } } description "Operational state of a LSP Ping test."; } typedef result-type { type enumeration { enum success { value "1"; description "The test probe is successed."; } enum fail { value "2"; description "The test probe has failed."; } enum timeout { value "3"; description "The test probe is timeout."; } } description "Result of each LSP Ping test probe."; } container lsp-pings { description "Multi instance of LSP Ping test."; list lsp-ping { key "lsp-ping-name"; description "LSP Ping test"; leaf lsp-ping-name { type string { length "1..31"; } mandatory "true"; description "LSP Ping test name."; } container control-info { description "Control information of the LSP Ping test."; leaf target-fec-type { type target-fec-type; description "Specifies the address type of Target FEC."; } choice target-fec { case ip-prefix { leaf ip-address { type inet:ip-address; description "IPv4/IPv6 Prefix."; } } case bgp { leaf bgp { type inet:ip-address; description "BGP IPv4/IPv6 Prefix."; } } case rsvp { leaf tunnel-interface { type uint32; description "Tunnel interface"; } } case vpn { leaf vrf-name { type uint32; description "Layer3 VPN Name."; } leaf vpn-ip-address { type inet:ip-address; description "Layer3 VPN IPv4 Prefix."; } } case pw { leaf vcid { type uint32; description "VC ID"; } } case vpls { leaf vsi-name { type string; description "VPLS VSI"; } } description "Specifies the address of Target FEC"; } leaf traffic-class { type uint8; description "Specifies the Traffic Class."; } leaf reply-mode { type reply-mode; description "Specifies the reply mode."; } leaf timeout { type uint32; description "Specifies the time-out value for a LSP Ping operation."; } leaf timeout-units { type units; description "Time-out units."; } leaf interval { type uint32; default 1; description "Specifies the interval to send a LSP Ping echo request packet(probe) as part of one LSP Ping test."; } leaf interval-units { type units; default seconds; description "Interval units."; } leaf probe-count { type uint32; default 5; description "Specifies the number of probe sent of one LSP Ping test."; } leaf data-size { type uint32; description "Specifies the size of the data portion to be transmitted in a LSP Ping operation, in octets."; } leaf data-fill { type string{ length "0..1564"; } description "Used together with the corresponding data-size value to determine how to fill the data portion of a probe packet."; } leaf description { type string{ length "1..31"; } description "A descriptive name of the LSP Ping test."; } leaf source-address-type { type inet:ip-version; description "Specifies the type of the source address."; } leaf source-address { type inet:ip-address; description "Specifies the source address."; } leaf ttl { type uint32; default 255; description "Time to live."; } choice outbound { case interface { leaf interface-name{ type string{ length "1..255"; } description "Specifies the outgoing interface."; } } case nexthop{ leaf nexthop { type inet:ip-address; description "Specifies the nexthop."; } } description "Specifies the out interface or nexthop"; } } container schedule-parameters { description "LSP Ping test schedule parameter"; choice start-test{ case now { leaf start-test-now { type empty; description "Start test now."; } } case at { leaf start-test-at { type yang:date-and-time; description "Start test at a specific time."; } } case delay { leaf start-test-delay { type uint32; description "Start after a specific delay."; } leaf start-test-delay-units { type units; default seconds; description "Delay units."; } } case daily { leaf start-test-daily { type yang:date-and-time; description "Start test daily."; } } description "Specifies when the test begins to start, include 4 schedule method: start now(1), start at(2), start delay(3), start daily(4)."; } choice end-test{ case at { leaf end-test-at{ type yang:date-and-time; description "End test at a specific time."; } } case delay { leaf end-test-delay { type uint32; description "End after a specific delay."; } leaf end-test-delay-units { type units; default seconds; description "Delay units."; } } case lifetime { leaf end-test-lifetime { type uint32; description "Set the test lifetime."; } leaf lifetime-units { type units; default seconds; description "Lifetime units."; } } description "Specifies when the test ends, include 3 schedule method: end at(1), end delay(2), end lifetime(3)."; } } container result-info { config "false"; description "LSP Ping test result information."; leaf operational-status { type operational-status; description "Operational state of a LSP Ping test"; } leaf source-address-type { type inet:ip-version; description "The source address type."; } leaf source-address { type inet:ip-address; description "The source address of the test."; } leaf target-fec-type { type target-fec-type; description "The Target FEC address type."; } choice target-fec { case ip-prefix { leaf ip-address { type inet:ip-address; description "IPv4/IPv6 Prefix."; } } case bgp { leaf bgp { type inet:ip-address; description "BGP IPv4/IPv6 Prefix."; } } case rsvp { leaf tunnel-interface { type uint32; description "Tunnel interface"; } } case vpn { leaf vrf-name { type uint32; description "Layer3 VPN Name."; } leaf vpn-ip-address { type inet:ip-address; description "Layer3 VPN IPv4 Prefix."; } } case pw { leaf vcid { type uint32; description "VC ID"; } } case vpls { leaf vsi-name { type string; description "VPLS VSI"; } } description "The Target FEC address"; } leaf min-rtt { type uint32; description "The minimum LSP Ping round-trip-time (RTT) received."; } leaf max-rtt { type uint32; description "The maximum LSP Ping round-trip-time (RTT) received."; } leaf average-rtt { type uint32; description "The current average LSP Ping round-trip-time (RTT)."; } leaf probe-responses { type uint32; description "Number of responses received for the corresponding LSP Ping test."; } leaf sent-probes { type uint32; description "Number of probes sent for the corresponding LSP Ping test."; } leaf sum-of-squares { type uint32; description "The sum of the squares for all replys received."; } leaf last-good-probe { type yang:date-and-time; description "Date and time when the last response was received for a probe."; } container probe-results { description "Result info of test probes."; list probe-result { key "probe-index"; description "Result info of each test probe."; leaf probe-index { type uint32; description "Probe index"; } leaf return-code { type uint8; description "The Return Code set in the echo reply."; } leaf return-sub-code { type uint8; description "The Return Sub-code set in the echo reply."; } leaf rtt { type uint32; description "The round-trip-time (RTT) received."; } leaf result-type { type result-type; description "The probe result type."; } } } } } } }