
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1247095850 25200 # Node ID 7b8eeb3b3fcbe2f9b6cb5eabe10569545244472e # Parent f915b6e4d1a3748fe8541cf2a3030a4613675945 (#2) Add support for specifying a password for VNC connections to VSMS Also support sdl type graphics devices. Be sure to write to the infostore whether the guest has a VNC password set. Updates: -Add support for updating the infostore with info as to whether the guest has a VNC password set Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r f915b6e4d1a3 -r 7b8eeb3b3fcb src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Jul 08 16:30:50 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 08 16:30:50 2009 -0700 @@ -771,7 +771,11 @@ const char *keymap; int ret; - dev->dev.graphics.type = strdup("vnc"); + if (cu_get_str_prop(inst, "ResourceSubType", &val) != CMPI_RC_OK) { + msg = "GraphicsRASD ResourceSubType field not valid"; + goto out; + } + dev->dev.graphics.type = strdup(val); /* FIXME: Add logic to prevent address:port collisions */ if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) { @@ -792,8 +796,13 @@ dev->dev.graphics.keymap = strdup(keymap); + if (cu_get_str_prop(inst, "Password", &val) != CMPI_RC_OK) { + dev->dev.graphics.passwd = NULL; + } else { + dev->dev.graphics.passwd = strdup(val); + } + out: - return msg; } @@ -893,7 +902,7 @@ dev->type = (int)type; if (domain->type == DOMAIN_LXC) - msg = _container_rasd_to_vdev(inst, dev, type, ns); + msg = _container_rasd_to_vdev(inst, dev, type, ns); else msg = _sysvirt_rasd_to_vdev(inst, dev, type, ns); out: @@ -1137,6 +1146,13 @@ infostore_set_u64(ctx, "weight", dev->dev.vcpu.weight); infostore_set_u64(ctx, "limit", dev->dev.vcpu.limit); + + dev = dominfo->dev_graphics; + if (dev->dev.graphics.passwd != NULL) + infostore_set_bool(ctx, "has_vnc_passwd", true); + else + infostore_set_bool(ctx, "has_vnc_passwd", false); + out: infostore_close(ctx);