os-cmpi-xen

changeset 84:e8137fd93139

Remove UUID property from Xen_Console class.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author Jim Fehlig <jfehlig@novell.com>
date Wed Feb 21 12:26:23 2007 -0700 (2007-02-21)
parents a11f71a8dc62
children 75019e01e546
files schema/Xen_Console.mof src/Xen_Console_Resource.c
line diff
     1.1 --- a/schema/Xen_Console.mof	Tue Feb 20 17:20:09 2007 -0700
     1.2 +++ b/schema/Xen_Console.mof	Wed Feb 21 12:26:23 2007 -0700
     1.3 @@ -8,8 +8,6 @@
     1.4          "a console attached to a Xen domain.")]
     1.5  class Xen_Console : CIM_LogicalDevice
     1.6  {
     1.7 -	[Description ("UUID")]
     1.8 -	string UUID;
     1.9  	[Description ("URI for this console")]
    1.10  	string URI;
    1.11  	[Description ("Console Protocol")]
     2.1 --- a/src/Xen_Console_Resource.c	Tue Feb 20 17:20:09 2007 -0700
     2.2 +++ b/src/Xen_Console_Resource.c	Wed Feb 21 12:26:23 2007 -0700
     2.3 @@ -241,10 +241,21 @@ int Xen_Console_setInstanceFromResource(
     2.4     CMSetProperty(instance, "Caption",(CMPIValue *)"Console", CMPI_chars);
     2.5     CMSetProperty(instance, "Description",(CMPIValue *)"Console", CMPI_chars);
     2.6  
     2.7 -   CMSetProperty(instance, "URI", (CMPIValue *)resource->uri, CMPI_chars);
     2.8 -   if (resource->protocol==XEN_CONSOLE_PROTOCOL_VT100) CMSetProperty(instance, "Protocol",(CMPIValue *)"VT100", CMPI_chars);
     2.9 -   if (resource->protocol==XEN_CONSOLE_PROTOCOL_RFB) CMSetProperty(instance, "Protocol",(CMPIValue *)"Remote Framebuffer - VNC", CMPI_chars);
    2.10 -   if (resource->protocol==XEN_CONSOLE_PROTOCOL_RDP) CMSetProperty(instance, "Protocol",(CMPIValue *)"Remote Desktop", CMPI_chars);
    2.11 +   if (resource->uri)
    2.12 +      CMSetProperty(instance, "URI", (CMPIValue *)resource->uri, CMPI_chars);
    2.13 +
    2.14 +   switch (resource->protocol) {
    2.15 +      case XEN_CONSOLE_PROTOCOL_VT100:
    2.16 +         CMSetProperty(instance, "Protocol",(CMPIValue *)"VT100", CMPI_chars);
    2.17 +         break;
    2.18 +      case XEN_CONSOLE_PROTOCOL_RFB:
    2.19 +         CMSetProperty(instance, "Protocol",(CMPIValue *)"Remote Framebuffer (VNC)", CMPI_chars);
    2.20 +         break;
    2.21 +      case XEN_CONSOLE_PROTOCOL_RDP:
    2.22 +         CMSetProperty(instance, "Protocol",(CMPIValue *)"Remote Desktop (SDL)", CMPI_chars);
    2.23 +         break;
    2.24 +   }
    2.25 +
    2.26     if (alloced_vm_rec)
    2.27        xen_vm_record_free(alloced_vm_rec);
    2.28