diff options
Diffstat (limited to 'test/scenario_test/evpn_test.py')
-rw-r--r-- | test/scenario_test/evpn_test.py | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/test/scenario_test/evpn_test.py b/test/scenario_test/evpn_test.py index ac83fe2d..5e2637c8 100644 --- a/test/scenario_test/evpn_test.py +++ b/test/scenario_test/evpn_test.py @@ -13,22 +13,30 @@ # See the License for the specific language governing permissions and # limitations under the License. -import unittest -from fabric.api import local -from lib import base -from lib.gobgp import * -from lib.quagga import * +from __future__ import absolute_import + +from itertools import combinations import sys -import os import time +import unittest + +from fabric.api import local import nose + from noseplugin import OptionParser, parser_option -from itertools import combinations + +from lib import base +from lib.base import ( + BGP_FSM_ESTABLISHED, + BGP_ATTR_TYPE_EXTENDED_COMMUNITIES, +) +from lib.gobgp import GoBGPContainer + def get_mac_mobility_sequence(pattr): - for ecs in [p['value'] for p in pattr - if 'type' in p and \ - p['type'] == BGP_ATTR_TYPE_EXTENDED_COMMUNITIES]: + for ecs in [ + p['value'] for p in pattr + if 'type' in p and p['type'] == BGP_ATTR_TYPE_EXTENDED_COMMUNITIES]: for ec in [e for e in ecs if 'type' in e and e['type'] == 6]: if ec['subtype'] == 0: if 'sequence' not in ec: @@ -82,7 +90,7 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(path['nexthop'] == '0.0.0.0') interval = 1 - timeout = int(30/interval) + timeout = int(30 / interval) done = False for _ in range(timeout): if done: |