summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2010-06-17 19:57:12 +0200
committerMatthias Bolte <matthias.bolte@googlemail.com>2010-06-24 14:56:04 +0200
commitd72d92565ba3c7c928d065e68b36ab17953052ae (patch)
tree8f85a0821554a058846b96304c8055fbeee98217 /tests/xml2vmxtest.c
parentAdd optional model attribute to the controller element (diff)
downloadlibvirt-d72d92565ba3c7c928d065e68b36ab17953052ae.tar.gz
libvirt-d72d92565ba3c7c928d065e68b36ab17953052ae.tar.bz2
libvirt-d72d92565ba3c7c928d065e68b36ab17953052ae.zip
esx: Add support for the controller element
Also don't abuse the disk driver name to specify the SCSI controller model anymore: <driver name='buslogic'/> Use the newly added model attribute of the controller element for this: <controller type='scsi' index='0' model='buslogic'/> The disk driver name approach is deprecated now, but still works for backward compatibility reasons. Update the documentation and tests accordingly. Fix usage of the words controller and id in the VMX handling code. Use controller, bus and unit properly.
Diffstat (limited to 'tests/xml2vmxtest.c')
-rw-r--r--tests/xml2vmxtest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 14901fa8a..0a9bc5389 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -18,7 +18,7 @@ static virCapsPtr caps = NULL;
# define MAX_FILE 4096
static void
-testESXCapsInit(void)
+testCapsInit(void)
{
virCapsGuestPtr guest = NULL;
@@ -28,9 +28,11 @@ testESXCapsInit(void)
return;
}
- virCapabilitiesSetMacPrefix(caps, (unsigned char[]){ 0x00, 0x50, 0x56 });
+ virCapabilitiesSetMacPrefix(caps, (unsigned char[]){ 0x00, 0x0c, 0x29 });
virCapabilitiesAddHostMigrateTransport(caps, "esx");
+ caps->hasWideScsiBus = true;
+
/* i686 guest */
guest =
virCapabilitiesAddGuest(caps, "hvm", "i686", 32, NULL, NULL, 0, NULL);
@@ -90,7 +92,7 @@ testCompareFiles(const char *xml, const char *vmx,
goto failure;
}
- formatted = esxVMX_FormatConfig(NULL, def, productVersion);
+ formatted = esxVMX_FormatConfig(NULL, caps, def, productVersion);
if (formatted == NULL) {
goto failure;
@@ -165,7 +167,7 @@ mymain(int argc, char **argv)
} \
} while (0)
- testESXCapsInit();
+ testCapsInit();
if (caps == NULL) {
return EXIT_FAILURE;