[PATCH] SD doesn't return instances in all cases
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196460977 28800
# Node ID 1776beb36f5cffcfad4e581a8841f77f20bc3927
# Parent d5af3e219c22e8b32de64c69a29aea970ab6a9a4
SD doesn't return instances in all cases.
Virt_SystemDevice doesn't return instances when CIM_ManagedElement is passed as a result class argument. This only applies to the VM to device case (see failint query below).
The problem is that we use the result class to determine which device type to return. If no result class is specified, we return all associated devices. However, if CIM_ManagedElement is specified, we are unable to match the device type, and we return nothing.
I think all of this can be removed because filter_results() in libcmpiutil should remove the need for this kind of checking.
Failing query:
wbemcli ain -ac Xen_SystemDevice -arc CIM_ManagedElement 'http://root:elm3b41@localhost/root/virt:Xen_ComputerSystem.CreationClassN..."Xen_ComputerSystem",Name="Domain-0"'
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r d5af3e219c22 -r 1776beb36f5c src/Virt_SystemDevice.c
--- a/src/Virt_SystemDevice.c Fri Nov 30 11:33:21 2007 -0800
+++ b/src/Virt_SystemDevice.c Fri Nov 30 14:16:17 2007 -0800
@@ -171,22 +171,10 @@ static CMPIStatus sys_to_dev(const CMPIO
goto out;
}
- if (info->result_class) {
- int type;
-
- type = device_type_from_classname(info->result_class);
-
- ret = get_dom_devices(host,
- list,
- type,
- CLASSNAME(ref),
- NAMESPACE(ref));
- } else {
- ret = get_all_devices(host,
- list,
- CLASSNAME(ref),
- NAMESPACE(ref));
- }
+ ret = get_all_devices(host,
+ list,
+ CLASSNAME(ref),
+ NAMESPACE(ref));
if (ret >= 0) {
CMSetStatus(&s, CMPI_RC_OK);
16 years, 11 months
[PATCH 00 of 12] #3 - Adoption of changes to std_assoc struct in std_association for all associations
by Heidi Eckhart
Sorry saw Kaitlin's comments too late :(.
This is the follow up patch to the API changes made in
std_association. The struct std_assoc does now take lists
for source, target and assoc classnames.
Diff tp patch set #1:
- fixed SD: former patch specified HostSystem as group_component instead of ComputerSystem
- fixed HS: class ResourcePoolConfigurationService was missing for dependent
- fixed SDC: fixed check against CMPIRc in alloc_cap_to_rasd; this still needs to be fixed in another patch, as ResourceType is no key property but is handled as one
Diff to patch set #2:
- fixed RAFP: need to specify subclasses of ResourceAllocationSettingData
- fixed: SDS: need to specify subclasses of ResourceAllocationSettingData
- fixed VSSDC: need to specify subclasses of ResourceAllocationSettingData
16 years, 11 months
[PATCH] Patch guidelines added to SubmittingPatches
by Jay Gagnon
# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1196350280 18000
# Node ID a4193d586c20dd4aa9767f1299d9a1e91c0786a8
# Parent c478a5b30689a80159588c8f914ac97263694372
Patch guidelines added to SubmittingPatches.
I did a bit of editing from the original suggestions, so any grammar-minded people should probably run through it once. I also incorporated the following from the team call:
The two "stay on track"-style rules were merged.
Patch numbering for resends was expanded to all patches, not just patchsets.
Including an example test for edge cases was added.
Patch dependency handling was added.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r c478a5b30689 -r a4193d586c20 doc/SubmittingPatches
--- a/doc/SubmittingPatches Wed Nov 28 11:06:22 2007 -0800
+++ b/doc/SubmittingPatches Thu Nov 29 10:31:20 2007 -0500
@@ -33,3 +33,91 @@ using your real name (sorry, no pseudony
using your real name (sorry, no pseudonyms or anonymous contributions.)
+
+Guidelines for Submitting Patches.
+
+ Patches should be submitted using Mercurial's patchbomb extension,
+ and we recommend using the queues extension as well. On top of that,
+ we have some guidelines you should follow when submitting patches.
+ This makes reviewing patches easier, which in turns improves the
+ chances of your patch being accepted in a timely fashion.
+
+Single Patches:
+
+ (a) When you add a patch to the queue you have an idea of where you're
+ going with it, and the commit message should reflect that. Be
+ specific. Avoid just saying something like, "Various fixes to
+ AllocationCapabilities." Add a list of what was actually fixed,
+ like, "Add EnumInstanceNames support," and, "Eliminate duplicate
+ instances."
+
+ (b) The first line of your commit message will be the subject of the
+ patch email when you send it out, so write it like a subject. Keep
+ it short and to the point, then start a new line and feel free to be
+ as verbose as you need to be. The entire commit message will be
+ included in the patch.
+
+ (c) Stay on task with a patch. If you notice other problems while you
+ are working on patch, and they are not most definitely specific to
+ your patch, they should be another patch. The same goes for
+ nitpicking. While it might be only a line or two here and there
+ that is off track, this is actually one of the easiest ways to make
+ a patch difficult to review. All the trivial changes hide what is
+ really going on. Make the unrelated changes a new patch or don't
+ make them at all.
+
+ (d) If your patch addresses a strange issue or a rare edge case that
+ the reviewers are unlikely to be familiar with, make sure the commit
+ message include some example testcase with results, so the reviewers
+ can verify your patch more quickly.
+
+ (e) Before you email, export. If you have a patch called "alloc_fixes",
+ which would be emailed with "hg email alloc_fixes", you should first
+ run "hg export alloc_fixes". This lets you review your patch. Does
+ it have any typos in the comments? Did you accidentally include an
+ irrelevant change? Is your commit message still accurate and useful?
+ This is the single biggest step in ensuring you have a good patch.
+
+ (f) If your patch needs to be reworked and resent, prepend a "version
+ number" to the first line of the commit message. For example, "Add
+ EnumInstance to RASD," becomes "#2 Add EnumInstance to RASD." This
+ helps mail readers thread discussions correctly and helps
+ maintainers know they are applying the right version of your patch.
+ At the end of the commit message, explain what is different from one
+ version to the next. Nobody likes having to diff a diff.
+
+ (g) If your patch depends on a patch that exists on the mailing list but
+ not in the tree, it is okay to send your patch to the list as long
+ as your commit message mentions the dependency. It is also a good
+ idea to import the patch into your tree before you make your patch.
+ For example, a new patch called "cu_statusf API change" is on the
+ list, and your patch needs the new API. Save the email (no need to
+ trim headers) as api_change.eml, then do "hg qimport api_change.eml"
+ and "hg qpush" so that the patch is applied to your tree. Now write
+ your patch on top of it. You should still indicate the dependency
+ in your commit message.
+
+
+Patchsets:
+
+ (a) When you send a group of patches, Mercurial's email extension will
+ create a "header" email. Make the subject and body of that email
+ meaningful, so we know how the patches relate. It's easy to say,
+ "Each patch has a commit message, it's obvious how they work
+ together," but the rest of the list usually won't agree with that.
+ If the commit messages for each patch are good, you shouldn't need
+ more than a sentence or two to tie them all together, but you do
+ need it.
+
+ (b) If any of your patches are rejected and you rework them, resend the
+ entire set. This prevents things like, "So use patch 1 of 4 from
+ the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour
+ later, and patch 4 of 4 from today."
+
+ (c) If you resend a patchset, apply part (f) of the Single Patches
+ guidelines to your "Patch [0 of 3]" header email, for all the same
+ reasons.
+
+Questions/Comments on the Guidelines should be directed to:
+Jay Gagnon <grendel(a)linux.vnet.ibm.com>
+Patch Compliance Officer
\ No newline at end of file
16 years, 11 months
[PATCH 0 of 2] #2 Fix (again) VSMCaps and ElementCaps
by Dan Smith
There was a lot of cruft in both VSMCaps and ElementCaps around generating
a dynamic InstanceID with the HostSystem.Name in it that is really not
necessary.
This set just changes to a static InstanceID for VSMCaps and removes all
the supporting code that it obviates.
Changes:
- Just a rebase on tip
16 years, 11 months
[PATCH] SDC doesn't support specific RASD classes
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196451201 28800
# Node ID d5af3e219c22e8b32de64c69a29aea970ab6a9a4
# Parent 6515e4a1c90bba936fa1a15ddf2f501491e16fb5
SDC doesn't support specific RASD classes.
Instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported.
I also missed this one while reviewing Heidi's patches.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 6515e4a1c90b -r d5af3e219c22 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 10:43:37 2007 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 11:33:21 2007 -0800
@@ -847,8 +847,14 @@ char* group_component[] = {
};
char* part_component[] = {
- "Xen_ResourceAllocationSettingData",
- "KVM_ResourceAllocationSettingData",
+ "Xen_DiskResourceAllocationSettingData",
+ "Xen_MemResourceAllocationSettingData",
+ "Xen_NetResourceAllocationSettingData",
+ "Xen_ProcResourceAllocationSettingData",
+ "KVM_DiskResourceAllocationSettingData",
+ "KVM_MemResourceAllocationSettingData",
+ "KVM_NetResourceAllocationSettingData",
+ "KVM_ProcResourceAllocationSettingData",
NULL
};
16 years, 11 months
[PATCH] ESD does not support specific result clases properly
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196448217 28800
# Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5
# Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff
ESD does not support specific result clases properly.
Specifying a result class of Xen_VirtualSystemSettingData does not work (see query below), however a result class of CIM_ManagedElement does work.
This is because I tried to make this provider accept both generic and specific result classes. Heidi's libcmpiutil API update makes it so that the providers don't need to be concerned with handling more generic cases (CIM_ManagedElement, CIM_VirtualSystemSettingData, etc).
Also, I missed this during Heidi's patch review - instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. See below for failing query.
Failing queries:
wbemcli ain -ac Xen_ElementSettingData -arc Xen_VirtualSystemSettingData 'http://root:elm3b41@localhost/root/virt:Xen_VirtualSystemSettingData.Inst..."Xen:Domain-0"'
wbemcli ain -ac Xen_ElementSettingData -arc Xen_ProcResourceAllocationSettingData 'http://root:elm3b41@localhost/root/virt:Xen_ProcResourceAllocationSetting..."Domain-0/3"'
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a10df58ddd0e -r 6515e4a1c90b src/Virt_ElementSettingData.c
--- a/src/Virt_ElementSettingData.c Fri Nov 30 11:40:21 2007 +0100
+++ b/src/Virt_ElementSettingData.c Fri Nov 30 10:43:37 2007 -0800
@@ -178,13 +178,14 @@ char* virtual_system_setting_data[] = {
};
char* resource_allocation_setting_data[] = {
- "Xen_ResourceAllocationSettingData",
- "KVM_ResourceAllocationSettingData",
- NULL
-};
-
-char* managed_element[] = {
- "CIM_ManagedElement",
+ "Xen_DiskResourceAllocationSettingData",
+ "Xen_MemResourceAllocationSettingData",
+ "Xen_NetResourceAllocationSettingData",
+ "Xen_ProcResourceAllocationSettingData",
+ "KVM_DiskResourceAllocationSettingData",
+ "KVM_MemResourceAllocationSettingData",
+ "KVM_NetResourceAllocationSettingData",
+ "KVM_ProcResourceAllocationSettingData",
NULL
};
@@ -198,7 +199,7 @@ static struct std_assoc _vssd_to_vssd =
.source_class = (char**)&virtual_system_setting_data,
.source_prop = "ManagedElement",
- .target_class = (char**)&managed_element,
+ .target_class = (char**)&virtual_system_setting_data,
.target_prop = "SettingData",
.assoc_class = (char**)&assoc_classname,
@@ -211,7 +212,7 @@ static struct std_assoc _rasd_to_rasd =
.source_class = (char**)&resource_allocation_setting_data,
.source_prop = "ManagedElement",
- .target_class = (char**)&managed_element,
+ .target_class = (char**)&resource_allocation_setting_data,
.target_prop = "SettingData",
.assoc_class = (char**)&assoc_classname,
16 years, 11 months
[PATCH 0 of 2] Fix (again) VSMCaps and ElementCaps
by Dan Smith
There was a lot of cruft in both VSMCaps and ElementCaps around generating
a dynamic InstanceID with the HostSystem.Name in it that is really not
necessary.
This set just changes to a static InstanceID for VSMCaps and removes all
the supporting code that it obviates.
16 years, 11 months
[PATCH] Status and debug cleanup
by Jay Gagnon
# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1196452080 18000
# Node ID fcb3c7a237ed6640c38265ce82db0a664fb57013
# Parent 7e9965cdb91e44722c345bc497774057ff72f652
Status and debug cleanup.
After encountering various somewhat trivial but oft-occurring user output issues, I've just lumped them all in. This is, unfortunately, somewhat at odds with brand new the "stay on track" guideline (which I wrote), but making these all separate would have created a lot of that "patching a patch" thing where many lines get changed in more than one patch, which is much more obnoxious. So...
CMSetStatusWithChars -> cu_statusf conversion
Clean up formatting of cu_statusf calls
Remove trailing '.' from cu_statusf and CU_DEBUG calls.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r 7e9965cdb91e -r fcb3c7a237ed libxkutil/misc_util.c
--- a/libxkutil/misc_util.c Fri Nov 30 13:56:48 2007 -0500
+++ b/libxkutil/misc_util.c Fri Nov 30 14:48:00 2007 -0500
@@ -61,9 +61,9 @@ virConnectPtr connect_by_classname(const
uri = cn_to_uri(classname);
if (!uri) {
- CMSetStatusWithChars(broker, s,
- CMPI_RC_ERR_FAILED,
- "Unable to generate URI from classname");
+ cu_statusf(broker, s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to generate URI from classname");
return NULL;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_AllocationCapabilities.c Fri Nov 30 14:48:00 2007 -0500
@@ -51,15 +51,17 @@ CMPIStatus get_alloc_cap(const CMPIBroke
NAMESPACE(ref));
if (rasd_type_from_classname(CLASSNAME(ref), &type) != CMPI_RC_OK) {
- CMSetStatusWithChars(broker, &s, CMPI_RC_ERR_FAILED,
- "Could not get ResourceType.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get ResourceType");
goto out;
}
ret = asprintf(&inst_id, "%hi/%s", type, "0");
if (ret == -1) {
- CMSetStatusWithChars(broker, &s, CMPI_RC_ERR_FAILED,
- "Could not get InstanceID.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get InstanceID");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_ComputerSystem.c Fri Nov 30 14:48:00 2007 -0500
@@ -445,9 +445,9 @@ static CMPIStatus GetInstance(CMPIInstan
if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) {
CMPIStatus s;
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "No domain name specified");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "No domain name specified");
return s;
}
@@ -491,15 +491,15 @@ static CMPIStatus state_change_enable(vi
break;
default:
printf("Cannot go to enabled state from %i\n", info->state);
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Invalid state transition");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Invalid state transition");
};
if (ret != 0)
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain Operation Failed");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain Operation Failed");
return s;
}
@@ -516,15 +516,15 @@ static CMPIStatus state_change_disable(v
break;
default:
printf("Cannot go to disabled state from %i\n", info->state);
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Invalid state transition");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Invalid state transition");
};
if (ret != 0)
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain Operation Failed");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain Operation Failed");
return s;
}
@@ -540,15 +540,15 @@ static CMPIStatus state_change_pause(vir
ret = virDomainSuspend(dom);
break;
default:
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain not running");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain not running");
};
if (ret != 0)
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain Operation Failed");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain Operation Failed");
return s;
}
@@ -564,15 +564,15 @@ static CMPIStatus state_change_reboot(vi
ret = virDomainReboot(dom, 0);
break;
default:
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain not running");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain not running");
};
if (ret != 0)
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain Operation Failed");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain Operation Failed");
return s;
}
@@ -588,15 +588,15 @@ static CMPIStatus state_change_reset(vir
ret = domain_reset(dom);
break;
default:
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain not running");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain not running");
};
if (ret != 0)
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain Operation Failed");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain Operation Failed");
return s;
}
@@ -616,16 +616,16 @@ static CMPIStatus __state_change(const c
dom = virDomainLookupByName(conn, name);
if (dom == NULL) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Domain not found");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Domain not found");
goto out;
}
if (virDomainGetInfo(dom, &info) != 0) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to get current state");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to get current state");
goto out;
}
@@ -668,9 +668,9 @@ static CMPIStatus state_change(CMPIMetho
}
if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Name key not specified");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Name key not specified");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_Device.c
--- a/src/Virt_Device.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_Device.c Fri Nov 30 14:48:00 2007 -0500
@@ -371,9 +371,9 @@ static CMPIStatus enum_devices(const CMP
return s;
if (!dom_list_devices(conn, reference, &list)) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to list domains");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to list domains");
return s;
}
@@ -492,9 +492,9 @@ static CMPIStatus get_device(const CMPIO
CMReturnInstance(results, inst);
CMSetStatus(&s, CMPI_RC_OK);
} else {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to get device instance");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to get device instance");
}
virConnectClose(conn);
@@ -530,9 +530,9 @@ static CMPIStatus GetInstance(CMPIInstan
if (cu_get_str_path(reference, "DeviceID", &devid) != CMPI_RC_OK) {
CMPIStatus s;
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "No DeviceID specified");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "No DeviceID specified");
return s;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_ElementCapabilities.c Fri Nov 30 14:48:00 2007 -0500
@@ -73,8 +73,9 @@ static CMPIStatus sys_to_cap(const CMPIO
}
if (!STREQ(sys_name, host_name)) {
- cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "System '%s' is not a host system.", sys_name);
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "System '%s' is not a host system", sys_name);
goto out;
}
@@ -100,14 +101,14 @@ static CMPIStatus cap_to_sys(const CMPIO
if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Could not get InstanceID.");
+ "Could not get InstanceID");
goto out;
}
if (!parse_fq_devid(inst_id, &host, &device)) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Could not get system name.");
+ "Could not get system name");
goto out;
}
@@ -139,9 +140,9 @@ static CMPIStatus cs_to_cap(const CMPIOb
const char *sys_name = NULL;
if (cu_get_str_path(ref, "Name", &sys_name) != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Missing key: Name");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Missing key: Name");
goto out;
}
@@ -167,14 +168,14 @@ static CMPIStatus cap_to_cs(const CMPIOb
if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Could not get InstanceID.");
+ "Could not get InstanceID");
goto error1;
}
if (!parse_fq_devid(inst_id, &host, &device)) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Could not get system name.");
+ "Could not get system name");
goto error1;
}
@@ -213,8 +214,9 @@ static CMPIStatus pool_to_alloc(const CM
CMPIStatus s = {CMPI_RC_OK};
if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Could not get InstanceID.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get InstanceID");
goto out;
}
@@ -226,8 +228,9 @@ static CMPIStatus pool_to_alloc(const CM
ret = cu_get_u16_path(ref, "ResourceType", &type);
if (ret != 1) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Could not get ResourceType.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get ResourceType");
goto out;
}
CMSetProperty(inst, "ResourceType", &type, CMPI_uint16);
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_ElementConformsToProfile.c Fri Nov 30 14:48:00 2007 -0500
@@ -62,9 +62,9 @@ static CMPIStatus elem_instances(const C
classname = get_typed_class(pfx_from_conn(conn),
profile->provider_name);
if (classname == NULL) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Can't assemble classname." );
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't assemble classname" );
goto out;
}
@@ -74,18 +74,18 @@ static CMPIStatus elem_instances(const C
en = CBEnumInstances(_BROKER, info->context , op, NULL, &s);
if (en == NULL) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Upcall enumInstances to target class failed.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Upcall enumInstances to target class failed");
goto out;
}
while (CMHasNext(en, &s)) {
data = CMGetNext(en, &s);
if (CMIsNullObject(data.value.inst)) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to retrieve enumeration entry.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to retrieve enumeration entry");
goto out;
}
@@ -115,9 +115,9 @@ static CMPIStatus prof_to_elem(const CMP
return s;
if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "No InstanceID specified");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "No InstanceID specified");
goto out;
}
@@ -157,8 +157,9 @@ static CMPIStatus elem_to_prof(const CMP
classname = class_base_name(CLASSNAME(ref));
if (classname == NULL) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Can't get class name.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't get class name");
goto out;
}
@@ -173,9 +174,9 @@ static CMPIStatus elem_to_prof(const CMP
conn,
candidate);
if (instance == NULL) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Can't create profile instance.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't create profile instance");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_EnabledLogicalElementCapabilities.c
--- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 14:48:00 2007 -0500
@@ -65,8 +65,9 @@ static CMPIStatus set_inst_properties(co
devid = get_fq_devid((char *)sys_name, "0");
if (devid == NULL) {
- CMSetStatusWithChars(broker, &s, CMPI_RC_ERR_FAILED,
- "Could not get full ID.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get full ID");
goto error1;
}
@@ -114,25 +115,25 @@ CMPIStatus get_ele_cap(const CMPIBroker
classname = get_typed_class(CLASSNAME(ref),
"EnabledLogicalElementCapabilities");
if (classname == NULL) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Invalid class");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Invalid class");
goto out;
}
op = CMNewObjectPath(broker, NAMESPACE(ref), classname, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op)) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Cannot get object path for ELECapabilities");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Cannot get object path for ELECapabilities");
goto out;
}
*inst = CMNewInstance(broker, op, &s);
if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(*inst))) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to instantiate HostSystem");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to instantiate HostSystem");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_HostSystem.c Fri Nov 30 14:48:00 2007 -0500
@@ -76,9 +76,9 @@ CMPIStatus get_host_cs(const CMPIBroker
NAMESPACE(reference));
if (inst == NULL) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Can't create HostSystem instance.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't create HostSystem instance");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_HostedDependency.c
--- a/src/Virt_HostedDependency.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_HostedDependency.c Fri Nov 30 14:48:00 2007 -0500
@@ -66,9 +66,9 @@ static CMPIStatus host_to_vs(const CMPIO
if (ret) {
CMSetStatus(&s, CMPI_RC_OK);
} else {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to get domain list");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to get domain list");
}
CMSetStatus(&s, CMPI_RC_OK);
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_HostedResourcePool.c
--- a/src/Virt_HostedResourcePool.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_HostedResourcePool.c Fri Nov 30 14:48:00 2007 -0500
@@ -71,8 +71,7 @@ static CMPIStatus sys_to_pool(const CMPI
if (prop != NULL) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
- "No such HostSystem instance (%s)",
- prop);
+ "No such HostSystem instance (%s)", prop);
return s;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_RegisteredProfile.c
--- a/src/Virt_RegisteredProfile.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_RegisteredProfile.c Fri Nov 30 14:48:00 2007 -0500
@@ -55,9 +55,9 @@ CMPIInstance *reg_prof_instance(const CM
namespace);
if (instance == NULL) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Can't create RegisteredProfile instance.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't create RegisteredProfile instance");
goto out;
}
@@ -105,8 +105,9 @@ static CMPIStatus enum_profs(const CMPIO
conn,
profiles[i]);
if (instance == NULL) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Can't create profile instance.");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Can't create profile instance");
goto out;
}
@@ -137,9 +138,9 @@ static CMPIStatus get_prof(const CMPIObj
return s;
if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "No InstanceID specified");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "No InstanceID specified");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 14:48:00 2007 -0500
@@ -55,7 +55,7 @@ static bool rasd_prop_copy_value(struct
{
bool rc = true;
- CU_DEBUG("Copying '%s'.", src.field);
+ CU_DEBUG("Copying '%s'", src.field);
if (src.type & CMPI_string) {
dest->value = (CMPIValue *)strdup((char *)src.value);
} else if (src.type & CMPI_INTEGER) {
@@ -120,7 +120,7 @@ static struct sdc_rasd_prop *mem_max(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -144,7 +144,7 @@ static struct sdc_rasd_prop *mem_min(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -168,7 +168,7 @@ static struct sdc_rasd_prop *mem_def(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -192,7 +192,7 @@ static struct sdc_rasd_prop *mem_inc(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -216,7 +216,7 @@ static struct sdc_rasd_prop *proc_min(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -236,7 +236,7 @@ static struct sdc_rasd_prop *proc_max(co
if (conn == NULL) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not connect to hypervisor.");
+ "Could not connect to hypervisor");
goto out;
}
@@ -254,7 +254,7 @@ static struct sdc_rasd_prop *proc_max(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
out:
@@ -279,7 +279,7 @@ static struct sdc_rasd_prop *proc_def(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -303,7 +303,7 @@ static struct sdc_rasd_prop *proc_inc(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -326,7 +326,7 @@ static struct sdc_rasd_prop *net_min(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -350,7 +350,7 @@ static uint16_t net_max_xen(const CMPIOb
if (s->rc != CMPI_RC_OK) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get connection.");
+ "Could not get connection");
goto out;
}
@@ -359,7 +359,7 @@ static uint16_t net_max_xen(const CMPIOb
if (rc != 0) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get xen version.");
+ "Could not get xen version");
goto out;
}
@@ -385,7 +385,7 @@ static struct sdc_rasd_prop *net_max(con
if (prefix == NULL) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get prefix from reference.");
+ "Could not get prefix from reference");
goto out;
}
@@ -418,7 +418,7 @@ static struct sdc_rasd_prop *net_max(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
out:
free(prefix);
@@ -442,7 +442,7 @@ static struct sdc_rasd_prop *net_def(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -465,7 +465,7 @@ static struct sdc_rasd_prop *net_inc(con
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -489,7 +489,7 @@ static struct sdc_rasd_prop *disk_min(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -510,7 +510,7 @@ static struct sdc_rasd_prop *disk_max(co
if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get InstanceID.");
+ "Could not get InstanceID");
goto out;
}
@@ -518,7 +518,7 @@ static struct sdc_rasd_prop *disk_max(co
if (s->rc != CMPI_RC_OK) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get connection.");
+ "Could not get connection");
goto out;
}
@@ -528,7 +528,7 @@ static struct sdc_rasd_prop *disk_max(co
if (pool_inst == NULL) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get pool instance.");
+ "Could not get pool instance");
goto out;
}
@@ -536,7 +536,7 @@ static struct sdc_rasd_prop *disk_max(co
if (prop_ret != CMPI_RC_OK) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not get capacity from instance.");
+ "Could not get capacity from instance");
goto out;
}
CU_DEBUG("Got capacity from pool_inst: %lld", free_64);
@@ -553,7 +553,7 @@ static struct sdc_rasd_prop *disk_max(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
out:
@@ -578,7 +578,7 @@ static struct sdc_rasd_prop *disk_def(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -602,7 +602,7 @@ static struct sdc_rasd_prop *disk_inc(co
if (!ret) {
cu_statusf(_BROKER, s,
CMPI_RC_ERR_FAILED,
- "Could not copy RASD.");
+ "Could not copy RASD");
}
return rasd;
@@ -695,8 +695,9 @@ static CMPIInstance *sdc_rasd_inst(const
range = SDC_RANGE_POINT;
break;
default:
- CMSetStatusWithChars(broker, s, CMPI_RC_ERR_FAILED,
- "Unsupported sdc_rasd type.");
+ cu_statusf(broker, s,
+ CMPI_RC_ERR_FAILED,
+ "Unsupported sdc_rasd type");
goto out;
}
@@ -717,15 +718,15 @@ static CMPIInstance *sdc_rasd_inst(const
CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16);
for (i = 0; prop_list[i].field != NULL; i++) {
- CU_DEBUG("Setting property '%s'.", prop_list[i].field);
+ CU_DEBUG("Setting property '%s'", prop_list[i].field);
CMSetProperty(inst, prop_list[i].field,
prop_list[i].value, prop_list[i].type);
}
- CU_DEBUG("freeing prop_list.");
+ CU_DEBUG("freeing prop_list");
free_rasd_prop_list(prop_list);
out:
- CU_DEBUG("Returning inst.");
+ CU_DEBUG("Returning inst");
return inst;
}
@@ -749,22 +750,23 @@ static CMPIStatus sdc_rasds_for_type(con
for (i = SDC_RASD_MIN; i <= SDC_RASD_INC; i++) {
inst = sdc_rasd_inst(_BROKER, &s, ref, rasd, i);
if (s.rc != CMPI_RC_OK) {
- CU_DEBUG("Problem getting inst.");
+ CU_DEBUG("Problem getting inst");
goto out;
}
- CU_DEBUG("Got inst.");
+ CU_DEBUG("Got inst");
if (inst != NULL) {
inst_list_add(list, inst);
- CU_DEBUG("Added inst.");
+ CU_DEBUG("Added inst");
} else {
- CU_DEBUG("Inst is null, not added.");
+ CU_DEBUG("Inst is null, not added");
}
}
} else {
- CU_DEBUG("Unsupported type.");
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Unsupported device type.");
+ CU_DEBUG("Unsupported type");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unsupported device type");
}
out:
@@ -779,16 +781,17 @@ static CMPIStatus alloc_cap_to_rasd(cons
int ret;
uint16_t type;
- CU_DEBUG("Getting ResourceType.");
+ CU_DEBUG("Getting ResourceType");
ret = cu_get_u16_path(ref, "ResourceType", &type);
if (ret != CMPI_RC_OK) {
- CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
- "Could not get ResourceType.");
- goto out;
- }
-
- CU_DEBUG("ResourceType: %hi.", type);
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get ResourceType");
+ goto out;
+ }
+
+ CU_DEBUG("ResourceType: %hi", type);
s = sdc_rasds_for_type(ref, list, type);
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_VSSD.c
--- a/src/Virt_VSSD.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_VSSD.c Fri Nov 30 14:48:00 2007 -0500
@@ -143,9 +143,9 @@ static CMPIStatus enum_vssd(const CMPIOb
count = get_domain_list(conn, &list);
if (count < 0) {
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to enumerate domains");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to enumerate domains");
goto out;
} else if (count == 0) {
CMSetStatus(&s, CMPI_RC_OK);
@@ -229,7 +229,7 @@ static CMPIStatus GetInstance(CMPIInstan
if (!parse_instanceid(reference, NULL, &locid)) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Invalid InstanceID specified");
+ "Invalid InstanceID specified");
return s;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_VirtualSystemManagementCapabilities.c
--- a/src/Virt_VirtualSystemManagementCapabilities.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_VirtualSystemManagementCapabilities.c Fri Nov 30 14:48:00 2007 -0500
@@ -61,8 +61,9 @@ static CMPIStatus set_inst_properties(co
devid = get_fq_devid((char *)sys_name, "0");
if (devid == NULL) {
- CMSetStatusWithChars(broker, &s, CMPI_RC_ERR_FAILED,
- "Could not get full ID.");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Could not get full ID");
goto out;
}
CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars);
@@ -101,25 +102,25 @@ CMPIStatus get_vsm_cap(const CMPIBroker
classname = get_typed_class(CLASSNAME(ref),
"VirtualSystemManagementCapabilities");
if (classname == NULL) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Invalid class");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Invalid class");
goto out;
}
op = CMNewObjectPath(broker, NAMESPACE(ref), classname, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op)) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Cannot get object path for VSMCapabilities");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Cannot get object path for VSMCapabilities");
goto out;
}
*inst = CMNewInstance(broker, op, &s);
if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(*inst))) {
- CMSetStatusWithChars(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to instantiate HostSystem");
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to instantiate HostSystem");
goto out;
}
diff -r 7e9965cdb91e -r fcb3c7a237ed src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Fri Nov 30 13:56:48 2007 -0500
+++ b/src/Virt_VirtualSystemManagementService.c Fri Nov 30 14:48:00 2007 -0500
@@ -107,9 +107,9 @@ static CMPIStatus define_system_parse_ar
sys);
if (ret) {
CU_DEBUG("Unable to parse SystemSettings instance");
- CMSetStatusWithChars(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "SystemSettings parse error");
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "SystemSettings parse error");
goto out;
}
@@ -294,9 +294,9 @@ static CMPIInstance *connect_and_create(
dom = virDomainDefineXML(conn, xml);
if (dom == NULL) {
CU_DEBUG("Failed to define domain from XML");
- CMSetStatusWithChars(_BROKER, s,
- CMPI_RC_ERR_FAILED,
- "Failed to create domain");
+ cu_statusf(_BROKER, s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to create domain");
return NULL;
}
@@ -304,9 +304,9 @@ static CMPIInstance *connect_and_create(
inst = instance_from_name(_BROKER, conn, (char *)name, ref);
if (inst == NULL) {
CU_DEBUG("Failed to get new instance");
- CMSetStatusWithChars(_BROKER, s,
- CMPI_RC_ERR_FAILED,
- "Failed to lookup resulting system");
+ cu_statusf(_BROKER, s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to lookup resulting system");
}
virConnectClose(conn);
@@ -639,8 +639,7 @@ static CMPIStatus _resource_dynamic(stru
if (func(dom, dev) == 0) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Unable to change (%i) device",
- action);
+ "Unable to change (%i) device", action);
} else {
CMSetStatus(&s, CMPI_RC_OK);
}
@@ -673,8 +672,7 @@ static CMPIStatus resource_del(struct do
else {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Cannot delete resources of type %" PRIu16,
- type);
+ "Cannot delete resources of type %" PRIu16, type);
goto out;
}
@@ -719,8 +717,7 @@ static CMPIStatus resource_add(struct do
if ((type == CIM_RASD_TYPE_MEM) || (_list == NULL)) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Cannot add resources of type %" PRIu16,
- type);
+ "Cannot add resources of type %" PRIu16, type);
goto out;
}
@@ -730,8 +727,7 @@ static CMPIStatus resource_add(struct do
*/
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "[TEMP] Cannot add resources of type %" PRIu16,
- type);
+ "[TEMP] Cannot add resources of type %" PRIu16, type);
goto out;
}
@@ -784,8 +780,7 @@ static CMPIStatus resource_mod(struct do
else {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Cannot modify resources of type %" PRIu16,
- type);
+ "Cannot modify resources of type %" PRIu16, type);
goto out;
}
16 years, 11 months
[PATCH 0 of 2] libcmpiutil-0.1 freeze
by Dan Smith
This set tags tip as release_0_1 and bumps the package version number to 0.2.
If people are happy with calling tip 0.1, then I'll move forward with getting
this into Fedora development.
(NB: The tag patch doesn't convert properly, AFAIK, so I'll tag this in my
main tree before actually pushing)
16 years, 11 months
[PATCH 0 of 4] #5 - Enhance std association logic for reference lists and input parameter handling
by Heidi Eckhart
This patch set fixes:
- enhance the std_assoc struct to support lists for source, target and association classnames
- fixed a wrong error return for a NULL handler
- reworked check for input parameter: assocClass, resultClass, role, resultRole
Diff to patch set #3:
- fixed patch 3 of 3: std_assoc_get_handler did not set handler to NULL in case of "no valid handler found" and so returned wrong handler
Diff to patch set #4:
- added 4th patch to fix the swapped assocClass and resultClass values for reference(Names) calls
16 years, 11 months