280 Commits
Author SHA1 Message Date
Artur MakutunowiczandFUJITA Tomonori 192480fc71 Add experimental BGP-LS feature 2019-01-26 12:40:45 +09:00
FUJITA Tomonori d7e5bf22a6 fix bmp statistics
fix the regression of the adj counter due to
301b48532d

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-28 23:27:53 +09:00
FUJITA Tomonori 8e7741a0a8 api: rename ValidationDetail to Validation
Let's simply use 'validation' because there is no other validation
structure.

We could add validation results from other than rpki so drop rpki name.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-24 10:13:00 +09:00
FUJITA Tomonori 8d0a8b0ffa make the usage of type name in protobuf consistent
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-23 23:40:37 +09:00
FUJITA Tomonori 301b48532d support received, accepted, and advertised counters per family
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-26 17:49:48 +09:00
FUJITA Tomonori a5763c20d4 api: remove AddPaths from Peer and PeerGroup
AddPaths in AfiSafi should be used; it can handle configuration per
family.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 23:27:02 +09:00
FUJITA Tomonori 7ec6a96962 api: move RouterId to PeerState from PeerConf
It's not configuration.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 20:15:04 +09:00
FUJITA Tomonori 79a461c147 api: move remote_cap and local_cap to PeerState from PeerConf
Both should be in PeerState like OpenConfig.

Also remove unused supported_capabilities.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-23 21:01:03 +09:00
FUJITA Tomonori 6b05d9db0f api: rename NlriAny in api.Path to Nlri
Also rename PathAttrsAny to PathAttrs. Both are the first choice
rather than the binary format members.

Support SortType member to ListPathRequest to add an option to return
unordered paths.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 16:49:49 +09:00
FUJITA Tomonori c1bca25559 use google/protobuf/timestamp.proto
use google/protobuf/timestamp.proto instead of our own way to
represent time.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 12:23:18 +09:00
Eiichiro WatanabeandFUJITA Tomonori fa387c9065 Fix Statistics Report in BMP 2018-11-14 19:32:24 +09:00
Eiichiro WatanabeandFUJITA Tomonori 0eb3dcede5 Fix intervals for MRT 2018-11-12 21:32:07 +09:00
Eiichiro Watanabe 4cc7a81e8f Support AdminDown from config 2018-11-12 14:41:58 +09:00
FUJITA Tomonori 475818dd3c api: remove unused members
fixes #1816

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 22:14:41 +09:00
FUJITA Tomonori 97ad6b32ee api: change Family
fixes #1812

Avoid the cast and use strightforward data strcuture; two variables
for afi and safi instead of squashing two into one variable.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 15:36:50 +09:00
FUJITA Tomonori 008c961ecd policy cleanup
- remove ReplaceDefinedSet and ReplaceStatement APIs; not intutive and
  should create a new one instead of modifying the existing.

- Rename ReplacePolicyAssignment to SetPolicyAssignment API; we use
  internally SetPolicy() name from the beginning.

- Rename UpdatePolicy() to SetPolicies() API; It doesn't update
  anything so the name is confusing. It discards the all policies and
  create policies from the argument.

- Changes some member names in structures for policy.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-23 10:05:19 +09:00
FUJITA Tomonori 71e56c542e rpc cleanup
- clean up RPC function names
- rewrite gobgp command to use the api instead of config package
- delete unused client package

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-08 21:24:48 +09:00
FUJITA Tomonori 07f47b7d37 remove package dependency except for grpc in api/
Nothing except for protobuf IDL files and files generated by protobuf in api/.

Try to make the APIs portable to any languages.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-08 21:32:32 +09:00
FUJITA Tomonori c4775c4251 follow Standard Go Project Layout
https://github.com/golang-standards/project-layout

