[PATCH] Add TypesSupported[] to VirtualSystemManagementCapabilities
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1204222059 28800
# Node ID 7dccdf33b9b102e8c1a2ffb2ae34292a61ec512e
# Parent ab774ea93302e6173b0749a27d7d951469eccc62
Add TypesSupported[] to VirtualSystemManagementCapabilities
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r ab774ea93302 -r 7dccdf33b9b1 src/Virt_VirtualSystemManagementCapabilities.c
--- a/src/Virt_VirtualSystemManagementCapabilities.c Thu Feb 28 10:02:10 2008 -0800
+++ b/src/Virt_VirtualSystemManagementCapabilities.c Thu Feb 28 10:07:39 2008 -0800
@@ -46,11 +46,14 @@ enum {ADD_RESOURCES = 1,
static CMPIStatus set_inst_properties(const CMPIBroker *broker,
+ const CMPIObjectPath *ref,
CMPIInstance *inst)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIArray *array;
uint16_t element;
+ char *prefix = NULL;
+ CMPIString *str;
CMSetProperty(inst, "InstanceID",
(CMPIValue *)"ManagementCapabilities", CMPI_chars);
@@ -73,7 +76,29 @@ static CMPIStatus set_inst_properties(co
CMSetProperty(inst, "SynchronousMethodsSupported",
(CMPIValue *)&array, CMPI_uint16A);
- out:
+
+ prefix = class_prefix_name(CLASSNAME(ref));
+ if (prefix == NULL) {
+ CU_DEBUG("Prefix of %s was NULL", CLASSNAME(ref));
+ goto out;
+ }
+
+ str = CMNewString(broker, prefix, &s);
+ if ((str == NULL) || (s.rc != CMPI_RC_OK))
+ goto out;
+
+ array = CMNewArray(broker, 1, CMPI_string, &s);
+ if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array)))
+ goto out;
+
+ CMSetArrayElementAt(array, 0, (CMPIValue *)&str, CMPI_string);
+
+ CMSetProperty(inst, "TypesSupported",
+ (CMPIValue *)&array, CMPI_stringA);
+
+ out:
+ free(prefix);
+
return s;
}
@@ -106,7 +131,7 @@ CMPIStatus get_vsm_cap(const CMPIBroker
goto out;
}
- s = set_inst_properties(broker, inst);
+ s = set_inst_properties(broker, ref, inst);
if (is_get_inst) {
s = cu_validate_ref(broker, ref, inst);
17 years, 1 month
[PATCH] RegisteredProfile: add keys parameter to SetPropertyFilter
by Heidi Eckhart
# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204201511 -3600
# Node ID 50d2575dd541ec7d578e491e5bfdc710f72408f0
# Parent deae8f1fa76ab1e1fa785495be4944e0fc4e16d7
RegisteredProfile: add keys parameter to SetPropertyFilter
This is necessary to avoid error returns.
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r deae8f1fa76a -r 50d2575dd541 src/Virt_RegisteredProfile.c
--- a/src/Virt_RegisteredProfile.c Wed Feb 27 13:49:31 2008 -0800
+++ b/src/Virt_RegisteredProfile.c Thu Feb 28 13:25:11 2008 +0100
@@ -62,7 +62,8 @@ CMPIInstance *reg_prof_instance(const CM
}
if (properties) {
- s = CMSetPropertyFilter(instance, properties, NULL);
+ const char *keys[] = {"InstanceID", NULL};
+ s = CMSetPropertyFilter(instance, properties, keys);
if (s.rc != CMPI_RC_OK) {
goto out;
}
17 years, 1 month
[PATCH] Add TypesSupported[] to VirtualSystemManagementCapabilities
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1204150157 28800
# Node ID 534a933e0202dc425f3f27ba55dfa42e7c42db5f
# Parent 224ad7217cef6235bccb3377b9b86114ed61d6ae
Add TypesSupported[] to VirtualSystemManagementCapabilities
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 224ad7217cef -r 534a933e0202 src/Virt_VirtualSystemManagementCapabilities.c
--- a/src/Virt_VirtualSystemManagementCapabilities.c Wed Feb 27 13:49:31 2008 -0800
+++ b/src/Virt_VirtualSystemManagementCapabilities.c Wed Feb 27 14:09:17 2008 -0800
@@ -46,11 +46,14 @@ enum {ADD_RESOURCES = 1,
static CMPIStatus set_inst_properties(const CMPIBroker *broker,
+ const CMPIObjectPath *ref,
CMPIInstance *inst)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIArray *array;
uint16_t element;
+ char *prefix = NULL;
+ CMPIString *str;
CMSetProperty(inst, "InstanceID",
(CMPIValue *)"ManagementCapabilities", CMPI_chars);
@@ -73,7 +76,29 @@ static CMPIStatus set_inst_properties(co
CMSetProperty(inst, "SynchronousMethodsSupported",
(CMPIValue *)&array, CMPI_uint16A);
- out:
+
+ prefix = class_prefix_name(CLASSNAME(ref));
+ if (prefix == NULL) {
+ CU_DEBUG("Prefix of %s was NULL", CLASSNAME(ref));
+ goto out;
+ }
+
+ str = CMNewString(broker, prefix, &s);
+ if ((str == NULL) || (s.rc != CMPI_RC_OK))
+ goto out;
+
+ array = CMNewArray(broker, 1, CMPI_string, &s);
+ if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array)))
+ goto out;
+
+ CMSetArrayElementAt(array, 0, (CMPIValue *)&str, CMPI_string);
+
+ CMSetProperty(inst, "TypesSupported",
+ (CMPIValue *)&array, CMPI_charsA);
+
+ out:
+ free(prefix);
+
return s;
}
@@ -106,7 +131,7 @@ CMPIStatus get_vsm_cap(const CMPIBroker
goto out;
}
- s = set_inst_properties(broker, inst);
+ s = set_inst_properties(broker, ref, inst);
if (is_get_inst) {
s = cu_validate_ref(broker, ref, inst);
17 years, 1 month
[PATCH] [CU] Fix the --dump-xml option in libcmpiutil
by Jay Gagnon
# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1204126795 18000
# Node ID 9ba30d99c82d6741706014630a4d8496dbaa4deb
# Parent b2606bc023a8a26ecd25464e976fb16606ed3a47
[CU] Fix the --dump-xml option in libcmpiutil
It appears that at some point some changes were made that broke the --dump-xml switch. This should fix that up.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r b2606bc023a8 -r 9ba30d99c82d tools/indication_tester.py
--- a/tools/indication_tester.py Tue Feb 26 15:16:00 2008 -0500
+++ b/tools/indication_tester.py Wed Feb 27 10:39:55 2008 -0500
@@ -359,13 +359,13 @@ class CIMIndicationSubscription:
self.__do_cimpost(self.conn, xml,
"DeleteInstance", auth_hdr)
-def dump_xml(name, typ, ns):
- filter_str = filter_xml(name, typ, ns)
- handler_str = handler_xml(name, 8000)
- subscript_str = subscription_xml(name)
- del_filter_str = delete_inst_xml(name, "Filter")
- del_handler_str = delete_inst_xml(name, "Handler")
- del_subscript_str = delete_sub_xml(name)
+def dump_xml(name, typ, ns, sysname):
+ filter_str = filter_xml(name, typ, ns, sysname)
+ handler_str = handler_xml(name, 8000, sysname)
+ subscript_str = subscription_xml(name, sysname)
+ del_filter_str = delete_inst_xml(name, "Filter", sysname)
+ del_handler_str = delete_inst_xml(name, "Handler", sysname)
+ del_subscript_str = delete_sub_xml(name, sysname)
print "CreateFilter:\n%s\n" % filter_str
print "DeleteFilter:\n%s\n" % del_filter_str
@@ -402,10 +402,6 @@ def main():
print "Fatal: no indication type provided."
sys.exit(1)
- if options.dump:
- dump_xml(options.name, args[0], options.ns)
- sys.exit(0)
-
if options.username:
auth = (options.username, options.password)
else:
@@ -416,6 +412,10 @@ def main():
else:
sysname = url
+ if options.dump:
+ dump_xml(options.name, args[0], options.ns, sysname)
+ sys.exit(0)
+
sub = CIMIndicationSubscription(options.name, args[0], options.ns,
options.print_ind, sysname)
sub.subscribe(options.url, auth)
17 years, 1 month
[PATCH 0 of 2] Add VirtualSystemSnapshotService
by Dan Smith
This adds basic support for the VirtualSystemSnapshotService.
Since the service seems to assume that a system can be snapshotted while
running (which Xen cannot do), we provide a terminal snapshot and fake a
running snapshot by doing a save/resume.
Still to be done is adding the Capabilities support, as well as making
the VSSD provider expose an additional VSSD for the snapshot, as required
by the SVP.
17 years, 1 month
[PATCH 0 of 4] #5 - Enable VSSD to validate client given object path and Adopt changed to VSSD interface to ESD & SDS & VSSDC
by Heidi Eckhart
VSSD does now take care of the client given object path.
The resulting interface changes have been adopted to
- ESD by the second patch
- SDS by the third patch
- VSSDC by the fourth patch (diff to patch set 1)
diff to patch set 2:
- updated VSSD to compare a returned integer result explicitely
diff to patch set 3:
- fixed memory leak (on name) in get_vssd_by_ref
- fixed get_vssd_by_name and get_vssd_by_ref to only return a valid instance pointer in case of success
diff to patch set 4:
- fix whitespace issues
17 years, 1 month