Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix Jenkins build
[nfvbench.git]
/
nfvbench
/
chaining.py
diff --git
a/nfvbench/chaining.py
b/nfvbench/chaining.py
index
fea1c12
..
d6f67f9
100644
(file)
--- a/
nfvbench/chaining.py
+++ b/
nfvbench/chaining.py
@@
-500,7
+500,7
@@
class ChainVnf(object):
vnf_gateway1_cidr = g1cidr
vnf_gateway2_cidr = g2cidr
vnf_gateway1_cidr = g1cidr
vnf_gateway2_cidr = g2cidr
- with open(BOOT_SCRIPT_PATHNAME, 'r') as boot_script:
+ with open(BOOT_SCRIPT_PATHNAME, 'r'
, encoding="utf-8"
) as boot_script:
content = boot_script.read()
vm_config = {
'forwarder': config.vm_forwarder,
content = boot_script.read()
vm_config = {
'forwarder': config.vm_forwarder,
@@
-1227,6
+1227,8
@@
class ChainManager(object):
# if it is a single int or mac, make it a list of 1 int
if isinstance(ll, (int, str)):
ll = [ll]
# if it is a single int or mac, make it a list of 1 int
if isinstance(ll, (int, str)):
ll = [ll]
+ else:
+ ll = list(ll)
for item in ll:
if not re.match(pattern, str(item)):
raise ChainException("Invalid format '{item}' specified in {fname}"
for item in ll:
if not re.match(pattern, str(item)):
raise ChainException("Invalid format '{item}' specified in {fname}"
@@
-1539,7
+1541,7
@@
class ChainManager(object):
hypervisor = self.get_hypervisor_from_mac(dst_mac)
if hypervisor:
LOG.info('Found hypervisor for EXT chain: %s', hypervisor.hypervisor_hostname)
hypervisor = self.get_hypervisor_from_mac(dst_mac)
if hypervisor:
LOG.info('Found hypervisor for EXT chain: %s', hypervisor.hypervisor_hostname)
- return[':' + hypervisor.hypervisor_hostname]
+ return
[':' + hypervisor.hypervisor_hostname]
# no openstack = no chains
return []
# no openstack = no chains
return []