Ansible: Update DPDK
[csit.git] / resources / libraries / python / QemuUtils.py
index 09c3df7..9fb2410 100644 (file)
@@ -63,7 +63,7 @@ class QemuUtils:
         dpdk_target = u"arm64-armv8a" if self._arch == u"aarch64" \
             else u"x86_64-native"
         self._testpmd_path = f"{Constants.QEMU_VM_DPDK}/" \
-            f"{dpdk_target}-linuxapp-gcc/app"
+            f"{dpdk_target}-linux-gcc/app"
         self._vm_info = {
             u"host": node[u"host"],
             u"type": NodeType.VM,
@@ -236,7 +236,7 @@ class QemuUtils:
         template = f"{Constants.RESOURCES_TPL_VM}/{self._opt.get(u'vnf')}.exec"
         exec_cmd_no_error(self._node, f"rm -f {running}", sudo=True)
 
-        with open(template, "r") as src_file:
+        with open(template, u"rt") as src_file:
             src = Template(src_file.read())
             exec_cmd_no_error(
                 self._node, f"echo '{src.safe_substitute(**kwargs)}' | "
@@ -296,7 +296,7 @@ class QemuUtils:
         init = self._temp.get(u"ini")
         exec_cmd_no_error(self._node, f"rm -f {init}", sudo=True)
 
-        with open(template, "r") as src_file:
+        with open(template, u"rt") as src_file:
             src = Template(src_file.read())
             exec_cmd_no_error(
                 self._node, f"echo '{src.safe_substitute(**kwargs)}' | "
@@ -611,7 +611,7 @@ class QemuUtils:
         message = f"QEMU: Start failed on {self._node[u'host']}!"
         try:
             DUTSetup.check_huge_page(
-                self._node, u"/dev/hugepages", self._opt.get(u"mem"))
+                self._node, u"/dev/hugepages", int(self._opt.get(u"mem")))
 
             exec_cmd_no_error(
                 self._node, cmd_opts, timeout=300, sudo=True, message=message