summaryrefslogtreecommitdiffhomepage
path: root/test/lib/gobgp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/gobgp.py')
-rw-r--r--test/lib/gobgp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index a4d697b1..3c33056b 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -15,6 +15,7 @@
from __future__ import absolute_import
+import collections
import json
from itertools import chain
from threading import Thread
@@ -27,7 +28,6 @@ from fabric.utils import indent
import netaddr
import toml
import yaml
-import collections
from lib.base import (
wait_for_completion,
@@ -113,6 +113,12 @@ class GoBGPContainer(BGPContainer):
local(cmd, capture=True)
self.local("{0}/start.sh".format(self.SHARED_VOLUME), detach=True)
+ def start_gobgp(self, graceful_restart=False):
+ if self._is_running():
+ raise RuntimeError('GoBGP is already running')
+ self._start_gobgp(graceful_restart=graceful_restart)
+ self._wait_for_boot()
+
def stop_gobgp(self):
self.local("pkill -INT gobgpd")