summaryrefslogtreecommitdiffhomepage
path: root/test/lib
AgeCommit message (Collapse)Author
2017-11-27test/lib: Allow unconfigured peer-as for Unnumbered BGPSatoshi Fujimoto
For Unnumbered BGP, neighbor AS number isn't needed to be specified, so 'peer-as' should not be specified in the scenario test for Unnumbered BGP. However, currently 'peer-as' is always specified in test/lib/gobgp.py This commit solves this by not specifying `peer-as` if 'neighbor-interface' is configured. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07test/lib: Add bgp config structure for GoBGP/Quagga containersSatoshi Fujimoto
This commit introduces 'bgp_config' attribute for GoBGP/Quagga containers to configure complex settings. Adding to this, this commit enables to configure BGP confederation settings to GoBGP/Quagga conrainers. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07test/lib: Enhancement on Get Rib library on QuaggaSatoshi Fujimoto
For Quagga containers, currently, when we use get_global_rib() without specifying prefix, we cannot get AS_PATH and other attributes. And when we use get_global_rib() with prefix, we can get only one path even if there is multiple paths for a destination. This commit fixes these problems by refining test/lib/quagga.py. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-09-29test: Add Scenario tests for Revised Error HandlingSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-09-24test/lib/base: Reduce redundant build stepsIWASE Yusuke
Currently, the build steps of "go get" and removing the downloaded directory are not effective steps. For example, "go get" for downloading dependencies can be replaced with "dep ensure". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-14test/lib/gobgp,quagga: Adopt to Debian 9 based osrg/quagga:v1.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-14test/lib/gobgp: Add shared volume for QuaggaIWASE Yusuke
Currently, daemons of Quagga will fails to output their logs, because those daemons (quagga user) does not have the permission to access to the GoBGP config directory (owned by root user). This patch prepares the volume for quagga user and enables daemons of Quagga to output logs. With this patch, those logs will be output into "TEST_BASE_DIR/TEST_PREFIX/<CONTAINER_NAME>/quagga/" directory. (default: /tmp/gobgp/<CONTAINER_NAME>/quagga/") Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-04update travis-ci for depFUJITA Tomonori
libraries are installed into vendor directory so we can't build go code outside. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30test/lib/gobgp: Get community/identifier via get_*_rib()IWASE Yusuke
This patch enables GoBGPContainer to get community and identifier for each route via get_global_rib() and get_local_rib() methods. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/gobgp: Add route with identifier and communityIWASE Yusuke
This patch enables GoBGPContainer to add routes with "identifier" and "community" via add_route() method. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/gobgp: Enable GoBGPContainer to del a routeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-30test/lib/base: Avoid to del all routes without identifier specifiedIWASE Yusuke
Currently, del_route() with "identifier=None" deletes all routes even if some installed routes have the valid identifier. This patch fixes to delete only route which exactly matches against the given identifier. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-20test/lib/base/BGPContainer: Enable to delete routeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-05test: add addpath_test.pyISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-06-07test: ignore the failure of caching dependeny with building docker imageFUJITA Tomonori
`go get -d github.com/osrg/gobgp/...` could fail (e.g., an imported library has gone). After that, we build a docker image from modified source code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-10*: support replace-peer-as (aka as-override)Wataru Ishida
we use the term replace-peer-as instead of as-override since openconfig is using it. cli ``` $ gobgp n add <neighbor-addr> as <asn> replace-peer-as ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> as-path-options: config: replace-peer-as: true ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-10*: support remove private asWataru Ishida
cli ``` $ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace) ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> remove-private-as: all ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-09server: ignore routes when local AS is in AS_PATHISHIDA Wataru
RFC4271 9.1.2 Phase 2: Route Selection If the AS_PATH attribute of a BGP route contains an AS loop, the BGP route should be excluded from the Phase 2 decision function. AS loop detection is done by scanning the full AS path (as specified in the AS_PATH attribute), and checking that the autonomous system number of the local system does not appear in the AS path. Operations of a BGP speaker that is configured to accept routes with its own autonomous system number in the AS path are outside the scope of this document. Also this commit adds support for allow-own-as option to relax this. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-21test: fix container build for testFUJITA Tomonori
fix the regression of commit e429c1aaf4dd85459dfafc1a5efac9d4778370f6 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18test: change Dockerfile for faster container buildFUJITA Tomonori
use cache wisely. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18Revert "test/lib/gobgp: Use local GoBGP executables in contaier"FUJITA Tomonori
This reverts commit 47ab84e34caeb7c89b26271bf84959011bc8ed19. using the same binaries on a host and inside a container isn't always feasible (by default, not statically linked binary). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-17test/lib/gobgp: Use local GoBGP executables in contaierIWASE Yusuke
Currently, to reflect the modification of the local source code or to switch the base image for GoBGP container, it is required to re-build the GoBGP container image, and this take a long time to test or debug with the scenario tests. This patch fixes to use the local GoBGP executables (gobgp and gobgpd) in container, and enables to reflect the changes without rebuidling container image. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-04-04test: add test for unnumbered bgp featureISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-03-17scenario_test: Support OSPFd in Quagga containerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-17scenario_test: Enable to start OSPFd in GoBGP containerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-16test/lib/quagga: Avoid ambiguous command "en"IWASE Yusuke
With the newer version of Quagga, "en" command will be regarded as an "Ambiguous command", because there are two commands "enable" and "end". This patch replaces "en" command with "enable" command, and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-16test/lib: Enable to disply name of config fileIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-16test/lib: Move noseplugin.py to test/lib module directoryIWASE Yusuke
To enable to use "noseplugin" as the Python module from the absolute import scope in scenario_test, this patch moves noseplugin.py to test/lib module directory. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-16test/lib: pep8 and pylint improvementsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-16scenario_test: "--force" option to remove directoriesIWASE Yusuke
To avoid the intractive prompt before removals, this patch adds "--force" option to remove directories. Also, fixes "--recursive" to "--force" option when removing xml files (not directories). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-09server: fix in-policy bugISHIDA Wataru
When a path is rejected by in-policy, the prefix must be withdrawn since it might already exist in the rib. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-11-14cli: use client libraryWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14client: add golang client libraryWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14policy: fix bug of policy with multiple statementsWataru Ishida
policy can have multiple statements. In each statement, when condition is matched, route-action is finally evaluated after actions with mods. When route-action is 'none', we contine to next statement if it exists. When route-action is 'accept' or 'reject', we stop proceeding. This patch fixes a bug that route-action can't be set to 'none' which means route-action always be set to 'accept' or 'reject' and can't proceed to the next statement. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-12test: remove tcpdump usage in bgp_router_test.pyFUJITA Tomonori
It's unreliable. Use monitor command instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-07test: add change of best paths from ibgp and ebgpFUJITA Tomonori
gobgp has two ibgp peers and one ebgp. 1. the best path is from ebgp so advertise it to ibgp peers. 2. one of ibgp peer sends the same path so now the path from ibgp becomes best. 3. gobgp doesn't advertise it to another ibgp and needs to withdraw the best from ebgp. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-04support neighbor belongs to VRFWataru Ishida
$ gobgp vrf add red rd 100:100 rt both 100:100 $ gobgp neighbor add 10.0.0.1 as 2 vrf red $ gobgp vrf red neighbor Peer AS Up/Down State |#Advertised Received Accepted 10.0.0.1 2 never Active | 0 0 0 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-09*: support long lived graceful restartWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-04test: add test for vrf route injectingWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-03test: add scenario test for zapi v3Wataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-12test: use Docker's native network feature instead of pipeworkFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-01test: stop tcpdump write bufferingFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25api/cli: kill cmd package custom path/destination structsWataru Ishida
reuse table package Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-08-15test: execute gobgp monitor on docker hostISHIDA Wataru
docker-py's exec_start stream fails often. execute gobgp monitor on docker host instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-08-03server: fix advertising multiple local withdrawals with same prefixISHIDA Wataru
a bug introduced by 332766189685028c4f9852e4285fb1a9025223cc Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server: support injecting multipath to zebraISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server: fix active connection regressionISHIDA Wataru
regression introduced by 4c9cd88c61cb848e36a45657b7cbc63b9c783dc4 also fix test/lib to test configuration without local-address (configure local-address only if neighbor-address is IPv6) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server: support peering with ipv6 link local addressISHIDA Wataru
fix DialTCPTimeoutWithMD5Sig to handle ipv6 scope-id also update ipv6 test to test this feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-25policy: add local-pref actionISHIDA Wataru
$ gobgp policy statement st01 add action local-pref 110 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server/table: fix intra-AS RTC route distributionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>