# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1209146661 25200
# Node ID 2f9459623e83b5f787e4aa86c9074af394030c30
# Parent b425f4f1a59fac3b594b7536f00f18f20a4709c2
Fill in the previously-unimplemented AC-to-Pool association with EC
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r b425f4f1a59f -r 2f9459623e83 src/Makefile.am
--- a/src/Makefile.am Fri Apr 25 09:11:59 2008 -0700
+++ b/src/Makefile.am Fri Apr 25 11:04:21 2008 -0700
@@ -112,7 +112,7 @@ libVirt_AllocationCapabilities_la_SOURCE
libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c
libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool
-libVirt_ElementCapabilities_la_DEPENDENCIES =
libVirt_VirtualSystemManagementCapabilities.la
libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la
libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la
libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la
+libVirt_ElementCapabilities_la_DEPENDENCIES =
libVirt_VirtualSystemManagementCapabilities.la
libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la
libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la
libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la
libVirt_DevicePool.la
libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c
libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \
-lVirt_EnabledLogicalElementCapabilities \
@@ -121,7 +121,8 @@ libVirt_ElementCapabilities_la_LIBADD =
-lVirt_VSMigrationCapabilities \
-lVirt_AllocationCapabilities \
-lVirt_VirtualSystemManagementService \
- -lVirt_VSMigrationService
+ -lVirt_VSMigrationService \
+ -lVirt_DevicePool
libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la
libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la
libVirt_VSMigrationSettingData.la
libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c
diff -r b425f4f1a59f -r 2f9459623e83 src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Fri Apr 25 09:11:59 2008 -0700
+++ b/src/Virt_ElementCapabilities.c Fri Apr 25 11:04:21 2008 -0700
@@ -40,6 +40,7 @@
#include "Virt_HostSystem.h"
#include "Virt_VSMigrationCapabilities.h"
#include "Virt_AllocationCapabilities.h"
+#include "Virt_DevicePool.h"
#include "svpc_types.h"
@@ -270,6 +271,7 @@ static CMPIStatus alloc_to_pool_and_sys(
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *host;
CMPIInstance *ac;
+ CMPIInstance *pool;
const char *poolid;
if (!match_hypervisor_prefix(ref, info))
@@ -282,7 +284,9 @@ static CMPIStatus alloc_to_pool_and_sys(
goto out;
}
- /* Pool part not yet implemented */
+ s = get_pool_by_name(_BROKER, ref, poolid, &pool);
+ if ((pool == NULL) || (s.rc != CMPI_RC_OK))
+ goto out;
s = get_alloc_cap_by_id(_BROKER, ref, poolid, &ac);
if ((ac == NULL) || (s.rc != CMPI_RC_OK))
@@ -293,6 +297,7 @@ static CMPIStatus alloc_to_pool_and_sys(
goto out;
inst_list_add(list, host);
+ inst_list_add(list, pool);
out:
return s;
}
Show replies by date
Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1209146661 25200
# Node ID 2f9459623e83b5f787e4aa86c9074af394030c30
# Parent b425f4f1a59fac3b594b7536f00f18f20a4709c2
Fill in the previously-unimplemented AC-to-Pool association with EC
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
+1
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com