os-cmpi-xen
changeset 95:549c7fdf185a
Changed syntax of VirtualSystemType property to coincide with the strings
found in xen_caps. E.g. xen_caps has strings such as xen-3.0-x86_32p,
hvm-3.0-x86_32, and so on. Providers now expect that VirtualSystemType
property contains these strings as well. On a DefineSystem operation,
Xen_VirtualSystemManagementService provider only looks first part of
string (e.g. xen or hvm) to determine whether a PV or HVM guest is being
defined.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
found in xen_caps. E.g. xen_caps has strings such as xen-3.0-x86_32p,
hvm-3.0-x86_32, and so on. Providers now expect that VirtualSystemType
property contains these strings as well. On a DefineSystem operation,
Xen_VirtualSystemManagementService provider only looks first part of
string (e.g. xen or hvm) to determine whether a PV or HVM guest is being
defined.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author | Jim Fehlig <jfehlig@novell.com> |
---|---|
date | Wed Mar 21 10:43:12 2007 -0600 (2007-03-21) |
parents | eb8803aa395b |
children | e717d287cf85 |
files | ChangeLog src/Xen_ComputerSystemSettingData_Resource.c src/Xen_VirtualSystemManagementService.c |
line diff
1.1 --- a/ChangeLog Tue Mar 20 17:53:19 2007 -0600 1.2 +++ b/ChangeLog Wed Mar 21 10:43:12 2007 -0600 1.3 @@ -1,3 +1,15 @@ 1.4 +------------------------------------------------------------------- 1.5 +Wed Mar 21 10:35:23 MDT 2007 - jfehlig@novell.com 1.6 + 1.7 + - Changed syntax of VirtualSystemType property to coincide 1.8 + with the strings found in xen_caps. E.g. xen_caps has 1.9 + strings such as xen-3.0-x86_32p, hvm-3.0-x86_32, and so 1.10 + on. Providers now expect that VirtualSystemType property 1.11 + contains these strings as well. On a DefineSystem 1.12 + operation, Xen_VirtualSystemManagementService provider 1.13 + only looks first part of string (e.g. xen or hvm) to 1.14 + determine whether a PV or HVM guest is being defined. 1.15 + 1.16 ------------------------------------------------------------------- 1.17 Tue Mar 20 17:51:34 MDT 2007 - jfehlig@novell.com 1.18
2.1 --- a/src/Xen_ComputerSystemSettingData_Resource.c Tue Mar 20 17:53:19 2007 -0600 2.2 +++ b/src/Xen_ComputerSystemSettingData_Resource.c Wed Mar 21 10:43:12 2007 -0600 2.3 @@ -167,7 +167,7 @@ int Xen_ComputerSystemSettingData_setIns 2.4 2.5 if (resource->hvm_boot && (resource->hvm_boot[0] != '\0')) { 2.6 /* HVM settings */ 2.7 - CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"Xen HVM", CMPI_chars); 2.8 + CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"hvm-3.0-unknown", CMPI_chars); 2.9 CMSetProperty(instance, "BootOrder", (CMPIValue *)resource->hvm_boot, CMPI_chars); 2.10 prop_bool_val = get_platform_bool_val(resource, "stdvga"); 2.11 CMSetProperty(instance, "stdvga", (CMPIValue *)&prop_bool_val, CMPI_boolean); 2.12 @@ -190,7 +190,7 @@ int Xen_ComputerSystemSettingData_setIns 2.13 } 2.14 else { 2.15 /* PV settings */ 2.16 - CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"Xen Paravirtual", CMPI_chars); 2.17 + CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"xen-3.0-unknown", CMPI_chars); 2.18 2.19 if (resource->pv_kernel && (resource->pv_kernel[0] != '\0')) 2.20 CMSetProperty(instance, "Kernel", (CMPIValue *)resource->pv_kernel, CMPI_chars);
3.1 --- a/src/Xen_VirtualSystemManagementService.c Tue Mar 20 17:53:19 2007 -0600 3.2 +++ b/src/Xen_VirtualSystemManagementService.c Wed Mar 21 10:43:12 2007 -0600 3.3 @@ -1639,7 +1639,7 @@ static int vssd2xenconfig(CMPIInstance * 3.4 return 0; 3.5 } 3.6 3.7 - if (strcasecmp(vsType, "Xen Paravirtual") == 0) { 3.8 + if (strstr(vsType, "xen")) { 3.9 3.10 propertyvalue = CMGetProperty(vssd, "Bootloader", status); 3.11 if ((status->rc == CMPI_RC_OK) && !CMIsNullValue(propertyvalue)) { 3.12 @@ -1680,7 +1680,7 @@ static int vssd2xenconfig(CMPIInstance * 3.13 vm_rec->pv_args = strdup(CMGetCharPtr(propertyvalue.value.string)); 3.14 } 3.15 } 3.16 - else if (strcasecmp(vsType, "Xen HVM") == 0) { 3.17 + else if (strstr(vsType, "hvm")) { 3.18 propertyvalue = CMGetProperty(vssd, "BootOrder", status); 3.19 if ((status->rc != CMPI_RC_OK) || CMIsNullValue(propertyvalue)) { 3.20 _SBLIM_TRACE(1,("--- No BootOrder specified for HVM guest"));