KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump
In VM.get_address(), return an IP address from the MAC-IP cache if an IP
address base wasn't specified by the user, or if the user requested that IP
addresses be taken from the dynamic cache.
To force the system to obtain IP addresses from the dynamic cache even when
static base addresses are provided by the user, specify
'always_use_tcpdump = yes'.
Signed-off-by: Michael Goldish <mgoldish@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3536 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index 1055b2b..86c5905 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -61,7 +61,8 @@
logging.debug("VM object found in environment")
else:
logging.debug("VM object does not exist; creating it")
- vm = kvm_vm.VM(name, params, qemu_path, image_dir, iso_dir, script_dir)
+ vm = kvm_vm.VM(name, params, qemu_path, image_dir, iso_dir, script_dir,
+ env.get("address_cache"))
kvm_utils.env_register_vm(env, name, vm)
start_vm = False