-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(cloud): update to support buf lint and generation automation #413
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,7 @@ message BGPPeerSpec { | |
// send extended community attributes to neighbor | ||
bool send_ext_comm = 6; | ||
// peer is a route reflector client | ||
BGPPeerRRClient rr_client = 7; | ||
BGPPeerRR rr_client = 7; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. usualally RR Client is different than RR; not sure about the reason behind this name change, and if this was linting related or something done for improving brevity. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add the Client back to the enum and the parameter. It was the linting checking on the enum definitions that resulted in the change. |
||
// BGP session connect-retry timer in seconds | ||
int32 connect_retry = 8; | ||
// BGP session configured holdtime timer in seconds | ||
|
@@ -279,10 +279,10 @@ message BGPPeerAfStatus { | |
// send a Route Refresh request to the peer for this AFI/SAFI. | ||
bool route_refresh = 3; | ||
//The BGP additional path capability negotiated with this peer for this AFI/SAFI. | ||
BgpAddPathCapNegCap add_path_cap_neg = 4; | ||
BgpAddPathCapNeg add_path_cap_neg = 4; | ||
// This value indicates whether the given peer is a reflector client of this | ||
// router for this AFI/SAFI, or not | ||
BGPPeerRRClient reflector_client = 5; | ||
BGPPeerRR reflector_client = 5; | ||
} | ||
|
||
// BGP NLRI prefix object, this object is not conifgured by the user | ||
|
@@ -354,7 +354,7 @@ message BGPNLRIPrefixStatus { | |
int32 flap_starttime = 19; | ||
// If bgpNlriPrefixBest is 'true', then this field is set to 'routeIsBest'. | ||
// Otherwise, it reports the stage in the decision process when the route was determined to be non-best. | ||
BGPRsnNotBest reason_not_best = 20; | ||
BGPRouteReason reason_not_best = 20; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could consider renaming the member as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We could change it to route_reason = 20; as an option. The intent is to report the reason for not having the best route which really is the reason for the particular route selection where one of the reason's is "Route is best". I will let @jainvipin respond on the changing since the elements are from his contribution and his input on the enum and parameter should be considered on this one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree with @artek-koltun - we should change the field/member name as well to reflect its intent; thanks for fixing this. |
||
// The extended community membership associated with the route after import policy has been applied. | ||
repeated bytes ext_comm = 21; | ||
// The community list associated with the route after import policy has been applied. | ||
|
@@ -455,14 +455,14 @@ enum BGPSafi { | |
BGP_SAFI_EVPN = 70; | ||
} | ||
|
||
// BGP peer RR client | ||
enum BGPPeerRRClient { | ||
// BGP peer Route Reflector client | ||
enum BGPPeerRR { | ||
// RR_UNSPECIFIED | ||
BGP_PEER_RR_CLIENT_UNSPECIFIED = 0; | ||
BGP_PEER_RR_UNSPECIFIED = 0; | ||
// RR_CLIENT | ||
BGP_PEER_RR_CLIENT = 1; | ||
BGP_PEER_RR_CLIENT = 1; | ||
// RR_MESHED_CLIENT | ||
BGP_PEER_RR_MESHED_CLIENT = 2; | ||
BGP_PEER_RR_MESHED_CLIENT = 2; | ||
} | ||
|
||
// BGP peer session's last_state | ||
|
@@ -558,21 +558,21 @@ enum BGPOperState { | |
} | ||
|
||
// bgp add path capability negotiation | ||
enum BgpAddPathCapNegCap { | ||
enum BgpAddPathCapNeg { | ||
// disabled | ||
// (-- api-linter: core::0126::unspecified=disabled | ||
// aip.dev/not-precedent: zero is disabled, not unspecified. --) | ||
BGP_ADD_PATH_SR_DISABLE = 0; | ||
BGP_ADD_PATH_CAP_NEG_SR_DISABLE = 0; | ||
// receive | ||
BGP_ADD_PATH_SR_RECEIVE = 1; | ||
BGP_ADD_PATH_CAP_NEG_SR_RECEIVE = 1; | ||
// send | ||
BGP_ADD_PATH_SR_SEND = 2; | ||
BGP_ADD_PATH_CAP_NEG_SR_SEND = 2; | ||
// both | ||
BGP_ADD_PATH_SR_BOTH = 3; | ||
BGP_ADD_PATH_CAP_NEG_SR_BOTH = 3; | ||
// inherit | ||
BGP_ADD_PATH_SR_INHERIT = 4; | ||
BGP_ADD_PATH_CAP_NEG_SR_INHERIT = 4; | ||
// uknown | ||
BGP_ADD_PATH_SR_UNKNOWN = 5; | ||
BGP_ADD_PATH_CAP_NEG_SR_UNKNOWN = 5; | ||
} | ||
|
||
// clear route request's options | ||
|
@@ -614,49 +614,49 @@ enum BgpNlriIsActive { | |
} | ||
|
||
// BGP Reason for not best route | ||
enum BGPRsnNotBest { | ||
enum BGPRouteReason { | ||
// not considered | ||
// (-- api-linter: core::0126::unspecified=disabled | ||
// aip.dev/not-precedent: zero is not-considered, not unspecified. --) | ||
BGP_REASON_NOT_CONSIDERED = 0; | ||
BGP_ROUTE_REASON_NOT_CONSIDERED = 0; | ||
// route is best | ||
BGP_REASON_ROUTE_IS_BEST = 1; | ||
BGP_ROUTE_REASON_ROUTE_IS_BEST = 1; | ||
// weight based | ||
BGP_REASON_WEIGHT = 2; | ||
BGP_ROUTE_REASON_WEIGHT = 2; | ||
// local preference | ||
BGP_REASON_LOCAL_PREF = 3; | ||
BGP_ROUTE_REASON_LOCAL_PREF = 3; | ||
// local origin preferred | ||
BGP_REASON_LCL_ORIG_PRFRRED = 4; | ||
BGP_ROUTE_REASON_LCL_ORIG_PRFRRED = 4; | ||
// as path lengt | ||
BGP_REASON_AS_PATH_LEN = 5; | ||
BGP_ROUTE_REASON_AS_PATH_LEN = 5; | ||
// origin based | ||
BGP_REASON_ORIGIN = 6; | ||
BGP_ROUTE_REASON_ORIGIN = 6; | ||
// med | ||
BGP_REASON_MED = 7; | ||
BGP_ROUTE_REASON_MED = 7; | ||
// origin tie | ||
BGP_REASON_LOCAL_ORIG_TIE = 8; | ||
BGP_ROUTE_REASON_LOCAL_ORIG_TIE = 8; | ||
// ebpg vs. ibgp peer | ||
BGP_REASON_EBGP_V_IBGP_PEER = 9; | ||
BGP_ROUTE_REASON_EBGP_V_IBGP_PEER = 9; | ||
// admin distance | ||
BGP_REASON_ADMIN_DISTANCE = 10; | ||
BGP_ROUTE_REASON_ADMIN_DISTANCE = 10; | ||
// path next to cst | ||
BGP_REASON_PATH_TO_NEXT_CST = 11; | ||
BGP_ROUTE_REASON_PATH_TO_NEXT_CST = 11; | ||
// preferenc existing | ||
BGP_REASON_PREF_EXISTING = 12; | ||
BGP_ROUTE_REASON_PREF_EXISTING = 12; | ||
// reason identifier | ||
// (-- api-linter: core::0140::abbreviations=disabled | ||
// aip.dev/not-precedent: --) | ||
BGP_REASON_IDENTIFIER = 13; | ||
BGP_ROUTE_REASON_IDENTIFIER = 13; | ||
// cluster length | ||
BGP_REASON_CLUSTER_LEN = 14; | ||
BGP_ROUTE_REASON_CLUSTER_LEN = 14; | ||
// peer address type | ||
BGP_REASON_PEER_ADDR_TYPE = 15; | ||
BGP_ROUTE_REASON_PEER_ADDR_TYPE = 15; | ||
// peer address | ||
BGP_REASON_PEER_ADDR = 16; | ||
BGP_ROUTE_REASON_PEER_ADDR = 16; | ||
// peer port | ||
BGP_REASON_PEER_PORT = 17; | ||
BGP_ROUTE_REASON_PEER_PORT = 17; | ||
// path id | ||
BGP_REASON_PATH_ID = 18; | ||
BGP_ROUTE_REASON_PATH_ID = 18; | ||
} | ||
|
||
// bgp origin attribute | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
version: v1beta1 | ||
version: v1 | ||
name: buf.build/opiproject/cloud | ||
deps: | ||
- buf.build/googleapis/googleapis | ||
- buf.build/grpc-ecosystem/grpc-gateway | ||
|
||
- buf.build/opiproject/opinetcommon | ||
lint: | ||
except: | ||
- PACKAGE_DIRECTORY_MATCH | ||
# Don't check standard name as that causes google aip issues | ||
- RPC_RESPONSE_STANDARD_NAME | ||
# Allow same name used in request/response type for multiple RPCs | ||
- RPC_REQUEST_RESPONSE_UNIQUE | ||
- ENUM_ZERO_VALUE_SUFFIX | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments to
#411