Skip to content

Commit d7c1412

Browse files
authored
Merge pull request #50 from open-traffic-generator/dev-link-bandwidth
link bandwidth for bgp and bmp ext comm
2 parents 6a4e198 + 311687b commit d7c1412

3 files changed

Lines changed: 55 additions & 13 deletions

File tree

artifacts/open-traffic-generator-bgp.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ module: open-traffic-generator-bgp
5050
| | | | +--ro global_2byte_as? uint16
5151
| | | | +--ro local_4byte_admin? uint32
5252
| | | +--ro route_origin_subtype
53-
| | | +--ro global_2byte_as? uint16
54-
| | | +--ro local_4byte_admin? uint32
53+
| | | | +--ro global_2byte_as? uint16
54+
| | | | +--ro local_4byte_admin? uint32
55+
| | | +--ro link_bandwidth_subtype
56+
| | | +--ro global_2byte_as? uint16
57+
| | | +--ro bandwidth? otg-types:ieeefloat32
5558
| | +--ro transitive_ipv4_address_type
5659
| | | +--ro transitive_ipv4_address_type? enumeration
5760
| | | +--ro route_target_subtype
@@ -113,8 +116,11 @@ module: open-traffic-generator-bgp
113116
| | | +--ro global_2byte_as? uint16
114117
| | | +--ro local_4byte_admin? uint32
115118
| | +--ro route_origin_subtype
116-
| | +--ro global_2byte_as? uint16
117-
| | +--ro local_4byte_admin? uint32
119+
| | | +--ro global_2byte_as? uint16
120+
| | | +--ro local_4byte_admin? uint32
121+
| | +--ro link_bandwidth_subtype
122+
| | +--ro global_2byte_as? uint16
123+
| | +--ro bandwidth? otg-types:ieeefloat32
118124
| +--ro transitive_ipv4_address_type
119125
| | +--ro transitive_ipv4_address_type? enumeration
120126
| | +--ro route_target_subtype

artifacts/open-traffic-generator-bmp-server.txt

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ module: open-traffic-generator-bmp-server
7979
| | | | | +--ro global_2byte_as? uint16
8080
| | | | | +--ro local_4byte_admin? uint32
8181
| | | | +--ro route_origin_subtype
82-
| | | | +--ro global_2byte_as? uint16
83-
| | | | +--ro local_4byte_admin? uint32
82+
| | | | | +--ro global_2byte_as? uint16
83+
| | | | | +--ro local_4byte_admin? uint32
84+
| | | | +--ro link_bandwidth_subtype
85+
| | | | +--ro global_2byte_as? uint16
86+
| | | | +--ro bandwidth? otg-types:ieeefloat32
8487
| | | +--ro transitive_ipv4_address_type
8588
| | | | +--ro transitive_ipv4_address_type? enumeration
8689
| | | | +--ro route_target_subtype
@@ -144,8 +147,11 @@ module: open-traffic-generator-bmp-server
144147
| | | | +--ro global_2byte_as? uint16
145148
| | | | +--ro local_4byte_admin? uint32
146149
| | | +--ro route_origin_subtype
147-
| | | +--ro global_2byte_as? uint16
148-
| | | +--ro local_4byte_admin? uint32
150+
| | | | +--ro global_2byte_as? uint16
151+
| | | | +--ro local_4byte_admin? uint32
152+
| | | +--ro link_bandwidth_subtype
153+
| | | +--ro global_2byte_as? uint16
154+
| | | +--ro bandwidth? otg-types:ieeefloat32
149155
| | +--ro transitive_ipv4_address_type
150156
| | | +--ro transitive_ipv4_address_type? enumeration
151157
| | | +--ro route_target_subtype
@@ -210,8 +216,11 @@ module: open-traffic-generator-bmp-server
210216
| | | | +--ro global_2byte_as? uint16
211217
| | | | +--ro local_4byte_admin? uint32
212218
| | | +--ro route_origin_subtype
213-
| | | +--ro global_2byte_as? uint16
214-
| | | +--ro local_4byte_admin? uint32
219+
| | | | +--ro global_2byte_as? uint16
220+
| | | | +--ro local_4byte_admin? uint32
221+
| | | +--ro link_bandwidth_subtype
222+
| | | +--ro global_2byte_as? uint16
223+
| | | +--ro bandwidth? otg-types:ieeefloat32
215224
| | +--ro transitive_ipv4_address_type
216225
| | | +--ro transitive_ipv4_address_type? enumeration
217226
| | | +--ro route_target_subtype
@@ -275,8 +284,11 @@ module: open-traffic-generator-bmp-server
275284
| | | +--ro global_2byte_as? uint16
276285
| | | +--ro local_4byte_admin? uint32
277286
| | +--ro route_origin_subtype
278-
| | +--ro global_2byte_as? uint16
279-
| | +--ro local_4byte_admin? uint32
287+
| | | +--ro global_2byte_as? uint16
288+
| | | +--ro local_4byte_admin? uint32
289+
| | +--ro link_bandwidth_subtype
290+
| | +--ro global_2byte_as? uint16
291+
| | +--ro bandwidth? otg-types:ieeefloat32
280292
| +--ro transitive_ipv4_address_type
281293
| | +--ro transitive_ipv4_address_type? enumeration
282294
| | +--ro route_target_subtype

models/bgp/open-traffic-generator-bgp.yang

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,11 @@ module open-traffic-generator-bgp {
461461
description
462462
"Transitive Two-Octet AS-Specific Extended Community is route_origin_subtype";
463463
}
464+
enum LINK_BANDWIDTH_SUBTYPE {
465+
description
466+
"Transitive Two-Octet AS-Specific Extended Community is link_bandwidth_subtype";
467+
}
468+
464469
}
465470
description
466471
"The type of Transitive Two-Octet AS-Specific Extended Community";
@@ -507,6 +512,25 @@ module open-traffic-generator-bgp {
507512
carried in the Global Administrator sub-field has been assigned by an appropriate authority.";
508513
}
509514
}
515+
516+
container link_bandwidth_subtype {
517+
config false;
518+
description
519+
"The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. (https://datatracker.ietf.org/doc/draft-ietf-idr-link-bandwidth) It is sent with sub-type as 0x04.";
520+
521+
leaf global_2byte_as {
522+
type uint16;
523+
description
524+
"The value of the Global Administrator subfield should represent the Autonomous System
525+
of the router that attaches the Link Bandwidth Community.";
526+
}
527+
528+
leaf bandwidth {
529+
type otg-types:ieeefloat32;
530+
description
531+
"Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second )";
532+
}
533+
}
510534
}
511535

512536
grouping transitive_ipv4_address {
@@ -712,7 +736,7 @@ module open-traffic-generator-bgp {
712736
container link_bandwidth_subtype {
713737
config false;
714738
description
715-
"TBD: xxx";
739+
"The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. (https://datatracker.ietf.org/doc/draft-ietf-idr-link-bandwidth) It is sent with sub-type as 0x04.";
716740

717741
leaf global_2byte_as {
718742
type uint16;

0 commit comments

Comments
 (0)