Commit 208842a
fboss2 config/delete protocol bgp peer-group commands
Collapse the ~20 legacy per-attribute `config protocol bgp peer-group`
command classes (on the deprecated folly::dynamic BgpConfigSession) into a
single typed dispatcher, mirroring CmdConfigProtocolBgpNeighbor: the group
name is the first positional, the next one or two tokens name the attribute,
and the rest are its value(s); dispatch and per-attribute parsing live in the
.cpp so adding a peer-group tunable is a one-entry change. Attributes write
the typed bgp::thrift::PeerGroup directly via ConfigSession::getBgpConfig()/
saveBgpConfig().
Covers the 24 attributes with a PeerGroup thrift field (remote/local-asn,
description, peer-tag, ingress/egress-policy, rr-client, confed-peer,
redistribute-peer, enhanced-route-refresh, connect-mode, add-path send|
receive, afi disable-ipv4/ipv6-afi|ipv4-over-ipv6-nh, graceful-restart
restart-time|stateful-ha, max-route pre/post-filter + warning knobs, timers
hold-time|keepalive|out-delay|withdraw-unprog-delay, next-hop-self).
Attributes with no per-peer-group thrift field (afi ipv4/ipv6-labeled-unicast,
peer-port) are not part of the dispatch table, so they are refused as unknown
attributes rather than persisting dead config. connect-mode BOTH is rejected
(no is_passive representation); add-path merges the RECEIVE/SEND bitmask.
Adds `delete protocol bgp peer-group <name>`. Unit tests
(CmdConfigBgpPeerGroupTest, CmdDeleteBgpPeerGroupTest) and integration tests
(ConfigBgpPeerGroupTest) verify staging, the reject paths, and — for the
commit path — that bgpd parses and adopts peer_groups via its
getRunningConfig RPC.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 66df523 commit 208842a
50 files changed
Lines changed: 1338 additions & 2227 deletions
File tree
- cmake
- fboss/cli/fboss2
- commands
- config/protocol/bgp/peer-group
- delete/protocol/bgp/peer-group
- test
- config
- integration_test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | 869 | | |
906 | 870 | | |
907 | 871 | | |
| |||
998 | 962 | | |
999 | 963 | | |
1000 | 964 | | |
| 965 | + | |
| 966 | + | |
1001 | 967 | | |
1002 | 968 | | |
1003 | 969 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | 1074 | | |
1093 | 1075 | | |
1094 | 1076 | | |
| |||
1129 | 1111 | | |
1130 | 1112 | | |
1131 | 1113 | | |
| 1114 | + | |
1132 | 1115 | | |
1133 | 1116 | | |
1134 | 1117 | | |
| |||
1179 | 1162 | | |
1180 | 1163 | | |
1181 | 1164 | | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | 1165 | | |
1197 | 1166 | | |
1198 | 1167 | | |
| |||
1234 | 1203 | | |
1235 | 1204 | | |
1236 | 1205 | | |
| 1206 | + | |
1237 | 1207 | | |
1238 | 1208 | | |
1239 | 1209 | | |
| |||
0 commit comments