Set mac_changeable to yes in sr-iov testing,
then update_mac_ip_address called to get guest's ip and mac.

Signed-off-by: Feng Yang <[email protected]>
---
 virttest/env_process.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/virttest/env_process.py b/virttest/env_process.py
index 0481178..c3906e9 100644
--- a/virttest/env_process.py
+++ b/virttest/env_process.py
@@ -3,7 +3,7 @@ from autotest.client import utils
 from autotest.client.shared import error
 import aexpect, kvm_monitor, ppm_utils, test_setup, virt_vm, kvm_vm
 import libvirt_vm, video_maker, utils_misc, storage, kvm_storage
-import remote, ovirt, data_dir
+import remote, ovirt, data_dir, utils_test
 
 try:
     import PIL.Image
@@ -108,6 +108,10 @@ def preprocess_vm(test, params, env, name):
             vm.create(name, params, test.bindir,
                       migration_mode=params.get("migration_mode"),
                       migration_fd=params.get("migration_fd"))
+            # Update mac and IP info for assigned device
+            # NeedFix: Can we find another way to get guest ip?
+            if params.get("mac_changeable") == "yes":
+                utils_test.update_mac_ip_address(vm, params)
     else:
         # Don't start the VM, just update its params
         vm.params = params
-- 
1.7.1

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to