# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1205488997 -3600
# Node ID be69ef2880db3d8410f5db7acb39587a26bfdd9d
# Parent 59f38ff0007af1489c4946672f6caa5b5fe196ce
RegisteredProfile: add instances for each implemented profile
The following DMTF Profiles are implemented by the
libvirt-cim provider package:
- DSP1042 System Virtualization 1.0.0
- DSP1045 Memory Resource Virtualization 1.0.0
- DSP1057 Virtual System 1.0.0
- DSP1059 Generic Device Resource Virtualization 1.0.0
- DSP1081 Virtual System Migration 0.8.1
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 59f38ff0007a -r be69ef2880db src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Fri Mar 14 11:03:15 2008 +0100
+++ b/src/Virt_ElementConformsToProfile.c Fri Mar 14 11:03:17 2008 +0100
@@ -58,6 +58,9 @@ static CMPIStatus elem_instances(const C
CMPIEnumeration *en = NULL;
CMPIData data ;
char *classname;
+
+ if (profile->scoping_class == NULL)
+ return s;
classname = get_typed_class(pfx_from_conn(conn),
profile->scoping_class);
diff -r 59f38ff0007a -r be69ef2880db src/profiles.h
--- a/src/profiles.h Fri Mar 14 11:03:15 2008 +0100
+++ b/src/profiles.h Fri Mar 14 11:03:17 2008 +0100
@@ -32,6 +32,16 @@ struct reg_prof {
char *other_reg_org;
char *ad_type_descriptions;
char *scoping_class;
+ struct reg_prof *scoping_profile;
+};
+
+struct reg_prof VirtualSystem = {
+ .reg_org = 2,
+ .reg_id = "CIM:DSP1057-VirtualSystem-1.0.0a",
+ .reg_name = "Virtual System Profile",
+ .reg_version = "1.0.0a",
+ .scoping_class = "ComputerSystem",
+ .scoping_profile = NULL
};
struct reg_prof SystemVirtualization = {
@@ -39,22 +49,44 @@ struct reg_prof SystemVirtualization = {
.reg_id = "CIM:DSP1042-SystemVirtualization-1.0.0",
.reg_name = "System Virtualization",
.reg_version = "1.0.0",
- .scoping_class = "HostSystem"
+ .scoping_class = "HostSystem",
+ .scoping_profile = &VirtualSystem
};
-struct reg_prof VirtualSystem = {
+struct reg_prof GenericDeviceResourceVirtualization = {
.reg_org = 2,
- .reg_id = "CIM:DSP1057-VirtualSystem-1.0.0a",
- .reg_name = "Virtual System Profile",
- .reg_version = "1.0.0a",
- .scoping_class = "ComputerSystem"
+ .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0",
+ .reg_name = "Generic Device Resource Virtualization",
+ .reg_version = "1.0.0",
+ .scoping_class = NULL,
+ .scoping_profile = &SystemVirtualization
};
+struct reg_prof MemoryResourceVirtualization = {
+ .reg_org = 2,
+ .reg_id = "CIM:DSP1045-MemoryResourceVirtualization-1.0.0",
+ .reg_name = "Memory Resource Virtualization",
+ .reg_version = "1.0.0",
+ .scoping_class = NULL,
+ .scoping_profile = &SystemVirtualization
+};
+
+struct reg_prof VirtualSystemMigration = {
+ .reg_org = 2,
+ .reg_id = "CIM:DSP1081-VirtualSystemMigration-1.0",
+ .reg_name = "Virtual System Migration",
+ .reg_version = "1.0",
+ .scoping_class = NULL,
+ .scoping_profile = &SystemVirtualization
+};
// Make sure to add pointer to your reg_prof struct here.
struct reg_prof *profiles[] = {
&SystemVirtualization,
&VirtualSystem,
+ &GenericDeviceResourceVirtualization,
+ &MemoryResourceVirtualization,
+ &VirtualSystemMigration,
NULL
};