# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1221511302 25200
# Node ID d0f24426b9bfa5488f64666788e0d41e4c95b06c
# Parent 8f75fc91697b91ec1b633f69f5d0e8bc6f81c60a
Add RedirectionService to HostSystem support to HostedService.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 8f75fc91697b -r d0f24426b9bf src/Makefile.am
--- a/src/Makefile.am Mon Sep 15 13:39:10 2008 -0700
+++ b/src/Makefile.am Mon Sep 15 13:41:42 2008 -0700
@@ -167,9 +167,9 @@
libVirt_ElementAllocatedFromPool_la_SOURCES = Virt_ElementAllocatedFromPool.c
libVirt_ElementAllocatedFromPool_la_LIBADD = -lVirt_DevicePool -lVirt_Device
-libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la
libVirt_ResourcePoolConfigurationService.la libVirt_VSMigrationService.la
libVirt_HostSystem.la
+libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la
libVirt_ResourcePoolConfigurationService.la libVirt_VSMigrationService.la
libVirt_HostSystem.la libVirt_RedirectionService.la
libVirt_HostedService_la_SOURCES = Virt_HostedService.c
-libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService
-lVirt_ResourcePoolConfigurationService -lVirt_VSMigrationService -lVirt_HostSystem
+libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService
-lVirt_ResourcePoolConfigurationService -lVirt_VSMigrationService -lVirt_HostSystem
-lVirt_RedirectionService
libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la
libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c
diff -r 8f75fc91697b -r d0f24426b9bf src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Mon Sep 15 13:39:10 2008 -0700
+++ b/src/Virt_HostedService.c Mon Sep 15 13:41:42 2008 -0700
@@ -34,6 +34,7 @@
#include "Virt_VirtualSystemManagementService.h"
#include "Virt_ResourcePoolConfigurationService.h"
#include "Virt_VSMigrationService.h"
+#include "Virt_RedirectionService.h"
const static CMPIBroker *_BROKER;
@@ -52,6 +53,8 @@
s = get_rpcs(ref, &inst, _BROKER, context, true);
} else if (STREQC(classname, "VirtualSystemMigrationService")) {
s = get_migration_service(ref, &inst, _BROKER, context, true);
+ } else if (STREQC(classname, "RedirectionService")) {
+ s = get_rs(ref, &inst, _BROKER, context, true);
}
free(classname);
@@ -112,6 +115,12 @@
if (!CMIsNullObject(inst))
inst_list_add(list, inst);
+ s = get_rs(ref, &inst, _BROKER, info->context, false);
+ if (s.rc != CMPI_RC_OK)
+ return s;
+ if (!CMIsNullObject(inst))
+ inst_list_add(list, inst);
+
return s;
}
@@ -128,12 +137,15 @@
"Xen_ResourcePoolConfigurationService",
"Xen_VirtualSystemManagementService",
"Xen_VirtualSystemMigrationService",
+ "Xen_RedirectionService",
"KVM_ResourcePoolConfigurationService",
"KVM_VirtualSystemManagementService",
"KVM_VirtualSystemMigrationService",
+ "KVM_RedirectionService",
"LXC_ResourcePoolConfigurationService",
"LXC_VirtualSystemManagementService",
"LXC_VirtualSystemMigrationService",
+ "LXC_RedirectionService",
NULL
};
Show replies by date
KR> @@ -52,6 +53,8 @@
KR> s = get_rpcs(ref, &inst, _BROKER, context, true);
KR> } else if (STREQC(classname, "VirtualSystemMigrationService"))
{
KR> s = get_migration_service(ref, &inst, _BROKER, context,
true);
KR> + } else if (STREQC(classname, "RedirectionService")) {
KR> + s = get_rs(ref, &inst, _BROKER, context, true);
KR> }
It didn't jump out at me until I saw it here, but perhaps get_rs()
should be something a little more specific, like get_console_redirsrv()
or something like that?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com