# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204286657 -3600
# Node ID cddf4a1cab91fa0a375dfb18c7780022e7f322b9
# Parent 9516232d810b1b7a0e5c9da5801ef96fdbc1775e
HS: adopt HostSystem interface changes
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 9516232d810b -r cddf4a1cab91 src/Makefile.am
--- a/src/Makefile.am Fri Feb 29 13:04:17 2008 +0100
+++ b/src/Makefile.am Fri Feb 29 13:04:17 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 9516232d810b -r cddf4a1cab91 src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Fri Feb 29 13:04:17 2008 +0100
+++ b/src/Virt_HostedService.c Fri Feb 29 13:04:17 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;