[PATCH] Add indication tester authentication and pegasus compliance
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1201205219 28800
# Node ID 309d2718d4a39d582f3dd1c281315a291d0f652c
# Parent fd28a485f90399d166eb62816c32e2d7727cced6
Add indication tester authentication and pegasus compliance
This works for me on Pegasus, but it would be nice to get some validation
that it's not broken for SFCB now :)
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r fd28a485f903 -r 309d2718d4a3 tools/indication_tester.py
--- a/tools/indication_tester.py Wed Jan 16 07:43:41 2008 -0800
+++ b/tools/indication_tester.py Thu Jan 24 12:06:59 2008 -0800
@@ -9,9 +9,10 @@ from optparse import OptionParser
from optparse import OptionParser
import BaseHTTPServer
import httplib
+import base64
from xml.dom.minidom import parse, parseString
-def filter_xml(name, type, ns):
+def filter_xml(name, type, ns, sysname):
return """
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
@@ -28,7 +29,7 @@ def filter_xml(name, type, ns):
<VALUE>CIM_ComputerSystem</VALUE>
</PROPERTY>
<PROPERTY NAME="SystemName" TYPE="string">
- <VALUE>localhost.localdomain</VALUE>
+ <VALUE>%s</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationClassName" TYPE="string">
<VALUE>CIM_IndicationFilter</VALUE>
@@ -52,9 +53,9 @@ def filter_xml(name, type, ns):
</SIMPLEREQ>
</MESSAGE>
</CIM>
- """ % (name, type, ns)
-
-def handler_xml(name, port):
+ """ % (sysname, name, type, ns)
+
+def handler_xml(name, port, sysname):
return """
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
@@ -71,7 +72,7 @@ def handler_xml(name, port):
<VALUE>CIM_ComputerSystem</VALUE>
</PROPERTY>
<PROPERTY NAME="SystemName" TYPE="string">
- <VALUE>localhost.localdomain</VALUE>
+ <VALUE>%s</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationClassName" TYPE="string">
<VALUE>CIM_IndicationHandlerCIMXML</VALUE>
@@ -88,9 +89,9 @@ def handler_xml(name, port):
</SIMPLEREQ>
</MESSAGE>
</CIM>
- """ % (name, port)
-
-def subscription_xml(name):
+ """ % (sysname, name, port)
+
+def subscription_xml(name, sysname):
return """
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
@@ -114,7 +115,7 @@ def subscription_xml(name):
</KEYBINDING>
<KEYBINDING NAME="SystemName">
<KEYVALUE VALUETYPE="string">
- localhost.localdomain
+ %s
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CreationClassName">
@@ -141,7 +142,7 @@ def subscription_xml(name):
</KEYBINDING>
<KEYBINDING NAME="SystemName">
<KEYVALUE VALUETYPE="string">
- localhost.localdomain
+ %s
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CreationClassName">
@@ -166,9 +167,9 @@ def subscription_xml(name):
</SIMPLEREQ>
</MESSAGE>
</CIM>
- """ % (name, name)
-
-def delete_inst_xml(name, type):
+ """ % (sysname, name, sysname, name)
+
+def delete_inst_xml(name, type, sysname):
return """
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
@@ -185,7 +186,7 @@ def delete_inst_xml(name, type):
<KEYVALUE>CIM_ComputerSystem</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="SystemName">
- <KEYVALUE>localhost.localdomain</KEYVALUE>
+ <KEYVALUE>%s</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CreationClassName">
<KEYVALUE>CIM_Indication%sCIMXML</KEYVALUE>
@@ -199,9 +200,9 @@ def delete_inst_xml(name, type):
</SIMPLEREQ>
</MESSAGE>
</CIM>;
- """ % (type, type, name, type);
-
-def delete_sub_xml(name):
+ """ % (type, sysname, type, name, type);
+
+def delete_sub_xml(name, sysname):
return """
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
@@ -224,7 +225,7 @@ def delete_sub_xml(name):
</KEYBINDING>
<KEYBINDING NAME="SystemName">
<KEYVALUE VALUETYPE="string">
- localhost.localdomain
+ %s
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CreationClassName">
@@ -250,7 +251,7 @@ def delete_sub_xml(name):
</KEYBINDING>
<KEYBINDING NAME="SystemName">
<KEYVALUE VALUETYPE="string">
- localhost.localdomain
+ %s
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CreationClassName">
@@ -272,7 +273,7 @@ def delete_sub_xml(name):
</SIMPLEREQ>
</MESSAGE>
</CIM>;
- """ % (name, name)
+ """ % (sysname, name, sysname, name)
class CIMIndication:
def __init__(self, xmldata):
@@ -294,35 +295,67 @@ class CIMSocketHandler(BaseHTTPServer.Ba
print "Got indication: %s" % indication
class CIMIndicationSubscription:
- def __init__(self, name, typ, ns):
+ def __init__(self, name, typ, ns, sysname):
self.name = name
self.type = typ
self.ns = ns
+ self.sysname = sysname
self.server = BaseHTTPServer.HTTPServer(('', 8000), CIMSocketHandler)
self.port = 8000
- self.filter_xml = filter_xml(name, typ, ns)
- self.handler_xml = handler_xml(name, self.port)
- self.subscription_xml = subscription_xml(name)
-
- def __do_cimpost(self, conn, body):
- conn.request("POST", "/cimom", body, {"CIMOperation" : "MethodCall"})
+ self.filter_xml = filter_xml(name, typ, ns, sysname)
+ self.handler_xml = handler_xml(name, self.port, sysname)
+ self.subscription_xml = subscription_xml(name, sysname)
+
+ def __do_cimpost(self, conn, body, method, auth_hdr=None):
+ headers = {"CIMOperation" : "MethodCall",
+ "CIMMethod" : method,
+ "CIMObject" : "root/PG_Interop",
+ "Content-Type" : "text/cimxml"}
+
+ if auth_hdr:
+ headers["Authorization"] = "Basic %s" % auth_hdr
+
+ conn.request("POST", "/cimom", body, headers)
resp = conn.getresponse()
+ if not resp.getheader("content-length"):
+ raise Exception("Authentication (or request) Failed!")
resp.read()
- def subscribe(self, url):
+ def subscribe(self, url, cred=None):
self.conn = httplib.HTTPConnection(url)
- self.__do_cimpost(self.conn, self.filter_xml)
- self.__do_cimpost(self.conn, self.handler_xml)
- self.__do_cimpost(self.conn, self.subscription_xml)
-
- def unsubscribe(self):
- self.__do_cimpost(self.conn, delete_sub_xml(self.name))
- self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Handler"))
- self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Filter"))
+ if cred:
+ (u, p) = cred
+ auth_hdr = base64.b64encode("%s:%s" % (u, p))
+ else:
+ auth_hdr = None
+
+ self.__do_cimpost(self.conn, self.filter_xml,
+ "CreateInstance", auth_hdr)
+ self.__do_cimpost(self.conn, self.handler_xml,
+ "CreateInstance", auth_hdr)
+ self.__do_cimpost(self.conn, self.subscription_xml,
+ "CreateInstance", auth_hdr)
+
+ def unsubscribe(self, cred=None):
+ if cred:
+ (u, p) = cred
+ auth_hdr = base64.b64encode("%s:%s" % (u, p))
+ else:
+ auth_hdr = None
+
+ xml = delete_sub_xml(self.name, self.sysname)
+ self.__do_cimpost(self.conn, xml,
+ "DeleteInstance", auth_hdr)
+ xml = delete_inst_xml(self.name, "Handler", self.sysname)
+ self.__do_cimpost(self.conn, xml,
+ "DeleteInstance", auth_hdr)
+ xml = delete_inst_xml(self.name, "Filter", self.sysname)
+ self.__do_cimpost(self.conn, xml,
+ "DeleteInstance", auth_hdr)
def dump_xml(name, typ, ns):
filter_str = filter_xml(name, typ, ns)
@@ -353,6 +386,10 @@ def main():
parser.add_option("-d", "--dump-xml", dest="dump", default=False,
action="store_true",
help="Dump the xml that would be used and quit.")
+ parser.add_option("-U", "--user", dest="username", default=None,
+ help="HTTP Auth username", dest="username")
+ parser.add_option("-P", "--pass", dest="password", default=None,
+ help="HTTP Auth password", dest="password")
(options, args) = parser.parse_args()
@@ -363,15 +400,25 @@ def main():
if options.dump:
dump_xml(options.name, args[0], options.ns)
sys.exit(0)
+
+ if options.username:
+ auth = (options.username, options.password)
+ else:
+ auth = None
- sub = CIMIndicationSubscription(options.name, args[0], options.ns)
- sub.subscribe(options.url)
+ if ":" in options.url:
+ (sysname, port) = options.url.split(":")
+ else:
+ sysname = url
+
+ sub = CIMIndicationSubscription(options.name, args[0], options.ns, sysname)
+ sub.subscribe(options.url, auth)
print "Watching for %s" % args[0]
try:
sub.server.serve_forever()
except KeyboardInterrupt,e:
- sub.unsubscribe()
+ sub.unsubscribe(auth)
print "Cancelling subscription for %s" % args[0]
if __name__=="__main__":
16 years, 7 months
[PATCH] Fix migration schema per Jim's comment (from months ago)
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1201630446 28800
# Node ID d620c3b248bce27b2180634b8f1fa8f6742198bd
# Parent f3cfa71adbdf5f4e6d92357a28acf41f1e901f69
Fix migration schema per Jim's comment (from months ago)
As a result, change the migratable checks to return a boolean
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r f3cfa71adbdf -r d620c3b248bc schema/VSMigrationService.mof
--- a/schema/VSMigrationService.mof Mon Jan 28 07:27:52 2008 -0800
+++ b/schema/VSMigrationService.mof Tue Jan 29 10:14:06 2008 -0800
@@ -3,34 +3,66 @@
// Placeholder definition until schema is available upstream
class CIM_VirtualSystemMigrationService : CIM_Service {
- uint32 VirtualSystemIsMigratableToHost(
- [Out]
- CIM_ConcreteJob REF Job,
- [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
- string NewResourceSettingData[],
+ uint32 CheckVirtualSystemIsMigratableToHost(
+ [In]
+ CIM_ComputerSystem REF ComputerSystem,
+ [In]
+ string DestinationHost,
[In, EmbeddedInstance("CIM_SettingData")]
string MigrationSettingData,
[In, EmbeddedInstance("CIM_VirtualSystemSettingData")]
string NewSystemSettingData,
+ [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
+ string NewResourceSettingData[],
+ [Out]
+ boolean IsMigratable
+ );
+
+ uint32 CheckVirtualSystemIsMigratableToSystem(
[In]
CIM_ComputerSystem REF ComputerSystem,
[In]
- string DestinationHost);
-
- uint32 MigrateVirtualSystemToHost(
- [Out]
- CIM_ConcreteJob REF Job,
- [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
- string NewResourceSettingData[],
+ CIM_System REF DestinationSystem,
[In, EmbeddedInstance("CIM_SettingData")]
string MigrationSettingData,
[In, EmbeddedInstance("CIM_VirtualSystemSettingData")]
string NewSystemSettingData,
+ [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
+ string NewResourceSettingData[],
+ [Out]
+ boolean IsMigratable
+ );
+
+
+ uint32 MigrateVirtualSystemToHost(
[In]
CIM_ComputerSystem REF ComputerSystem,
[In]
- string DestinationHost);
+ string DestinationHost,
+ [In, EmbeddedInstance("CIM_SettingData")]
+ string MigrationSettingData,
+ [In, EmbeddedInstance("CIM_VirtualSystemSettingData")]
+ string NewSystemSettingData,
+ [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
+ string NewResourceSettingData[],
+ [Out]
+ CIM_ConcreteJob REF Job
+ );
+ uint32 MigrateVirtualSystemToHost(
+ [In]
+ CIM_ComputerSystem REF ComputerSystem,
+ [In]
+ CIM_System REF DestinationSystem,
+ [In, EmbeddedInstance("CIM_SettingData")]
+ string MigrationSettingData,
+ [In, EmbeddedInstance("CIM_VirtualSystemSettingData")]
+ string NewSystemSettingData,
+ [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")]
+ string NewResourceSettingData[],
+ [Out]
+ CIM_ConcreteJob REF Job
+ );
};
class Virt_MigrationJob : CIM_ConcreteJob {
diff -r f3cfa71adbdf -r d620c3b248bc src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Mon Jan 28 07:27:52 2008 -0800
+++ b/src/Virt_VSMigrationService.c Tue Jan 29 10:14:06 2008 -0800
@@ -131,13 +131,15 @@ static CMPIStatus vs_migratable(const CM
static CMPIStatus vs_migratable(const CMPIObjectPath *ref,
const char *domain,
const char *destination,
- const CMPIResult *results)
+ const CMPIResult *results,
+ CMPIArgs *argsout)
{
CMPIStatus s;
char *uri = NULL;
virConnectPtr conn = NULL;
virConnectPtr dconn = NULL;
uint32_t retcode = 1;
+ CMPIBoolean isMigratable = 0;
uri = dest_uri(CLASSNAME(ref), destination);
if (uri == NULL) {
@@ -173,6 +175,10 @@ static CMPIStatus vs_migratable(const CM
out:
CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32);
+
+ isMigratable = (retcode == 0);
+ CMAddArg(argsout, "IsMigratable",
+ (CMPIValue *)&isMigratable, CMPI_boolean);
free(uri);
virConnectClose(conn);
@@ -212,7 +218,7 @@ static CMPIStatus vs_migratable_host(CMP
return s;
}
- return vs_migratable(ref, name, dhost, results);
+ return vs_migratable(ref, name, dhost, results, argsout);
}
static CMPIStatus vs_migratable_system(CMPIMethodMI *self,
@@ -255,7 +261,7 @@ static CMPIStatus vs_migratable_system(C
return s;
}
- return vs_migratable(ref, name, dname, results);
+ return vs_migratable(ref, name, dname, results, argsout);
}
static void migrate_job_set_state(struct migration_job *job,
@@ -620,7 +626,7 @@ static CMPIStatus migrate_vs_system(CMPI
}
static struct method_handler vsimth = {
- .name = "VirtualSystemIsMigratableToHost",
+ .name = "CheckVirtualSystemIsMigratableToHost",
.handler = vs_migratable_host,
.args = {{"ComputerSystem", CMPI_ref},
{"DestinationHost", CMPI_string},
@@ -629,7 +635,7 @@ static struct method_handler vsimth = {
};
static struct method_handler vsimts = {
- .name = "VirtualSystemIsMigratableToSystem",
+ .name = "CheckVirtualSystemIsMigratableToSystem",
.handler = vs_migratable_system,
.args = {{"ComputerSystem", CMPI_ref},
{"DestinationSystem", CMPI_ref},
16 years, 7 months
[PATCH] [CU] Add --print-ind switch to indication_tester
by Jay Gagnon
# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1201633132 18000
# Node ID e8fc7748867b69799e119103684317b518315198
# Parent 2948ecbed2674aee61a994b06468c2ce9c763bb3
[CU] Add --print-ind switch to indication_tester
Sometimes just knowing you got the indication isn't informative enough, especially for early testing, so this patch adds an option to have the indication text printed out. Adding the flag to the server feels a bit wrong, but it is *far* cleaner than extending the appropriate __init__ functions, so I'm okay with it.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r 2948ecbed267 -r e8fc7748867b tools/indication_tester.py
--- a/tools/indication_tester.py Tue Jan 15 12:54:04 2008 +0100
+++ b/tools/indication_tester.py Tue Jan 29 13:58:52 2008 -0500
@@ -292,14 +292,17 @@ class CIMSocketHandler(BaseHTTPServer.Ba
indication = CIMIndication(data)
print "Got indication: %s" % indication
+ if self.server.print_ind:
+ print "%s\n\n" % data
class CIMIndicationSubscription:
- def __init__(self, name, typ, ns):
+ def __init__(self, name, typ, ns, print_ind):
self.name = name
self.type = typ
self.ns = ns
self.server = BaseHTTPServer.HTTPServer(('', 8000), CIMSocketHandler)
+ self.server.print_ind = print_ind
self.port = 8000
self.filter_xml = filter_xml(name, typ, ns)
@@ -353,6 +356,9 @@ def main():
parser.add_option("-d", "--dump-xml", dest="dump", default=False,
action="store_true",
help="Dump the xml that would be used and quit.")
+ parser.add_option("-p", "--print-ind", dest="print_ind", default=False,
+ action="store_true",
+ help="Print received indications to stdout.")
(options, args) = parser.parse_args()
@@ -364,7 +370,8 @@ def main():
dump_xml(options.name, args[0], options.ns)
sys.exit(0)
- sub = CIMIndicationSubscription(options.name, args[0], options.ns)
+ sub = CIMIndicationSubscription(options.name, args[0], options.ns,
+ options.print_ind)
sub.subscribe(options.url)
print "Watching for %s" % args[0]
16 years, 7 months
[PATCH] [RFC] Remove the embedded object parsing pieces from VirtualSystemManagmentService
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1201551627 28800
# Node ID dc93669fb2b0b6b83d32f349676389a320097c5c
# Parent 5362ddf2f1ce65ac965b64cbe40b7db026ee2ebc
[RFC] Remove the embedded object parsing pieces from VirtualSystemManagmentService.
This patch only removes the parsing from DefineSystem(). Also updates the DefineSystem() call to expect instances instead of strings as arguments.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 5362ddf2f1ce -r dc93669fb2b0 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Tue Jan 22 16:22:15 2008 -0500
+++ b/src/Virt_VirtualSystemManagementService.c Mon Jan 28 12:20:27 2008 -0800
@@ -89,37 +89,20 @@ static CMPIStatus define_system_parse_ar
static CMPIStatus define_system_parse_args(const CMPIArgs *argsin,
CMPIInstance **sys,
const char *ns,
- struct inst_list *res)
+ CMPIArray **res)
{
CMPIStatus s = {CMPI_RC_ERR_FAILED, NULL};
- const char *sys_str = NULL;
- CMPIArray *res_arr;
- int ret;
-
- if (cu_get_str_arg(argsin, "SystemSettings", &sys_str) != CMPI_RC_OK) {
+
+ if (cu_get_inst_arg(argsin, "SystemSettings", sys) != CMPI_RC_OK) {
CU_DEBUG("No SystemSettings string argument");
goto out;
}
- ret = cu_parse_embedded_instance(sys_str,
- _BROKER,
- ns,
- sys);
- if (ret) {
- CU_DEBUG("Unable to parse SystemSettings instance");
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "SystemSettings parse error");
- goto out;
- }
-
- if (cu_get_array_arg(argsin, "ResourceSettings", &res_arr) !=
+ if (cu_get_array_arg(argsin, "ResourceSettings", res) !=
CMPI_RC_OK) {
CU_DEBUG("Failed to get array arg");
goto out;
}
-
- ret = parse_str_inst_array(res_arr, ns, res);
CMSetStatus(&s, CMPI_RC_OK);
@@ -317,24 +300,34 @@ static int rasd_to_vdev(CMPIInstance *in
return 0;
}
-static int classify_resources(struct inst_list *all,
+static int classify_resources(CMPIArray *resources,
struct domain *domain)
{
int i;
uint16_t type;
+ int count;
domain->dev_disk_ct = domain->dev_net_ct = 0;
domain->dev_vcpu_ct = domain->dev_mem_ct = 0;
-
- domain->dev_disk = calloc(all->cur, sizeof(struct virt_device));
- domain->dev_vcpu = calloc(all->cur, sizeof(struct virt_device));
- domain->dev_mem = calloc(all->cur, sizeof(struct virt_device));
- domain->dev_net = calloc(all->cur, sizeof(struct virt_device));
-
- for (i = 0; i < all->cur; i++) {
+
+ count = CMGetArrayCount(resources, NULL);
+ if (count < 1)
+ return 0;
+
+ domain->dev_disk = calloc(count, sizeof(struct virt_device));
+ domain->dev_vcpu = calloc(count, sizeof(struct virt_device));
+ domain->dev_mem = calloc(count, sizeof(struct virt_device));
+ domain->dev_net = calloc(count, sizeof(struct virt_device));
+
+ for (i = 0; i < count; i++) {
CMPIObjectPath *op;
-
- op = CMGetObjectPath(all->list[i], NULL);
+ CMPIData item;
+
+ item = CMGetArrayElementAt(resources, i, NULL);
+ if (CMIsNullObject(item.value.inst))
+ return 0;
+
+ op = CMGetObjectPath(item.value.inst, NULL);
if (op == NULL)
return 0;
@@ -343,16 +336,16 @@ static int classify_resources(struct ins
return 0;
if (type == CIM_RASD_TYPE_PROC)
- rasd_to_vdev(all->list[i],
+ rasd_to_vdev(item.value.inst,
&domain->dev_vcpu[domain->dev_vcpu_ct++]);
else if (type == CIM_RASD_TYPE_MEM)
- rasd_to_vdev(all->list[i],
+ rasd_to_vdev(item.value.inst,
&domain->dev_mem[domain->dev_mem_ct++]);
else if (type == CIM_RASD_TYPE_DISK)
- rasd_to_vdev(all->list[i],
+ rasd_to_vdev(item.value.inst,
&domain->dev_disk[domain->dev_disk_ct++]);
else if (type == CIM_RASD_TYPE_NET)
- rasd_to_vdev(all->list[i],
+ rasd_to_vdev(item.value.inst,
&domain->dev_net[domain->dev_net_ct++]);
}
@@ -398,7 +391,7 @@ static CMPIInstance *connect_and_create(
}
static CMPIInstance *create_system(CMPIInstance *vssd,
- struct inst_list *resources,
+ CMPIArray *resources,
const CMPIObjectPath *ref,
CMPIStatus *s)
{
@@ -467,10 +460,8 @@ static CMPIStatus define_system(CMPIMeth
CMPIInstance *vssd;
CMPIInstance *sys;
CMPIObjectPath *sys_op;
- struct inst_list res;
+ CMPIArray *res;
CMPIStatus s;
-
- inst_list_init(&res);
CU_DEBUG("DefineSystem");
@@ -478,11 +469,9 @@ static CMPIStatus define_system(CMPIMeth
if (s.rc != CMPI_RC_OK)
goto out;
- sys = create_system(vssd, &res, reference, &s);
+ sys = create_system(vssd, res, reference, &s);
if (sys == NULL)
goto out;
-
- inst_list_free(&res);
CMAddArg(argsout, "ResultingSystem", &sys, CMPI_instance);
@@ -1141,8 +1130,8 @@ static struct method_handler DefineSyste
static struct method_handler DefineSystem = {
.name = "DefineSystem",
.handler = define_system,
- .args = {{"SystemSettings", CMPI_string},
- {"ResourceSettings", CMPI_stringA},
+ .args = {{"SystemSettings", CMPI_instance},
+ {"ResourceSettings", CMPI_instanceA},
{"ReferencedConfiguration", CMPI_string},
ARG_END
}
16 years, 7 months
[PATCH 0 of 2] #3 - HostSystem: validate client given object path
by Heidi Eckhart
- patch 1 checks if getInstance incoming ref is valid
- patch 2 updates validate_host_ref to use cmpiutil function to check input ref
diff to patch set 1:
- switched type of name_only from int to bool
diff to patch set 2:
- switched submitted name_only value to true/false (thanks Gareth :))
16 years, 7 months