behave_tests: add unit tests for TestAPI client
[nfvbench.git] / nfvbench / chaining.py
index b983efb..d6f67f9 100644 (file)
@@ -500,7 +500,7 @@ class ChainVnf(object):
             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,
@@ -1541,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)
-                return[':' + hypervisor.hypervisor_hostname]
+                return [':' + hypervisor.hypervisor_hostname]
         # no openstack = no chains
         return []