3 namespace "urn:opendaylight:params:xml:ns:yang:bgp-types";
6 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
8 organization "Cisco Systems, Inc.";
9 contact "Dana Kutenicsova <dkutenic@cisco.com>";
12 "This module contains the base concepts contained in RFC4271 and RFC4760.
14 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
16 This program and the accompanying materials are made available
17 under the terms of the Eclipse Public License v1.0 which
18 accompanies this distribution, and is available at
19 http://www.eclipse.org/legal/epl-v10.html";
21 revision "2013-09-19" {
24 reference "RFC4271, RFC4760";
28 reference "http://tools.ietf.org/html/rfc4271#section-5";
29 description "Values of BGP Origin Path Attribute.";
43 identity address-family {
44 reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
47 identity ipv4-address-family {
51 identity ipv6-address-family {
55 identity subsequent-address-family {
56 reference "http://tools.ietf.org/html/rfc4760#section-6";
59 identity unicast-subsequent-address-family {
60 reference "http://tools.ietf.org/html/rfc4760#section-6";
62 base subsequent-address-family;
65 identity mpls-labeled-vpn-subsequent-address-family {
66 reference "http://tools.ietf.org/html/rfc4760#section-6";
68 base subsequent-address-family;
71 typedef cluster-identifier {
72 reference "http://tools.ietf.org/html/rfc4456#section-8";
73 type inet:ipv4-address;
76 typedef short-as-number {
82 grouping bgp-aggregator {
83 reference "http://tools.ietf.org/html/rfc4271#section-5.1.7";
84 description "BGP Path Attribute AGGREGATOR.";
86 // We are acting as a NEW speaker, so only four bytes are allowed
89 leaf network-address {
90 type inet:ipv4-address;
95 reference "https://tools.ietf.org/html/rfc1997";
96 description "Community Path Attribute";
105 grouping extended-community {
112 choice extended-community {
113 case as-specific-extended-community-case {
114 container as-specific-extended-community {
115 when "../comm-type = 0 and ../comm-sub-type = 0 or ../comm-type = 40 and ../comm-sub-type = 0";
119 leaf global-administrator {
120 type short-as-number;
122 leaf local-administrator {
129 case inet4-specific-extended-community-case {
130 container inet4-specific-extended-community {
131 when "../comm-type = 1 and ../comm-sub-type = 0 or ../comm-type = 41 and ../comm-sub-type = 0";
135 leaf global-administrator {
136 type inet:ipv4-address;
138 leaf local-administrator {
145 case opaque-extended-community-case {
146 container opaque-extended-community {
147 when "../comm-type = 3 and ../comm-sub-type = 0 or ../comm-type = 43 and ../comm-sub-type = 0";
158 case route-target-extended-community-case {
159 container route-target-extended-community {
160 when "../comm-type = 1 and ../comm-sub-type = 2 or ../comm-type = 2 and ../comm-sub-type = 2 or ../comm-type = 3 and ../comm-sub-type = 2";
161 leaf global-administrator {
162 type short-as-number;
164 leaf local-administrator {
171 case route-origin-extended-community-case {
172 container route-origin-extended-community {
173 when "../comm-type = 1 and ../comm-sub-type = 3 or ../comm-type = 2 and ../comm-sub-type = 3 or ../comm-type = 3 and ../comm-sub-type = 3";
174 leaf global-administrator {
175 type short-as-number;
177 leaf local-administrator {
189 case ipv4-next-hop-case {
190 container ipv4-next-hop {
191 reference "http://tools.ietf.org/html/rfc4271#section-5.1.3";
193 type inet:ipv4-address;
197 case ipv6-next-hop-case {
198 container ipv6-next-hop {
199 reference "http://tools.ietf.org/html/rfc4760#section-3";
201 type inet:ipv6-address;
204 type inet:ipv6-address;
211 grouping as-path-segment {
212 reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";
214 description "This model is obsolete and please use just leaf-lists as-sequence and as-set nested directly under as-path-segment.";
233 leaf-list as-sequence {