diff options
Diffstat (limited to 'test/lib/bagpipe.py')
-rw-r--r-- | test/lib/bagpipe.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/lib/bagpipe.py b/test/lib/bagpipe.py index efca1c4e..43e1dcc0 100644 --- a/test/lib/bagpipe.py +++ b/test/lib/bagpipe.py @@ -13,14 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import - -from fabric import colors -from fabric.api import local from lib.base import ( BGPContainer, CmdBuffer, + yellow, + local, ) @@ -49,7 +47,7 @@ class BagpipeContainer(BGPContainer): c << '[BGP]' if len(self.ip_addrs) > 0: c << 'local_address={0}'.format(self.ip_addrs[0][1].split('/')[0]) - for info in self.peers.values(): + for info in list(self.peers.values()): c << 'peers={0}'.format(info['neigh_addr'].split('/')[0]) c << 'my_as={0}'.format(self.asn) c << 'enable_rtc=True' @@ -62,7 +60,7 @@ class BagpipeContainer(BGPContainer): c << 'dataplane_driver = DummyDataplaneDriver' with open('{0}/bgp.conf'.format(self.config_dir), 'w') as f: - print colors.yellow(str(c)) + print(yellow(str(c))) f.writelines(str(c)) def reload_config(self): |