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";
78 typedef short-as-number {
84 grouping bgp-aggregator {
85 reference "http://tools.ietf.org/html/rfc4271#section-5.1.7";
86 description "BGP Path Attribute AGGREGATOR.";
88 // We are acting as a NEW speaker, so only four bytes are allowed
91 leaf network-address {
92 type inet:ipv4-address;
97 reference "https://tools.ietf.org/html/rfc1997";
98 description "Community Path Attribute";
107 grouping extended-community {
114 choice extended-community {
115 case as-specific-extended-community-case {
116 container as-specific-extended-community {
117 when "../comm-type = 0 and ../comm-sub-type = 0 or ../comm-type = 40 and ../comm-sub-type = 0";
121 leaf global-administrator {
122 type short-as-number;
124 leaf local-administrator {
131 case inet4-specific-extended-community-case {
132 container inet4-specific-extended-community {
133 when "../comm-type = 1 and ../comm-sub-type = 0 or ../comm-type = 41 and ../comm-sub-type = 0";
137 leaf global-administrator {
138 type inet:ipv4-address;
140 leaf local-administrator {
147 case opaque-extended-community-case {
148 container opaque-extended-community {
149 when "../comm-type = 3 and ../comm-sub-type = 0 or ../comm-type = 43 and ../comm-sub-type = 0";
160 case route-target-extended-community-case {
161 container route-target-extended-community {
162 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";
163 leaf global-administrator {
164 type short-as-number;
166 leaf local-administrator {
173 case route-origin-extended-community-case {
174 container route-origin-extended-community {
175 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";
176 leaf global-administrator {
177 type short-as-number;
179 leaf local-administrator {
191 case ipv4-next-hop-case {
192 container ipv4-next-hop {
193 reference "http://tools.ietf.org/html/rfc4271#section-5.1.3";
195 type inet:ipv4-address;
199 case ipv6-next-hop-case {
200 container ipv6-next-hop {
201 reference "http://tools.ietf.org/html/rfc4760#section-3";
203 type inet:ipv6-address;
206 type inet:ipv6-address;
213 grouping as-path-segment {
214 reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";