# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204540492 -3600
# Node ID 27e78288c82426835126eaa07dba1e425c756f3f
# Parent 9b3626d6b286b7e7190b4a760c349a45985ec5f2
HS: adopt HostSystem interface changes
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 9b3626d6b286 -r 27e78288c824 src/Makefile.am
--- a/src/Makefile.am Mon Mar 03 11:34:51 2008 +0100
+++ b/src/Makefile.am Mon Mar 03 11:34:52 2008 +0100
@@ -54,10 +54,10 @@ provider_LTLIBRARIES = libVirt_ComputerS
libVirt_SettingsDefineState.la \
libVirt_ResourceAllocationFromPool.la \
libVirt_ElementAllocatedFromPool.la \
+ libVirt_VSMigrationService.la \
libVirt_HostedService.la \
libVirt_ElementSettingData.la \
libVirt_VSMigrationCapabilities.la \
- libVirt_VSMigrationService.la \
libVirt_VSMigrationSettingData.la \
libVirt_VirtualSystemSnapshotService.la \
libVirt_VirtualSystemSnapshotServiceCapabilities.la
diff -r 9b3626d6b286 -r 27e78288c824 src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Mon Mar 03 11:34:51 2008 +0100
+++ b/src/Virt_HostedService.c Mon Mar 03 11:34:52 2008 +0100
@@ -40,8 +40,7 @@ static CMPIStatus validate_service_ref(c
static CMPIStatus validate_service_ref(const CMPIObjectPath *ref)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
- CMPIInstance *inst;
- const char *prop;
+ CMPIInstance *inst = NULL;
char* classname;
classname = class_base_name(CLASSNAME(ref));
@@ -54,17 +53,6 @@ static CMPIStatus validate_service_ref(c
s = get_migration_service(ref, &inst, _BROKER, true);
}
- if (s.rc != CMPI_RC_OK)
- goto out;
-
- prop = cu_compare_ref(ref, inst);
- if (prop != NULL) {
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_NOT_FOUND,
- "No such instance (%s)", prop);
- }
-
- out:
free(classname);
return s;
@@ -75,7 +63,7 @@ static CMPIStatus service_to_host(const
struct inst_list *list)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
- CMPIInstance *instance;
+ CMPIInstance *instance = NULL;
if (!match_hypervisor_prefix(ref, info))
return s;
@@ -84,7 +72,7 @@ static CMPIStatus service_to_host(const
if (s.rc != CMPI_RC_OK)
return s;
- s = get_host_cs(_BROKER, ref, &instance);
+ s = get_host(_BROKER, ref, &instance, false);
if (s.rc == CMPI_RC_OK)
inst_list_add(list, instance);
@@ -96,12 +84,12 @@ static CMPIStatus host_to_service(const
struct inst_list *list)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
- CMPIInstance *inst;
+ CMPIInstance *inst = NULL;
if (!match_hypervisor_prefix(ref, info))
return s;
- s = validate_host_ref(_BROKER, ref);
+ s = get_host(_BROKER, ref, &inst, true);
if (s.rc != CMPI_RC_OK)
return s;