# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1237409963 25200
# Node ID bdf655b33c77fe916c954f205404f3a8c138a23d
# Parent b40ee621a3ae88009025aa85049fb147c9c773d6
Advertise the profiles using SLP
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b40ee621a3ae -r bdf655b33c77 src/Virt_RegisteredProfile.c
--- a/src/Virt_RegisteredProfile.c Wed Mar 18 11:47:37 2009 -0700
+++ b/src/Virt_RegisteredProfile.c Wed Mar 18 13:59:23 2009 -0700
@@ -49,6 +49,7 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *instance = NULL;
+ CMPIArray *array;
instance = get_typed_instance(broker,
pfx,
@@ -79,6 +80,19 @@
CMSetProperty(instance, "RegisteredVersion",
(CMPIValue *)profile->reg_version, CMPI_chars);
+ array = CMNewArray(broker, 1, CMPI_uint16, &s);
+ if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array))) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create CMPIArray object");
+ goto out;
+ }
+
+ CMSetArrayElementAt(array, 0, &profile->ad_types, CMPI_uint16);
+
+ CMSetProperty(instance, "AdvertiseTypes",
+ (CMPIValue *)&array, CMPI_uint16A);
+
*_inst = instance;
out:
diff -r b40ee621a3ae -r bdf655b33c77 src/profiles.h
--- a/src/profiles.h Wed Mar 18 11:47:37 2009 -0700
+++ b/src/profiles.h Wed Mar 18 13:59:23 2009 -0700
@@ -41,6 +41,7 @@
.reg_id = "CIM:DSP1057-VirtualSystem-1.0.0a",
.reg_name = "Virtual System Profile",
.reg_version = "1.0.0a",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.scoping_profile = NULL
};
@@ -50,6 +51,7 @@
.reg_id = "CIM:DSP1042-SystemVirtualization-1.0.0",
.reg_name = "System Virtualization",
.reg_version = "1.0.0",
+ .ad_types = 3,
.scoping_class = "HostSystem",
.scoping_profile = &VirtualSystem
};
@@ -59,6 +61,7 @@
.reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_d",
.reg_name = "Generic Device Resource Virtualization",
.reg_version = "1.0.0",
+ .ad_types = 3,
.central_class = "DiskPool",
.scoping_class = NULL,
.scoping_profile = &SystemVirtualization
@@ -69,6 +72,7 @@
.reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_n",
.reg_name = "Generic Device Resource Virtualization",
.reg_version = "1.0.0",
+ .ad_types = 3,
.central_class = "NetworkPool",
.scoping_class = NULL,
.scoping_profile = &SystemVirtualization
@@ -79,6 +83,7 @@
.reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_p",
.reg_name = "Generic Device Resource Virtualization",
.reg_version = "1.0.0",
+ .ad_types = 3,
.central_class = "ProcessorPool",
.scoping_class = NULL,
.scoping_profile = &SystemVirtualization
@@ -89,6 +94,7 @@
.reg_id = "CIM:DSP1045-MemoryResourceVirtualization-1.0.0",
.reg_name = "Memory Resource Virtualization",
.reg_version = "1.0.0",
+ .ad_types = 3,
.scoping_class = NULL,
.central_class = "MemoryPool",
.scoping_profile = &SystemVirtualization
@@ -99,6 +105,7 @@
.reg_id = "CIM:DSP1081-VirtualSystemMigration-0.8.1",
.reg_name = "Virtual System Migration",
.reg_version = "0.8.1",
+ .ad_types = 3,
.scoping_class = NULL,
.central_class = "VirtualSystemMigrationService",
.scoping_profile = &SystemVirtualization
@@ -109,6 +116,7 @@
.reg_id = "CIM:DSP1076-KVMRedirection-1.0.0",
.reg_name = "KVM Redirection",
.reg_version = "1.0.0",
+ .ad_types = 3,
.scoping_class = "HostSystem",
.central_class = "ConsoleRedirectionService",
.scoping_profile = &SystemVirtualization
@@ -119,6 +127,7 @@
.reg_id = "CIM:DSP1043-AllocationCapabilities-1.0.0a",
.reg_name = "Allocation Capabilities",
.reg_version = "1.0.0a",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.central_class = "AllocationCapabilities",
.scoping_profile = &SystemVirtualization
@@ -129,6 +138,7 @@
.reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_d",
.reg_name = "Resource Allocation",
.reg_version = "1.1.0c",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.central_class = "DiskPool",
.scoping_profile = &SystemVirtualization
@@ -139,6 +149,7 @@
.reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_n",
.reg_name = "Resource Allocation",
.reg_version = "1.1.0c",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.central_class = "NetworkPool",
.scoping_profile = &SystemVirtualization
@@ -149,6 +160,7 @@
.reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_p",
.reg_name = "Resource Allocation",
.reg_version = "1.1.0c",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.central_class = "ProcessorPool",
.scoping_profile = &SystemVirtualization
@@ -159,6 +171,7 @@
.reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_m",
.reg_name = "Resource Allocation",
.reg_version = "1.1.0c",
+ .ad_types = 3,
.scoping_class = "ComputerSystem",
.central_class = "MemoryPool",
.scoping_profile = &SystemVirtualization