# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1205412147 -3600
# Node ID 91c4e3da0404a28014dbff799a841d951ce235f5
# Parent 32a472f243e4f4a94e5c79a1f7393f1764e5cba8
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 32a472f243e4 -r 91c4e3da0404 src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Thu Mar 13 13:42:14 2008 +0100
+++ b/src/Virt_ElementConformsToProfile.c Thu Mar 13 13:42:27 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 32a472f243e4 -r 91c4e3da0404 src/profiles.h
--- a/src/profiles.h Thu Mar 13 13:42:14 2008 +0100
+++ b/src/profiles.h Thu Mar 13 13:42:27 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
};