[V1] framework/*: fix pylama errors

Message ID 20220506082531.2009-1-junx.dong@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] framework/*: fix pylama errors |

Checks

Context Check Description
ci/Intel-dts-suite-test success Testing OK

Commit Message

Jun Dong May 6, 2022, 8:25 a.m. UTC
  Pylama found the following errors:
framework/virt_dut.py:87: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
framework/virt_dut.py:88: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
framework/virt_dut.py:119: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
framework/virt_dut.py:124: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
framework/virt_dut.py:356: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]

Signed-off-by: Jun Dong <junx.dong@intel.com>
---
 framework/virt_base.py | 1 -
 framework/virt_dut.py  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tu, Lijuan May 9, 2022, 7:40 a.m. UTC | #1
On Fri,  6 May 2022 16:25:31 +0800, Jun Dong <junx.dong@intel.com> wrote:
> Pylama found the following errors:
> framework/virt_dut.py:87: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
> framework/virt_dut.py:88: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
> framework/virt_dut.py:119: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
> framework/virt_dut.py:124: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
> framework/virt_dut.py:356: [E] E1101 Instance of 'VirtDut' has no 'host_dut' member [pylint]
> 
> Signed-off-by: Jun Dong <junx.dong@intel.com>


Applied, thanks
  

Patch

diff --git a/framework/virt_base.py b/framework/virt_base.py
index d4af8b98..93f77e5e 100644
--- a/framework/virt_base.py
+++ b/framework/virt_base.py
@@ -475,7 +475,6 @@  class VirtBase(object):
 
         vm_dut.nic_type = "any"
         vm_dut.tester = self.host_dut.tester
-        vm_dut.host_dut = self.host_dut
         vm_dut.host_session = self.host_session
         vm_dut.init_log()
         vm_dut.migration_vm = self.migration_vm
diff --git a/framework/virt_dut.py b/framework/virt_dut.py
index 369abacf..45b495a0 100644
--- a/framework/virt_dut.py
+++ b/framework/virt_dut.py
@@ -65,6 +65,7 @@  class VirtDut(DPDKdut):
         )
         self.vm_name = vm_name
         self.hyper = hyper
+        self.host_dut = hyper.host_dut
         self.cpu_topo = cpu_topo
         self.migration_vm = False