diff options
author | Michael S. Pedersen <michael.soelvkaer@gmail.com> | 2019-12-03 11:38:32 +0000 |
---|---|---|
committer | Michael S. Pedersen <michael.soelvkaer@gmail.com> | 2019-12-09 22:07:08 +0000 |
commit | 95f2491ed89ac99b0d8bd006b4a13cbeb1eb96ce (patch) | |
tree | 8d2d8cd00f3284036e9bf78d9ec9bfdb3e95c80b /nfvbench/chaining.py | |
parent | 24314713446b6411cedce4329ab5ebfd6da678a2 (diff) |
NFVBENCH-153 Add support for python34.0.0
JIRA: NFVBENCH-153
Done using 2to3-3.6 with additional changes to fix data parsing and
testing (tox)
Signed-off-by: Michael S. Pedersen <michael.soelvkaer@gmail.com>
Change-Id: I242902f800da543d780507828c9bd1fbf409da6d
Diffstat (limited to 'nfvbench/chaining.py')
-rw-r--r-- | nfvbench/chaining.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/nfvbench/chaining.py b/nfvbench/chaining.py index d035a40..a8d6295 100644 --- a/nfvbench/chaining.py +++ b/nfvbench/chaining.py @@ -54,10 +54,10 @@ from neutronclient.neutron import client as neutronclient from novaclient.client import Client from attrdict import AttrDict -from chain_router import ChainRouter -import compute -from log import LOG -from specs import ChainType +from .chain_router import ChainRouter +from . import compute +from .log import LOG +from .specs import ChainType # Left and right index for network and port lists LEFT = 0 RIGHT = 1 @@ -77,9 +77,6 @@ BOOT_SCRIPT_PATHNAME = os.path.join(os.path.dirname(os.path.abspath(__file__)), class ChainException(Exception): """Exception while operating the chains.""" - pass - - class NetworkEncaps(object): """Network encapsulation.""" @@ -706,8 +703,8 @@ class ChainVnf(object): # here we MUST wait until this instance is resolved otherwise subsequent # VNF creation can be placed in other hypervisors! config = self.manager.config - max_retries = (config.check_traffic_time_sec + - config.generic_poll_sec - 1) / config.generic_poll_sec + max_retries = int((config.check_traffic_time_sec + + config.generic_poll_sec - 1) / config.generic_poll_sec) retry = 0 for retry in range(max_retries): status = self.get_status() @@ -1380,7 +1377,7 @@ class ChainManager(object): return: the hypervisor where the matching port runs or None if not found """ # _existing_ports is a dict of list of ports indexed by network id - for port_list in self.get_existing_ports().values(): + for port_list in list(self.get_existing_ports().values()): for port in port_list: try: if port['mac_address'] == mac: |