summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorDan Wendlandt <dan@nicira.com>2013-05-25 14:22:23 -0700
committerDan Wendlandt <dan@nicira.com>2013-06-04 10:27:44 -0700
commitc028e54f6be75d1cd335550cf5291ddf94f973e3 (patch)
tree7e83893e948fb715d0d9f6c10c40aedd8681db71 /nova/tests
parent22604a972fb8369d5e826b9034e72d1478c1e7ae (diff)
correctly set iface-id in vmware driver
bug 1183452 Commit 70c659059b8fbef811ce79700aecb01c60242ebd updated the vmware driver to use the new vif model, but was incorrect in how it tried to grab the iface-id and set it in the vmx file spec. This patch fixes that issue and adds a check for this in the existing unit tests. Change-Id: I756539871d1844a828f9a0a295fc9fa3e59610f7
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/virt/vmwareapi/test_vmwareapi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/tests/virt/vmwareapi/test_vmwareapi.py b/nova/tests/virt/vmwareapi/test_vmwareapi.py
index 2691857fe..da9ed1467 100644
--- a/nova/tests/virt/vmwareapi/test_vmwareapi.py
+++ b/nova/tests/virt/vmwareapi/test_vmwareapi.py
@@ -185,6 +185,17 @@ class VMwareAPIVMTestCase(test.TestCase):
# Check that the VM is running according to vSphere API.
self.assertEquals(vm.get("runtime.powerState"), 'poweredOn')
+ found_vm_uuid = False
+ found_iface_id = False
+ for c in vm.get("config.extraConfig"):
+ if (c.key == "nvp.vm-uuid" and c.value == self.instance['uuid']):
+ found_vm_uuid = True
+ if (c.key == "nvp.iface-id.0" and c.value == "vif-xxx-yyy-zzz"):
+ found_iface_id = True
+
+ self.assertTrue(found_vm_uuid)
+ self.assertTrue(found_iface_id)
+
def _check_vm_info(self, info, pwr_state=power_state.RUNNING):
"""
Check if the get_info returned values correspond to the instance