Now you can see clearly what are private and public library code.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-07 20:44:25 +09:00
FUJITA Tomonori 9cd6291b89 api: move api/policy.go to gobgp/cmd/
Some functions might be useful as public APIs but for now make
everything private.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-06 23:57:03 +09:00
FUJITA Tomonori e4031c14a5 api: decrease the dependency
move grpc_server.go to server/

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-06 23:56:54 +09:00
FUJITA Tomonori 69f866a77c Fixing all megacheck errors.
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-06 11:21:38 +09:00
Satoshi FujimotoandFUJITA Tomonori 9ae30060eb cmd: Implement PrettyString()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-07-06 11:08:15 +09:00
Satoshi FujimotoandFUJITA Tomonori 2e0169274a cmd: Remove table/ usage in policy.go
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-07-06 11:08:15 +09:00
FUJITA Tomonori cc92e7e347 gobgp: fix client.AddPath to use api.Path instead of table.Path
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-06 11:08:15 +09:00
FUJITA Tomonori 51dad96b92 api: remove table/ usage in util.go
This is a part of work removing table/ usage in api/. api/ will depend
on only protobuf stuff and packet/.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-06 11:08:15 +09:00
Jeff Bean 154650594c Fixing all megacheck errors. 2018-06-22 19:12:33 -07:00
IWASE Yusuke e2752ae0bb api: Use capability.proto in message PeerConf
The current formats of the remote/local capabilities in message PeerConf
are the binary type representation, this patch fixes to use the
structures defined in capability.proto file.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-21 10:40:34 +09:00
IWASE Yusuke 493d024701 api: Define protobuf for BGP Capabilities
Example of protoc command:
$ export PROTOBUF=${HOME}/protobuf/src
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I ${PROTOBUF} \
    -I ${GOBGP}/api \
    --go_out=plugins=grpc:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto \
    ${GOBGP}/api/capability.proto

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-21 10:40:25 +09:00
IWASE Yusuke b992c53865 api: Use attribute.proto struct in message Vrf
The current formats of the RD and import/export RTs in message Vrf are
the binary type representation, this patch fixes to use the structures
defined in attribute.proto file.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-19 12:01:48 +09:00
Jeff Bean b73933c4b2 simple staticcheck issues 2018-06-14 08:25:20 -07:00
Marcin Ptaszyński 5fbd0cb243 table: support AfiSafiIn Policy Condition match 2018-06-13 20:53:17 -07:00
Satoshi Fujimoto 964bb04e22 api: Implement Shutdonw()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:23 +09:00
Satoshi Fujimoto 57f103ef34 api: Implement AddCollector()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:14 +09:00
Satoshi Fujimoto 000589f3cf api: Implement UpdatePolicy()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:04 +09:00
Satoshi Fujimoto c821cfbc8e api: Implement PeerGroup and DynamicNeighbor API
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:57 +09:00
Satoshi Fujimoto 96034c286b api: Add missing fields to Peer struct conversion functions
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:48 +09:00
Satoshi Fujimoto 222bf4433d api: Add some fields to notify Graceful Restart state
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:48 +09:00
Satoshi Fujimoto abe2efc2bf api: Fix StartServerAPI
Currently, StartServerAPI accepts few parameters
and setting such as BGP confederation and graceful restart
cannot be configured via gRPC API.

This commit fixes this API to accept all the parameters
which is configurable in a configuration file/

Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:30 +09:00
Satoshi FujimotoandFUJITA Tomonori 4c63ed5d87 config: Change "RedistributeRouteTypeList" to []string
RedistributeRouteTypeList is []InstallProtocolType,
but InstallProtocolType only defines limited number of protocols,

And currently, EnableZebra() in gRPC API validates its request
with the protocols defined by InstallProtocolType,
so the protocols such as "babel" or "lldp" could not be configured
to Zebra, via gRPC API.

This patch fixes RedistributeRouteTypeList to be []string,
and fixes EnableZebra() to validate with the protocols defined
in zapi.go.

Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:10:24 +09:00
IWASE Yusuke 417f8ba6f5 api: Use api/attribute.proto structure in gRPC API
Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-13 10:54:00 +09:00
IWASE Yusuke 84987fb873 api: Define protobuf structure for BGP Path Attributes
Example of protoc command:
$ export PROTOBUF=${HOME}/protobuf/src
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I ${PROTOBUF} \
    -I ${GOBGP}/api \
    --go_out=plugins=grpc:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-13 08:55:27 +09:00
IWASE YusukeandFUJITA Tomonori b285fb2475 config: Accept CLUSTER_ID as an integer value
Currently, only IPv4 address is acceptable for the CLUSTER_ID setting,
this patch enables to specify the CLUSTER_ID as a 32-bit unsigned
integer.

With this expansion, "Config.RouteReflectorClusterId" stores the raw
configured value for the CLUSTER_ID and "State.RouteReflectorClusterId"
stores the value used for construct the CLUSTER_LIST attribute.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-05 20:07:09 +09:00
urbanandFUJITA Tomonori 5d15b3f290 table: support nexthop match policy 2018-06-05 19:57:21 +09:00
Shintaro Kojima 5c506b6db1 Fix: ruby client failed with "Enum value '_' does not start with an uppercase letter as is required for Ruby constants" 2018-06-05 09:50:47 +09:00
IWASE YusukeandFUJITA Tomonori 0423ac05e9 cli: Implement "neighbor update" command
Signed-off-by: IWASE Yusuke <[email protected]>
2018-05-31 16:19:01 +09:00
FUJITA Tomonori ed3f7b711c api: fix rpki regression
the commit 8c453bc936 fixes
NewROAListFromApiStructList() to check an error strictly. However,
this breaks the rpki table command:

$ gobgp rpki table
invalid CIDR address: 1.0.16.0

NewROAListFromApiStructList() has a bug about getting the address
family from an IP address. The address family was not used (other
information are used though) so before the commit, the command worked.

This fixes the bug in NewROAListFromApiStructList().

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-05-30 21:44:54 +09:00
Satoshi FujimotoandFUJITA Tomonori 8c453bc936 cmd: Remove uncaught error on ParseCIDR()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-05-22 21:33:07 +09:00
FUJITA Tomonori 691d80e5d1 make Path objects in rib read-only
Now you can read Path objects in rib safely. Nobody modifies
them. GetRib() API doesn't need to clone the objects. With full
routes, this avoid allocating temporary huge memory.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-05-10 23:13:21 +09:00
FUJITA Tomonori dd85cab1ec table: remove uuid member in originInfo structure
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-05-07 21:18:04 +09:00