This YANG module defines the operational state for OSPFv3 Segment Routing, which is common across all of the vendor implementati...
Version: 2021-10-18
module ietf-ospfv3-sr { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-ospfv3-sr"; prefix ospfv3-sr; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } import ietf-routing { prefix rt; } import ietf-ospf { prefix ospf; } import ietf-ospfv3-extended-lsa { prefix ospfv3-e-lsa; } import ietf-ospf-sr { prefix ospf-sr; } organization "IETF LSR - Link State Routing Working Group"; contact "WG Web: <http://tools.ietf.org/wg/lsr> WG List: <mailto:lsr@ietf.org> Author: Yingzhen Qu <mailto:yqu@futurewei.com> Author: Acee Lindem <mailto:acee@cisco.com>"; description "This YANG module defines the operational state for OSPFv3 Segment Routing, which is common across all of the vendor implementations. It is intended that the module will be extended by vendors to define vendor-specific OSPFv3 Segment Routing configuration and operational parameters and policies. This YANG model conforms to the Network Management Datastore Architecture (NMDA) as described in RFC 8342. Copyright (c) 2021 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 (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices. 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."; reference "RFC XXXX"; revision "2021-10-18" { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for OSPFv3 Segment Routing."; } grouping ospfv3-prefix-sid-sub-tlvs { description "Prefix Segment ID (SID) sub-TLVs."; container perfix-sid-sub-tlvs { description "Prefix SID sub-TLV."; list prefix-sid-sub-tlv { description "Prefix SID sub-TLV."; container ospfv3-prefix-sid-flags { description "Segment Identifier (SID) Flags."; leaf-list bits { type identityref { base ospf-sr:prefix-sid-bit; } description "Prefix SID Sub-TLV flag bits list."; } } // container ospfv3-prefix-sid-flags leaf algorithm { type uint8; description "The algorithm associated with the prefix-SID."; } leaf sid { type uint32; description "An index or label."; } } // list prefix-sid-sub-tlv } // container perfix-sid-sub-tlvs } // grouping ospfv3-prefix-sid-sub-tlvs grouping ospfv3-extended-prefix-range-tlvs { description "Extended prefix range TLV grouping."; container ospfv3-extended-prefix-range-tlvs { description "The list of extended prefix range TLVs."; list extended-prefix-range-tlv { description "The range of prefixes."; leaf prefix-length { type uint8; description "Length of prefix in bits."; } leaf af { type uint8; description "Address family for the prefix."; } leaf range-size { type uint16; description "The number of prefixes covered by the advertisement."; } leaf prefix { type inet:ip-prefix; description "Address prefix."; } uses ospfv3-prefix-sid-sub-tlvs; uses ospf:unknown-tlvs; } // list extended-prefix-range-tlv } // container ospfv3-extended-prefix-range-tlvs } // grouping ospfv3-extended-prefix-range-tlvs grouping ospfv3-adj-sid-sub-tlvs { description "Adjacency SID sub TLV grouping."; container adj-sid-sub-tlvs { description "Adjacency SID optional sub-TLVs."; list adj-sid-sub-tlv { description "List of Adjacency SID sub-TLVs."; container adj-sid-flags { description "Adj-sid sub-tlv flags."; leaf-list bits { type identityref { base ospf-sr:adj-sid-bit; } description "Adj sid sub-tlv flags list."; } } // container adj-sid-flags leaf weight { type uint8; description "Weight used for load-balancing."; } leaf sid { type uint32; description "Segment Identifier (SID) index/label."; } } // list adj-sid-sub-tlv } // container adj-sid-sub-tlvs } // grouping ospfv3-adj-sid-sub-tlvs grouping ospfv3-lan-adj-sid-sub-tlvs { description "LAN adj-sid sub TLV grouping."; container lan-adj-sid-sub-tlvs { description "LAN Adjacency SID optional sub-TLVs."; list lan-adj-sid-sub-tlv { description "List of LAN adjacency SID sub-TLVs."; container lan-adj-sid-flags { description "LAN adj-sid sub-tlv flags."; leaf-list bits { type identityref { base ospf-sr:adj-sid-bit; } description "LAN adj sid sub-tlv flags list."; } } // container lan-adj-sid-flags leaf weight { type uint8; description "Weight used for load-balancing."; } leaf neighbor-router-id { type yang:dotted-quad; description "Neighbor router ID."; } leaf sid { type uint32; description "Segment Identifier (SID) index/label."; } } // list lan-adj-sid-sub-tlv } // container lan-adj-sid-sub-tlvs } // grouping ospfv3-lan-adj-sid-sub-tlvs augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospf:router-information { when "../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "SR specific TLVs for OSPFv3 Router Information opaque LSA."; uses ospf-sr:sr-algorithm-tlv; uses ospf-sr:sid-range-tlvs; uses ospf-sr:local-block-tlvs; uses ospf-sr:srms-preference-tlv; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospf:router-information { when "../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "SR specific TLVs for OSPFv3 Router Information LSA."; uses ospf-sr:sr-algorithm-tlv; uses ospf-sr:sid-range-tlvs; uses ospf-sr:local-block-tlvs; uses ospf-sr:srms-preference-tlv; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospf:router-information { when "../../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "SR specific TLVs for OSPFv3 Router Information LSA."; uses ospf-sr:sr-algorithm-tlv; uses ospf-sr:sid-range-tlvs; uses ospf-sr:local-block-tlvs; uses ospf-sr:srms-preference-tlv; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-intra-area-prefix { when "../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Area-Scoped E-Intra-Area-Prefix LSA."; uses ospfv3-extended-prefix-range-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-inter-area-prefix { when "../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Area-Scoped E-Inter-Area-Prefix LSA."; uses ospfv3-extended-prefix-range-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-as-external { when "'ospf:../../../../../../../../../" + "rt:type' = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "OSPFv3 AS-Scoped E-AS-External LSA."; uses ospfv3-extended-prefix-range-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa { when "'ospf:../../../../../../../../../" + "rt:type' = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "OSPFv3 AS-Scoped E-NSSA LSA."; uses ospfv3-extended-prefix-range-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-link/ospfv3-e-lsa:e-link-tlvs/ospfv3-e-lsa:intra-prefix-tlv { when "../../../../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Link-Scoped Intra-Area Prefix TLV."; uses ospfv3-prefix-sid-sub-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-intra-area-prefix/ospfv3-e-lsa:e-intra-prefix-tlvs/ospfv3-e-lsa:intra-prefix-tlv { when "../../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Area-Scoped Intra-Area Prefix TLV."; uses ospfv3-prefix-sid-sub-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-inter-area-prefix/ospfv3-e-lsa:e-inter-prefix-tlvs/ospfv3-e-lsa:inter-prefix-tlv { when "../../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Area-Scoped Inter-Area Prefix TLV."; uses ospfv3-prefix-sid-sub-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-as-external/ospfv3-e-lsa:e-external-tlvs/ospfv3-e-lsa:external-prefix-tlv { when "'ospf:../../../../../../../../../" + "rt:type' = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "OSPFv3 AS-Scoped External Prefix TLV."; uses ospfv3-prefix-sid-sub-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa/ospfv3-e-lsa:e-external-tlvs/ospfv3-e-lsa:external-prefix-tlv { when "'ospf:../../../../../../../../../" + "rt:type' = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "OSPFv3 AS-Scoped External Prefix TLV."; uses ospfv3-prefix-sid-sub-tlvs; } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv { when "../../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3 E-Router LSAs"; } description "OSPFv3 Area-Scoped Adj-SID Sub-TLV."; uses ospfv3-adj-sid-sub-tlvs; uses ospfv3-lan-adj-sid-sub-tlvs; } } // module ietf-ospfv3-sr
© 2023 YumaWorks, Inc. All rights reserved.