module ietf-connectionless-oam-methods { namespace "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam-methods"; prefix cloam-methods; import ietf-interfaces { prefix if; } import ietf-connectionless-oam { prefix cl-oam; } organization "IETF LIME Working Group"; contact "Deepak Kumar dekumar@cisco.com Qin Wu bill.wu@huawei.com S Raghavan srihari@cisco.com Zitao Wang wangzitao@huawei.com R Rahman rrahman@cisco.com"; description "This YANG module defines the RPC operations for connectionless OAM to be used within IETF in a protocol Independent manner. It is assumed that each protocol maps corresponding abstracts to its native format. Each protocol may extend the YANG model defined here to include protocol specific extensions"; revision 2017-09-06{ description "08 version"; reference "draft-ietf-lime-yang-connectionless-oam-methods"; } identity protocol-id { description "This is base identity for a generic protocol ID. The protocol registry can be found in https://www.iana.org/protocols."; } identity protocol-id-internet { base protocol-id; description "Identity for Internet Protocols."; } identity protocol-id-proprietary { base protocol-id; description "Identity for proprietary protocol (e.g.,IP SLA)."; } identity protocol-id-sfc { base protocol-id; description "Identity for Service Function Chaining."; } identity protocol-id-mpls { base protocol-id; description "MPLS protocol."; } identity protocol-id-mpls-tp { base protocol-id; description "MPLS-TP protocol."; } identity protocol-id-twamp { base protocol-id; description "TWAMP protocol."; } identity protocol-id-bier { base protocol-id; description "BIER protocol."; } identity status-code { description "This is Base Identity for status code."; } identity success-reach { base status-code; description "Indicate that the destination being verified is reachable (See RFC7276)."; } identity fail-reach { base status-code; description "Indicate that the destination being verified is not reachable (See RFC7276)."; } identity success-path-verification { base status-code; description "Indicate that the path verification is performed successfully (See RFC7276)."; } identity fail-path-verification { base status-code; description "Indicate that the path verification fails (See RFC7276)."; } identity status-sub-code { description "IdentityBase status sub code."; } identity invalid-cc { base status-sub-code; description "Indicates that the Continuity check message is invalid (See RFC7276)."; } identity invalid-pd { base status-sub-code; description "Indicates that the path discovery message is invalid (See RFC7276)."; } identity protocol-id-meta-data { description "This is base identity for meta-data corresponding to protocol ID."; } identity protocol-internet-number { base protocol-id-meta-data; description "Internet Protocol Number for standard Internet Protocols (IANA assigned Internet Protocol numbers) to help in protocol processing. The protocol IDs registry can be found in https://www.iana.org/assignments/protocol-numbers /protocol-numbers.xhtml."; } grouping rpc-input-parameters { container destination-tp { uses cl-oam:tp-address; description "Destination test point."; } leaf source-interface { type if:interface-ref; mandatory true; description "Source interface."; } leaf outbound-interface { type if:interface-ref; mandatory true; description "Outbound interface."; } leaf vrf { type cl-oam:routing-instance-ref; description "VRF instance."; } description "Grouping for RPC input parameters"; } rpc continuity-check { if-feature "cl-oam:continuity-check"; description "Continuity-check RPC operation as per RFC7276."; input { uses rpc-input-parameters; uses cl-oam:session-type { description "If session-type is specified, then session-type must be set to on-demand"; } leaf count { type uint32 { range 0..4294967295 { description "The overall number of packet to be transmitted by the sender. The value of count will be set to zero (0) on creation and will thereafter increase monotonically until it reaches a maximum value of 2^32-1 (4294967295 decimal), when it wraps around and starts increasing again from zero."; } } default "5"; description "Specifies the number of packets that will be sent. By default, the packet number is set to 5."; } leaf ttl { type uint8; default "255"; description "Time to live (TTL) used to limit lifetime of data packet transmitted in the network and prevent looping. The TTL value is decremented for every hop which the packet traverses. If the TTL is zero, the data packet will be discarded."; } leaf packet-size { type uint32 { range "64..10000"; } default "64"; description "Packet size of continuity-check message, in octets. By default, the packet size is set to 64 octets."; } } output { container response-info { leaf protocol-id { type identityref { base protocol-id; } mandatory true; description "Protocol used in continuity check message. This could be a standard protocol (e.g., TCP/IP protocols, MPLS etc.,) or a proprietary protocol as identified by this field."; } leaf protocol-id-meta-data { type identityref { base protocol-id-meta-data; } description "An optional meta-data related to the protocol ID. For e.g., this could be the Internet Protocol number for standard Internet Protocols for help in protocol processing."; } leaf status-code { type identityref{ base status-code; } mandatory true; description "Status code for continuity check RPC operation. This could be a basic status code (e.g., destination is reachable or destination is not reachable (See RFC7276)) or some customized status code as identified by this field."; } leaf status-sub-code { type identityref{ base status-sub-code; } mandatory true; description "An optional status sub code for continuity check RPC operation. If the basic status code is destination reachable, this status-sub-code doesn't need to be specified. If the basic status code is destination unreachable, the status-sub-code can be used to specify the detailed reasons. This could be a basic sub-status-code (such as invalid cc) or other error codes specific to the protocol under use for CC For example if ICMP is the protocol under use, the error codes defined in [RFC4443] can be used to specify the reasons specific to ICMP. These technology specific status-sub-code can be defined in technology specific models."; } description "Status Code and Status sub code for continuity check RPC operation."; } uses cl-oam:continuity-check-data; } } rpc path-discovery { if-feature "cl-oam:path-discovery"; description "Path discovery RPC operation as per RFC7276."; input { uses rpc-input-parameters; uses cl-oam:session-type { description "If session-type is specified, then session-type must be set to on-demand"; } leaf max-ttl { type uint8; default "255"; description "Maximum TTL indicates the maixmum number of hops that a packet is permitted to travel before being discarded by a router. By default, the maximimum TTL is set to 255."; } } output { list response-list { key "response-index"; description "Path discovery response list."; leaf response-index { type uint32; mandatory true; description "Response index."; } leaf protocol-id { type identityref { base protocol-id; } mandatory true; description "Protocol used in PD. This could be a standard protocol (e.g., TCP/IP protocols, MPLS etc.,) or a proprietary protocol as identified by this field."; } leaf protocol-id-meta-data { type identityref { base protocol-id-meta-data; } description "An optional meta-data related to the protocol ID. For e.g., this could be the Internet Protocol number for standard Internet Protocols for help in protocol processing."; } leaf status-code { type identityref{ base status-code; } mandatory true; description "Status code for continuity check RPC operation. This could be a basic status code (e.g., destination is reachable or destination is not reachable) or some customized status code as identified by this field."; } leaf status-sub-code { type identityref{ base status-sub-code; } mandatory true; description "An optional status sub code for continuity check RPC operation. If the basic status code is destination reachable, this status-sub-code doesn't need to be specified. If the basic status code is destination unreachable, the status-sub-code can be used to specify the detailed reasons. This could be a basic sub-status-code (such as invalid cc) or other error codes specific to the protocol under use for CC For example if ICMP is the protocol under use, the error codes defined in [RFC4443] can be used to specify the reasons specific to ICMP. These technology specific status-sub-code can be defined in technology specific models."; } } uses cl-oam:path-discovery-data; } } }