[PATCH] Removing the code to fetch sblim instance
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1285806092 25200
# Node ID 4d59bde40044795f53f0a1e53bbf500ceb2b56fa
# Parent 2b22040708e97d0634d64d2a7e24205e7d701de3
Removing the code to fetch sblim instance.
This instance creates problem while getting
that instance.
Just returning fake host.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 2b22040708e9 -r 4d59bde40044 src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Wed Sep 29 15:34:12 2010 -0700
+++ b/src/Virt_HostSystem.c Wed Sep 29 17:21:32 2010 -0700
@@ -151,66 +151,6 @@
return s;
}
-static CMPIStatus sblim_host(const CMPIBroker *broker,
- const CMPIContext *context,
- const CMPIObjectPath *ref,
- CMPIInstance **inst)
-{
- CMPIObjectPath *path;
- CMPIEnumeration *en = NULL;
- CMPIData data;
- CMPIStatus s;
- const char *cn = "Linux_ComputerSystem";
-
- path = CMNewObjectPath(broker, "root/cimv2", cn, &s);
- if ((path == NULL) || (s.rc != CMPI_RC_OK)) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to create HostSystem path");
- return s;
- }
-
- /* FIXME: This approach may return the wrong instance if more than
- one SBLIM Linux_ComputerSystem instance exists on the system.
- This isn't likely to happen in most cases, but a better approach
- should be used here.
- */
- en = CBEnumInstances(broker, context, path, NULL, &s);
- if (en == NULL) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Upcall EnumInstances of %s class failed",
- cn);
- goto out;
- }
-
- if (CMHasNext(en, &s)) {
- data = CMGetNext(en, &s);
- if (CMIsNullObject(data.value.inst)) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Failed to retrieve enumeration entry");
- goto out;
- }
-
- *inst = data.value.inst;
- } else {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "No entry found");
- goto out;
- }
-
- out:
- if (s.rc != CMPI_RC_OK) {
- CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg));
- } else {
- CU_DEBUG("SBLIM: Returned instance");
- }
-
- return s;
-}
-
CMPIStatus get_host(const CMPIBroker *broker,
const CMPIContext *context,
const CMPIObjectPath *reference,
@@ -219,10 +159,6 @@
{
CMPIStatus s;
- s = sblim_host(broker, context, reference, _inst);
- if (s.rc != CMPI_RC_OK)
- s = fake_host(broker, reference, _inst);
-
if (!is_get_inst && (s.rc == CMPI_RC_ERR_NOT_FOUND)) {
/* This is not an error */
return (CMPIStatus){CMPI_RC_OK, NULL};
13 years, 11 months
dormant vs suspended operating status
by Yee Ja
For KVM, is there any difference between a virtual machine with an
operating status of dormant vs suspended, in terms of what functionality is
available to run against the virtual machine? It seems as if dormant is
the same as suspended, but I haven't read any documentation which
specifically indicates such....
Thanks
13 years, 11 months
[PATCH] (#2) Do not filter out SBLIM host
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1285004026 25200
# Node ID 9cdaa2ce4c1541235182bf5a8097caffcf0dbcfc
# Parent 5dcb6bc27cc6e7fdcb2e595358d523cf29023808
(#2) Do not filter out SBLIM host.
This patch removes the code that does not return SBLIM host system.
The original code did not have this filter and was added later.
I searched the archives and did not find any reason to add this code.
Update #2 - Added an else case where if enumeration of instances is null,
a fake host is returned.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 5dcb6bc27cc6 -r 9cdaa2ce4c15 src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Wed Sep 08 16:36:08 2010 -0400
+++ b/src/Virt_HostSystem.c Mon Sep 20 10:33:46 2010 -0700
@@ -194,6 +194,11 @@
}
*inst = data.value.inst;
+ } else {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "No entry found");
+ goto out;
}
out:
@@ -237,20 +242,11 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *inst = NULL;
- CMPIObjectPath *path = NULL;
s = get_host(_BROKER, context, reference, &inst, is_get_inst);
if (s.rc != CMPI_RC_OK || inst == NULL)
goto out;
- path = CMGetObjectPath(inst, &s);
- if ((path == NULL) || (s.rc != CMPI_RC_OK))
- return s;
-
- if (STARTS_WITH(CLASSNAME(path), "Linux_"))
- /* Don't return SBLIM instances */
- goto out;
-
if (name_only)
cu_return_instance_name(results, inst);
else
13 years, 11 months
How do we track cimtest defects?
by Sharad Mishra
Hi,
Is there a community page to track defects against cimtest?
Thanks
Sharad Mishra
Open Virtualization
Linux Technology Center
IBM
13 years, 11 months
[PATCH] Do not filter out SBLIM host
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1284761568 25200
# Node ID cb30d2782092309e9ce7ae9dc949b4222aa243af
# Parent 5dcb6bc27cc6e7fdcb2e595358d523cf29023808
Do not filter out SBLIM host.
This patch removes the code that does not return SBLIM host system.
The original code did not have this filter and was added later.
I searched the archives and did not find any reason to add this code.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 5dcb6bc27cc6 -r cb30d2782092 src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Wed Sep 08 16:36:08 2010 -0400
+++ b/src/Virt_HostSystem.c Fri Sep 17 15:12:48 2010 -0700
@@ -237,20 +237,11 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *inst = NULL;
- CMPIObjectPath *path = NULL;
s = get_host(_BROKER, context, reference, &inst, is_get_inst);
if (s.rc != CMPI_RC_OK || inst == NULL)
goto out;
- path = CMGetObjectPath(inst, &s);
- if ((path == NULL) || (s.rc != CMPI_RC_OK))
- return s;
-
- if (STARTS_WITH(CLASSNAME(path), "Linux_"))
- /* Don't return SBLIM instances */
- goto out;
-
if (name_only)
cu_return_instance_name(results, inst);
else
13 years, 11 months
[PATCH] Adding CMReturnDone after CMPI InvokeMethod
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1282931870 14400
# Node ID 8715fb1b3e6c80018347bca07670517e91276b94
# Parent 72defbefbe6c2abd63e552491c8619989f14e076
Adding CMReturnDone after CMPI InvokeMethod
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 72defbefbe6c -r 8715fb1b3e6c std_indication.c
--- a/std_indication.c Sat Jan 16 09:24:30 2010 -0800
+++ b/std_indication.c Fri Aug 27 13:57:50 2010 -0400
@@ -311,6 +311,7 @@
CMPI_RC_ERR_FAILED,
"Invalid method");
+ CMReturnDone(results);
return s;
}
13 years, 12 months