You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Viktor M. <mih...@us...> - 2005-06-07 12:27:34
|
Update of /cvsroot/sblim/mofc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2509 Modified Files: backend_sfcb.c Log Message: Removed obsolete state checks. Index: backend_sfcb.c =================================================================== RCS file: /cvsroot/sblim/mofc/backend_sfcb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- backend_sfcb.c 7 Jun 2005 08:39:37 -0000 1.2 +++ backend_sfcb.c 7 Jun 2005 12:27:23 -0000 1.3 @@ -90,6 +90,9 @@ CMPIData arr_data; int i = 0; + data.type = make_cmpi_type(lextype,arrayspec); + data.value.uint64 = 0L; /* set to binary zeros */ + if ( vals == NULL ) { data.state = CMPI_nullValue; } else if (vals -> val_value == NULL) { @@ -99,104 +102,75 @@ data.state = CMPI_goodValue; } - - data.type = make_cmpi_type(lextype,arrayspec); - if (data.type & CMPI_ARRAY) { - /* process array entries */ - data.value.array = - CMNewArray(Broker,arrayspec,data.type&~CMPI_ARRAY,NULL); - while (vals && vals -> val_value) { - arr_data = make_cmpi_data(lextype,-1,vals); - CMSetArrayElementAt(data.value.array, i, &arr_data.value, data.type); - i++; - vals = vals -> val_next; - } - } else { - data.value.uint64 = 0L; /* set to binary zeros */ - switch (data.type & ~CMPI_ARRAY) { - case CMPI_uint8: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%hhu", &data.value.uint8 ); + if ( data.state == CMPI_goodValue ) { + if (data.type & CMPI_ARRAY) { + /* process array entries */ + data.value.array = + CMNewArray(Broker,arrayspec,data.type&~CMPI_ARRAY,NULL); + while (vals && vals -> val_value) { + arr_data = make_cmpi_data(lextype,-1,vals); + CMSetArrayElementAt(data.value.array, i, &arr_data.value, data.type); + i++; + vals = vals -> val_next; } - break; - case CMPI_sint8: - if ( data.state == CMPI_goodValue ) { + } else { + switch (data.type & ~CMPI_ARRAY) { + case CMPI_uint8: + sscanf(vals -> val_value, "%hhu", &data.value.uint8 ); + break; + case CMPI_sint8: sscanf(vals -> val_value, "%hhd", &data.value.sint8 ); - } - break; - case CMPI_uint16: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_uint16: sscanf(vals -> val_value, "%hu", &data.value.uint16 ); - } - break; - case CMPI_sint16: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_sint16: sscanf(vals -> val_value, "%hd", &data.value.sint16 ); - } - break; - case CMPI_uint32: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_uint32: sscanf(vals -> val_value, "%lu", &data.value.uint32 ); - } - break; - case CMPI_sint32: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_sint32: sscanf(vals -> val_value, "%ld", &data.value.sint32 ); - } - break; - case CMPI_uint64: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_uint64: sscanf(vals -> val_value, "%llu", &data.value.uint64); - } - break; - case CMPI_sint64: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_sint64: sscanf(vals -> val_value, "%lld", &data.value.uint64 ); - } - break; - case CMPI_real32: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_real32: sscanf(vals -> val_value, "%f", &data.value.real32 ); - } - break; - case CMPI_real64: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_real64: sscanf(vals -> val_value, "%lf", &data.value.real64 ); - } - break; - case CMPI_char16: - /* this one is suspect to produce garbage */ - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_char16: + /* this one is suspect to produce garbage */ sscanf(vals -> val_value, "%c", &data.value.uint8 ); - } - break; - case CMPI_string: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_string: data.value.string = CMNewString(Broker,vals -> val_value,NULL); - } - break; - case CMPI_boolean: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_boolean: if (strcasecmp("true",vals -> val_value) == 0) { data.value.boolean = 1; } else { data.value.boolean = 0; } - } - break; - case CMPI_dateTime: - if ( data.state == CMPI_goodValue ) { + break; + case CMPI_dateTime: data.value.dateTime = CMNewDateTimeFromChars(Broker,vals -> val_value,NULL); if (data.value.dateTime == NULL) { fprintf(stderr,"failed to build datetime from %s", vals -> val_value); + data.state = CMPI_nullValue; } + break; + default: + data.value.ref = CMNewObjectPath(Broker,NULL, + lextype.type_ref -> class_id,NULL); } - break; - default: - data.state = CMPI_goodValue; - data.value.ref = CMNewObjectPath(Broker,NULL, - lextype.type_ref -> class_id,NULL); } } return data; |
From: Viktor M. <mih...@us...> - 2005-06-07 09:06:04
|
Update of /cvsroot/sblim/mofc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25538 Modified Files: mofparse.c Log Message: Removed copyright blurb on -v. Index: mofparse.c =================================================================== RCS file: /cvsroot/sblim/mofc/mofparse.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mofparse.c 3 Mar 2005 09:08:48 -0000 1.1.1.1 +++ mofparse.c 7 Jun 2005 09:05:54 -0000 1.2 @@ -32,8 +32,6 @@ #endif -static char * copyright = "(C) Copyright IBM Corp. 2004"; - static int opt_verbose = 0; static int opt_version = 0; static int opt_help = 0; @@ -89,8 +87,7 @@ static void version() { - printf("MOF Compiler Version %s %s with %s\n",VERSION, - copyright,BACKEND_INFO); + printf("MOF Compiler Version %s with %s\n",VERSION,BACKEND_INFO); } static void help(const char * name) |
From: Viktor M. <mih...@us...> - 2005-06-07 08:39:47
|
Update of /cvsroot/sblim/mofc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11567 Modified Files: ChangeLog NEWS backend_sfcb.c configure.ac Log Message: Bugs fixed: 1216246 incorrect array value handling. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/mofc/NEWS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- NEWS 3 Mar 2005 09:08:47 -0000 1.1.1.1 +++ NEWS 7 Jun 2005 08:39:37 -0000 1.2 @@ -0,0 +1,5 @@ +Changes in 0.7.1 +================ + +Bugs fixed: +- 1216246: Array type value/qualifiers are always NULL Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/mofc/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 1 Apr 2005 10:48:14 -0000 1.3 +++ configure.ac 7 Jun 2005 08:39:37 -0000 1.4 @@ -1,6 +1,6 @@ # $Id$ -AC_INIT(MOF Compiler, 0.7.0, mih...@de...,mofc) +AC_INIT(MOF Compiler, 0.7.1, sbl...@li...,mofc) AC_CONFIG_SRCDIR([hash.c]) AC_CONFIG_HEADER([config.h]) Index: backend_sfcb.c =================================================================== RCS file: /cvsroot/sblim/mofc/backend_sfcb.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- backend_sfcb.c 3 Mar 2005 09:08:47 -0000 1.1.1.1 +++ backend_sfcb.c 7 Jun 2005 08:39:37 -0000 1.2 @@ -89,6 +89,16 @@ CMPIData data; CMPIData arr_data; int i = 0; + + if ( vals == NULL ) { + data.state = CMPI_nullValue; + } else if (vals -> val_value == NULL) { + fprintf (stderr,"*** fatal error in backend: NULL value recieved.\n"); + abort(); /* paranoia */ + }else { + data.state = CMPI_goodValue; + } + data.type = make_cmpi_type(lextype,arrayspec); if (data.type & CMPI_ARRAY) { @@ -101,104 +111,94 @@ i++; vals = vals -> val_next; } - } - - if ( vals == NULL ) { - data.state = CMPI_nullValue; - } else if (vals -> val_value == NULL) { - fprintf (stderr,"*** fatal error in backend: NULL value recieved.\n"); - abort(); /* paranoia */ - }else { - data.state = CMPI_goodValue; - } - - data.value.uint64 = 0L; /* set to binary zeros */ - switch (data.type & ~CMPI_ARRAY) { - case CMPI_uint8: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%hhu", &data.value.uint8 ); - } - break; - case CMPI_sint8: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%hhd", &data.value.sint8 ); - } - break; - case CMPI_uint16: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%hu", &data.value.uint16 ); - } - break; - case CMPI_sint16: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%hd", &data.value.sint16 ); - } - break; - case CMPI_uint32: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%lu", &data.value.uint32 ); - } - break; - case CMPI_sint32: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%ld", &data.value.sint32 ); - } - break; - case CMPI_uint64: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%llu", &data.value.uint64); - } - break; - case CMPI_sint64: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%lld", &data.value.uint64 ); - } - break; - case CMPI_real32: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%f", &data.value.real32 ); - } - break; - case CMPI_real64: - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%lf", &data.value.real64 ); - } - break; - case CMPI_char16: - /* this one is suspect to produce garbage */ - if ( data.state == CMPI_goodValue ) { - sscanf(vals -> val_value, "%c", &data.value.uint8 ); - } - break; - case CMPI_string: - if ( data.state == CMPI_goodValue ) { - data.value.string = CMNewString(Broker,vals -> val_value,NULL); - } - break; - case CMPI_boolean: - if ( data.state == CMPI_goodValue ) { - if (strcasecmp("true",vals -> val_value) == 0) { - data.value.boolean = 1; - } else { - data.value.boolean = 0; + } else { + data.value.uint64 = 0L; /* set to binary zeros */ + switch (data.type & ~CMPI_ARRAY) { + case CMPI_uint8: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%hhu", &data.value.uint8 ); } - } - break; - case CMPI_dateTime: - if ( data.state == CMPI_goodValue ) { - data.value.dateTime = - CMNewDateTimeFromChars(Broker,vals -> val_value,NULL); - if (data.value.dateTime == NULL) { - fprintf(stderr,"failed to build datetime from %s", vals -> val_value); + break; + case CMPI_sint8: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%hhd", &data.value.sint8 ); + } + break; + case CMPI_uint16: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%hu", &data.value.uint16 ); + } + break; + case CMPI_sint16: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%hd", &data.value.sint16 ); + } + break; + case CMPI_uint32: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%lu", &data.value.uint32 ); + } + break; + case CMPI_sint32: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%ld", &data.value.sint32 ); + } + break; + case CMPI_uint64: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%llu", &data.value.uint64); + } + break; + case CMPI_sint64: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%lld", &data.value.uint64 ); + } + break; + case CMPI_real32: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%f", &data.value.real32 ); + } + break; + case CMPI_real64: + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%lf", &data.value.real64 ); + } + break; + case CMPI_char16: + /* this one is suspect to produce garbage */ + if ( data.state == CMPI_goodValue ) { + sscanf(vals -> val_value, "%c", &data.value.uint8 ); + } + break; + case CMPI_string: + if ( data.state == CMPI_goodValue ) { + data.value.string = CMNewString(Broker,vals -> val_value,NULL); } + break; + case CMPI_boolean: + if ( data.state == CMPI_goodValue ) { + if (strcasecmp("true",vals -> val_value) == 0) { + data.value.boolean = 1; + } else { + data.value.boolean = 0; + } + } + break; + case CMPI_dateTime: + if ( data.state == CMPI_goodValue ) { + data.value.dateTime = + CMNewDateTimeFromChars(Broker,vals -> val_value,NULL); + if (data.value.dateTime == NULL) { + fprintf(stderr,"failed to build datetime from %s", vals -> val_value); + } + } + break; + default: + data.state = CMPI_goodValue; + data.value.ref = CMNewObjectPath(Broker,NULL, + lextype.type_ref -> class_id,NULL); } - break; - default: - data.state = CMPI_goodValue; - data.value.ref = CMNewObjectPath(Broker,NULL, - lextype.type_ref -> class_id,NULL); } - return data; } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/mofc/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ChangeLog 3 Mar 2005 09:08:47 -0000 1.1.1.1 +++ ChangeLog 7 Jun 2005 08:39:37 -0000 1.2 @@ -0,0 +1,5 @@ +2005-06-07 <mihajlov@localhost.localdomain> + + * backend_sfcb.c (make_cmpi_data): + Bug 1216246 fixed: incorrect handling of array values. + |
From: Gareth S B. <bes...@us...> - 2005-06-06 18:59:18
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14000 Modified Files: wbemcat Log Message: fix for http://sourceforge.net/tracker/index.php?func=detail&aid=1193589&group_id=128809&atid=712784 Index: wbemcat =================================================================== RCS file: /cvsroot/sblim/sfcb/wbemcat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- wbemcat 2 Jun 2005 17:23:53 -0000 1.4 +++ wbemcat 6 Jun 2005 18:59:06 -0000 1.5 @@ -35,7 +35,7 @@ print " -h, --host=HOSTNAME\tName of host running the CIMOM. Default=$host\n"; print " -p, --port=PORT\tPort that the CIMOM is listening on. Default=$port\n"; print " -?, --help\t\tDisplay this help and exit\n"; - die "\n"; + exit; } # Process command line options, if any |
From: Gareth S B. <bes...@us...> - 2005-06-06 18:09:53
|
Update of /cvsroot/sblim/cmpi-tests/cmpi-instancetest/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19766 Removed Files: xmltest.sh Log Message: xmltest script now installed by sfcb package --- xmltest.sh DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-06-06 17:55:18
|
Update of /cvsroot/sblim/cmpi-tests/cmpi-reef In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13144 Modified Files: README Log Message: corrected build commands Index: README =================================================================== RCS file: /cvsroot/sblim/cmpi-tests/cmpi-reef/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 6 Jun 2005 17:48:18 -0000 1.2 +++ README 6 Jun 2005 17:55:09 -0000 1.3 @@ -2,7 +2,6 @@ #============================================================================= # Author: Dr. Gareth S. Bestor, <bes...@us...> # Contributors: -# Last Updated: April 28, 2005 # Description: # README for SBLIM test CMPI reef provider #============================================================================= @@ -93,8 +92,10 @@ This SBLIM provider package follows the standard build procedure for building SBLIM packages. To perform a local build and install of this SBLIM provider package do the following: - cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/sblim -q co -P cmpi-tests/cmpi-reef - cd cmpi-tests/cmpi-reef + _PACKAGE=cmpi-tests/cmpi-reef + cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/sblim -q \ + co -P $_PACKAGE + cd $_PACKAGE ./autoconfiscate.sh ./configure make |
From: Gareth S B. <bes...@us...> - 2005-06-06 17:52:52
|
Update of /cvsroot/sblim/cmpi-tests/cmpi-processindicationtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12008 Modified Files: README Log Message: corrected build commands Index: README =================================================================== RCS file: /cvsroot/sblim/cmpi-tests/cmpi-processindicationtest/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- README 26 May 2005 19:17:25 -0000 1.1.1.1 +++ README 6 Jun 2005 17:52:39 -0000 1.2 @@ -59,12 +59,13 @@ This SBLIM provider package follows the standard build procedure for building SBLIM packages. To perform a local build and install of this SBLIM provider package do the following: + _PACKAGE=cmpi-tests/cmpi-processindicationtest cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/sblim -q \ - co -P sblim-cmpi-processindicationtest - cd cmpi-processindicationtest + co -P $_PACKAGE + cd $_PACKAGE ./autoconfiscate.sh ./configure - ./make + make The generated configure script tries to determine where the CMPI header files are located. For this purpose it searches a set of well-known locations. @@ -99,3 +100,11 @@ su -c 'make install && make postinstall' +----------------------------------------------------------------------------- +Testing SBLIM Provider +----------------------------------------------------------------------------- +This provider contains automated tests located in the ./test/ subdirectory. +After building and installing this provider you can run the tests by: + + su -c 'make runtest' + |
From: Gareth S B. <bes...@us...> - 2005-06-06 17:48:38
|
Update of /cvsroot/sblim/cmpi-tests/cmpi-reef In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10034 Modified Files: README Log Message: corrected build commands Index: README =================================================================== RCS file: /cvsroot/sblim/cmpi-tests/cmpi-reef/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- README 10 May 2005 00:01:34 -0000 1.1.1.1 +++ README 6 Jun 2005 17:48:18 -0000 1.2 @@ -43,7 +43,6 @@ sint32 creationDate string codeLevel - ----------------------------------------------------------------------------- File Description ----------------------------------------------------------------------------- @@ -70,7 +69,6 @@ README.RPM Instructions for how to build SBLIM provider RPMs README.DEBUG Instructions for how to debug SBLIM providers - ----------------------------------------------------------------------------- Prerequisites ----------------------------------------------------------------------------- @@ -84,7 +82,6 @@ - Linux or similar environment (supporting the file system operations) - A CIM Server supporting CMPI providers. - ----------------------------------------------------------------------------- Building SBLIM Provider ----------------------------------------------------------------------------- @@ -96,11 +93,11 @@ This SBLIM provider package follows the standard build procedure for building SBLIM packages. To perform a local build and install of this SBLIM provider package do the following: - cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/sblim -q co -P sblim-cmpi-reef - cd cmpi-reef + cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/sblim -q co -P cmpi-tests/cmpi-reef + cd cmpi-tests/cmpi-reef ./autoconfiscate.sh ./configure - ./make + make The generated configure script tries to determine where the CMPI header files are located. For this purpose it searches a set of well-known locations. @@ -127,7 +124,6 @@ can also build and install an RPM package. See README.RPM for instructions on how to build and install RPMs for SBLIM packages. - ----------------------------------------------------------------------------- Installing SBLIM Provider ----------------------------------------------------------------------------- @@ -136,7 +132,6 @@ su -c 'make install && make postinstall' - ----------------------------------------------------------------------------- Running SBLIM Provider Tests ----------------------------------------------------------------------------- |
From: Gareth S B. <bes...@us...> - 2005-06-06 17:14:54
|
Update of /cvsroot/sblim/cmpi-tests/cmpi-processindicationtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25942 Modified Files: Makefile.am Log Message: fixes for http://sourceforge.net/tracker/index.php?func=detail&aid=1214004&group_id=128809&atid=712784 Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-tests/cmpi-processindicationtest/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Makefile.am 25 May 2005 20:10:50 -0000 1.1.1.1 +++ Makefile.am 6 Jun 2005 17:14:44 -0000 1.2 @@ -79,7 +79,49 @@ sh provider-register.sh -d -t @CIMSERVER@ -r $(REGS) -m $(MOFS) # Add the schema files to the distribution file list -pkgdata_DATA=$(MOFS) $(REGISTRATIONS) +pkgdata_DATA=$(MOFS) $(REGS) pkgdata_SCRIPTS=provider-register.sh EXTRA_DIST+=schema $(pkgdata_DATA) $(pkgdata_SCRIPTS) +# ----------------------------------------------------------------------------- +# Automake instructions for tests +# ----------------------------------------------------------------------------- + +# LIST ALL THE TEST XML CLIENT REQUEST FILES HERE +TESTXML=test/Test001.DeleteFilter01.xml \ + test/Test002.DeleteHandler01.xml \ + test/Test003.DeleteSubscription01.xml \ + test/Test004.CreateSubscription01.xml \ + test/Test005.CreateFilter01.xml \ + test/Test006.CreateSubscription01.xml \ + test/Test007.CreateHandler01.xml \ + test/Test008.CreateSubscription01.xml \ + test/Test009.DeleteFilter01.xml \ + test/Test010.DeleteHandler01.xml \ + test/Test011.DeleteSubscription01.xml \ + test/Test012.DeleteFilter01.xml \ + test/Test013.DeleteHandler01.xml + +# LIST ALL THE TEST EXPECTED RESPONSE OK FILES HERE +TESTOK=test/Test001.DeleteFilter01.OK \ + test/Test002.DeleteHandler01.OK \ + test/Test003.DeleteSubscription01.OK \ + test/Test004.CreateSubscription01.OK \ + test/Test005.CreateFilter01.OK \ + test/Test006.CreateSubscription01.OK \ + test/Test007.CreateHandler01.OK \ + test/Test008.CreateSubscription01.OK \ + test/Test009.DeleteFilter01.OK \ + test/Test010.DeleteHandler01.OK \ + test/Test011.DeleteSubscription01.OK \ + test/Test012.DeleteFilter01.OK \ + test/Test013.DeleteHandler01.OK + +# Install the XML tests under the package's data directory +testxmldir=$(datadir)/$(PACKAGE)/xmltest +testxml_DATA=$(TESTXML) $(TESTOK) +testxml_SCRIPTS= + +# Run all the package XML tests in order +runtest: + xmltest $(datadir)/$(PACKAGE)/xmltest |
From: Viktor M. <mih...@us...> - 2005-06-06 16:05:38
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27953 Modified Files: Makefile.am configure.ac control.c sfcBroker.c Log Message: Added configuration flags and conditional compilation support for the JDBC adapter. Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- control.c 3 Jun 2005 10:31:57 -0000 1.7 +++ control.c 6 Jun 2005 16:05:23 -0000 1.8 @@ -27,6 +27,10 @@ #include <ctype.h> #include <string.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef SFCB_CONFDIR #define SFCB_CONFDIR "/etc/sfcb" @@ -48,14 +52,19 @@ Control init[] = { {"httpPort", 1, "5988"}, - {"dbpPort", 1, "5980"}, {"enableHttp", 2, "true"}, {"httpProcs", 1, "8"}, - {"dbpProcs", 1, "8"}, {"httpsPort", 1, "5989"}, - {"httpsPort", 1, "5981"}, {"enableHttps", 2, "false"}, {"httpsProcs", 1, "8"}, +#ifdef HAVE_JDBC + {"dbpPort", 1, "5980"}, + {"enableDbp", 2, "true"}, + {"dbpProcs", 1, "8"}, + {"dbpsPort", 1, "5981"}, + {"enableDbps", 2, "true"}, + {"dbpsProcs", 1, "8"}, +#endif {"provProcs", 1, "32"}, {"basicAuthLib", 0, "sfcBasicAuthentication"}, {"doBasicAuth", 2, "false"}, Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- sfcBroker.c 3 Jun 2005 10:31:57 -0000 1.12 +++ sfcBroker.c 6 Jun 2005 16:05:23 -0000 1.13 @@ -40,6 +40,10 @@ #include "sfcVersion.h" #include "control.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + extern void setExFlag(unsigned long f); extern char *parseTarget(const char *target); extern UtilStringBuffer *instanceToString(CMPIInstance * ci, char **props); @@ -59,6 +63,11 @@ extern unsigned long exFlags; int startHttp = 0; + +#ifdef HAVE_JDBC +int startDbp = 1; +#endif + char *name; extern int collectStat; @@ -306,6 +315,7 @@ return 0; } +#ifdef HAVE_JDBC extern int dbpDaemon(int argc, char *argv[], int sslMode, int sfcbPid); int startDbpd(int argc, char *argv[], int sslMode) @@ -330,7 +340,7 @@ return 0; } - +#endif int main(int argc, char *argv[]) { @@ -461,14 +471,15 @@ startHttpd(argc, argv,0); } - //Start dbProtocol-Daemon - if (startHttp) { +#ifdef HAVE_JDBC + //Start dbProtocol-Daemon + if (startDbp) { if (sslMode) startDbpd(argc, argv,1); if (!sslOMode) startDbpd(argc, argv,0); } - +#endif setSignal(SIGSEGV, handleSigSegv,SA_ONESHOT); setSignal(SIGCHLD, handleSigChld,0); Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- configure.ac 3 Jun 2005 10:31:57 -0000 1.11 +++ configure.ac 6 Jun 2005 16:05:23 -0000 1.12 @@ -35,10 +35,25 @@ [AC_HELP_STRING([--enable-ssl], [include ssl support for SFCB.])]) -if test "$enable_debug" != "no"; then +AC_ARG_ENABLE(jdbc, + [AC_HELP_STRING([--enable-jdbc], + [include server-side JDBC support for SFCB - EXPERIMENTAL.])]) + +AC_ARG_ENABLE(indications, + [AC_HELP_STRING([--disable-indications], + [disable indication support for SFCB - currently not working.])], + [enable_indications=$enableval], + [enable_indications="yes"] + ) + +if test "$enable_debug" == "yes"; then CPPFLAGS="-D SFCB_DEBUG $CPPFLAGS" fi +if test "$enable_jdbc" == "yes"; then + AC_DEFINE(HAVE_JDBC,,[JDBC support enabled.]) +fi + AC_CANONICAL_HOST case $host_os in openedition*) SFCB_CMPI_PLATFORM="-D CMPI_PLATFORM_LINUX_GENERIC_GNU" @@ -79,6 +94,9 @@ # Checks for libraries. AC_CHECK_LIB(pthread,main) AC_CHECK_LIB(dl,main) +if test "$enable_indications" = "yes"; then + AC_CHECK_LIB(curl,main) +fi if test "$enable_ssl" = "yes"; then AC_CHECK_LIB(ssl,main) @@ -133,5 +151,16 @@ AC_SUBST(MOFC_DIR) fi +AM_CONDITIONAL(JDBC,[test "$enable_jdbc" == "yes"]) + AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcb.cfg.pre getSchema.sh.pre sfcb.init-redhat sfcb.init-suse sfcb.init-none]) AC_OUTPUT + +echo ====================================================== +echo sfcb configuration complete +echo configuration features: +echo -e "debug"\\t"${enable_debug:-no}" +echo -e "indications"\\t"yes (cannot be disabled currently)" +echo -e "ssl"\\t"${enable_ssl:-no}" +echo -e "jdbc"\\t"${enable_jdbc:-no}" +echo ====================================================== Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile.am 6 Jun 2005 11:12:59 -0000 1.24 +++ Makefile.am 6 Jun 2005 16:05:23 -0000 1.25 @@ -48,6 +48,7 @@ sbin_PROGRAMS = \ sfcbd +if JDBC libsfcBrokerCore_la_SOURCES = \ args.c \ array.c \ @@ -92,14 +93,58 @@ sqlParser.y \ sqlStatement.c \ avltree.c + +else +libsfcBrokerCore_la_SOURCES = \ + args.c \ + array.c \ + brokerEnc.c \ + brokerUpc.c \ + brokerOs.c \ + context.c \ + datetime.c \ + enumeration.c \ + instance.c \ + objectpath.c \ + result.c \ + selectexp.c \ + selectcond.c \ + subcond.c \ + predicate.c \ + string.c \ + value.c \ + support.c \ + providerRegister.c \ + objectImpl.c \ + constClass.c \ + hashtable.c \ + genericlist.c \ + utilHashtable.c \ + utilStringBuffer.c \ + utilFactory.c \ + msgqueue.c \ + providerMgr.c \ + providerDrv.c \ + trace.c \ + control.c \ + queryParser.y \ + queryLexer.l \ + queryOperation.c \ + queryStatement.c \ + cimXmlGen.c \ + mrwlock.c \ + mlog.c +endif libsfcBrokerCore_la_CFLAGS = @SFCB_CMPI_OS@ @SFCB_CMPI_PLATFORM@ +if JDBC sqlLexer.c: sqlLexer.l sqlParser.y lex -t sqlLexer.l | sed -e "s/yy/sfcSql/g" > sqlLexer.c sqlParser.c: sqlLexer.l sqlParser.y bison -p sfcSql -d -o sqlParser.c sqlParser.y +endif queryLexer.c: queryLexer.l queryParser.y lex -t queryLexer.l | sed -e "s/yy/sfcQuery/g" > queryLexer.c |
From: Adrian S. <a3s...@us...> - 2005-06-06 15:28:37
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9233 Modified Files: cimXmlResp.c cimXmlResp.h cimXmlResp.y client.c test.c Log Message: Fixed serious coding error in cimXmlResp.y (adding entries to enumerations) Added className support in cimXmlResp.y Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- client.c 6 Jun 2005 13:19:49 -0000 1.6 +++ client.c 6 Jun 2005 15:28:28 -0000 1.7 @@ -1052,7 +1052,7 @@ CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); return NULL; } -// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); Index: test.c =================================================================== RCS file: /cvsroot/sblim/sfcc/test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test.c 5 Jun 2005 21:06:56 -0000 1.2 +++ test.c 6 Jun 2005 15:28:28 -0000 1.3 @@ -10,8 +10,19 @@ CMPIStatus rc; cc=cmciConnect("localhost",NULL,NULL,NULL,NULL); + cop=newCMPIObjectPath("root/cimv2",NULL,NULL); + + enm=cc->ft->enumClassNames(cc,cop,0,&rc); + printf("--- enumClassNames rc: %d - %s\n",rc.rc, rc.msg ? (char*)rc.msg->hdl : NULL); + while (enm->ft->hasNext(enm,NULL)) { + CMPIData d=enm->ft->getNext(enm,NULL); + CMPIString *cn=d.value.ref->ft->getClassName(d.value.ref,NULL); + printf(" -- className: %s\n",(char*)cn->hdl); + CMRelease(cn); + } + cop=newCMPIObjectPath("root/cimv2","Linux_ComputerSystem",NULL); - CMAddKey(cop,"CreationClassName","Linux_ComputerSystem",CMPI_chars); + CMAddKey(cop,"CreationClassName","Linux_ComputerSystem",CMPI_chars); enm=cc->ft->enumInstanceNames(cc,cop,&rc); printf("--- enumInstanceNames rc: %d - %s\n",rc.rc, rc.msg ? (char*)rc.msg->hdl : NULL); Index: cimXmlResp.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cimXmlResp.h 4 May 2005 18:20:08 -0000 1.1 +++ cimXmlResp.h 6 Jun 2005 15:28:28 -0000 1.2 @@ -182,7 +182,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 116 "cimXmlResp.y" +#line 121 "cimXmlResp.y" typedef union YYSTYPE { int intValue; char boolValue; Index: cimXmlResp.y =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.y,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cimXmlResp.y 4 May 2005 18:20:08 -0000 1.1 +++ cimXmlResp.y 6 Jun 2005 15:28:28 -0000 1.2 @@ -92,6 +92,11 @@ printf("parh: %s\n",(char*)path->hdl); } +static void createClassPath(CMPIObjectPath **op, char *ns, char *cn) +{ + *op = newCMPIObjectPath(NULL, cn, NULL); +} + static void setError(void *parm, XtokErrorResp *e) { int err=atoi(e->code); @@ -355,10 +360,10 @@ : XTOK_IRETVALUE instanceNames ZTOK_IRETVALUE { } - | /* XTOK_IRETVALUE classNames ZTOK_IRETVALUE + | XTOK_IRETVALUE classNames ZTOK_IRETVALUE { } - | XTOK_IRETVALUE values ZTOK_IRETVALUE + | /* XTOK_IRETVALUE values ZTOK_IRETVALUE { } | XTOK_IRETVALUE valueObjectsWithPath ZTOK_IRETVALUE @@ -381,10 +386,10 @@ } | XTOK_IRETVALUE valueRef ZTOK_IRETVALUE { - } + } */ | XTOK_IRETVALUE classes ZTOK_IRETVALUE { - } */ + } | XTOK_IRETVALUE instances ZTOK_IRETVALUE { } /* @@ -408,13 +413,13 @@ | instance { setInstNsAndCn(PARM->curInstance,$1.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curInstance,CMPI_instance); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); PARM->curInstance=NULL; } | instances instance { setInstNsAndCn(PARM->curInstance,$2.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curInstance,CMPI_instance); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); PARM->curInstance=NULL; } ; @@ -423,13 +428,13 @@ : /* empty */ | instanceName { - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curPath,CMPI_ref); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } | instanceNames instanceName { setInstNsAndCn(PARM->curInstance,$2.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curPath,CMPI_ref); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } ; @@ -600,9 +605,25 @@ } ; +classNames + : /* empty */ + | className + { + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); + PARM->curPath=NULL; + } + | classNames className + { + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); + PARM->curPath=NULL; + } +; + className : XTOK_CLASSNAME ZTOK_CLASSNAME { + createClassPath(&PARM->curPath, NULL, $$); + printf("className.y: %s %p\n",$$,PARM->curPath); } ; Index: cimXmlResp.c =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cimXmlResp.c 4 May 2005 18:20:08 -0000 1.1 +++ cimXmlResp.c 6 Jun 2005 15:28:27 -0000 1.2 @@ -210,7 +210,7 @@ /* - * cimXmlOps.y + * cimXmlResp.y * * (C) Copyright IBM Corp. 2005 * @@ -225,7 +225,7 @@ * * Description: * - * CIM XML grammar for sfcb. + * CIM XML grammar for sfcc. * */ @@ -301,6 +301,11 @@ printf("parh: %s\n",(char*)path->hdl); } +static void createClassPath(CMPIObjectPath **op, char *ns, char *cn) +{ + *op = newCMPIObjectPath(NULL, cn, NULL); +} + static void setError(void *parm, XtokErrorResp *e) { int err=atoi(e->code); @@ -325,7 +330,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 116 "cimXmlResp.y" +#line 121 "cimXmlResp.y" typedef union YYSTYPE { int intValue; char boolValue; @@ -367,7 +372,7 @@ XtokParam xtokParam; } YYSTYPE; /* Line 191 of yacc.c. */ -#line 370 "cimXmlResp.c" +#line 375 "cimXmlResp.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -379,7 +384,7 @@ /* Line 214 of yacc.c. */ -#line 382 "cimXmlResp.c" +#line 387 "cimXmlResp.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -478,16 +483,16 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 85 +#define YYLAST 108 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 26 +#define YYNNTS 34 /* YYNRULES -- Number of rules. */ -#define YYNRULES 48 +#define YYNRULES 68 /* YYNRULES -- Number of states. */ -#define YYNSTATES 95 +#define YYNSTATES 119 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -541,10 +546,12 @@ static const unsigned char yyprhs[] = { 0, 0, 3, 7, 11, 15, 19, 23, 27, 30, - 33, 37, 38, 42, 43, 45, 48, 49, 51, 54, - 58, 59, 62, 65, 69, 72, 78, 81, 84, 86, - 88, 91, 93, 96, 100, 104, 108, 114, 118, 121, - 125, 130, 133, 138, 141, 145, 147, 150, 155 + 33, 37, 41, 42, 46, 50, 51, 53, 56, 57, + 59, 62, 63, 65, 68, 72, 73, 76, 79, 82, + 86, 87, 90, 95, 96, 99, 103, 104, 107, 110, + 114, 117, 123, 126, 129, 131, 133, 136, 138, 141, + 145, 149, 150, 152, 155, 158, 162, 168, 172, 175, + 179, 184, 187, 192, 195, 199, 201, 204, 209 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -553,29 +560,37 @@ 77, 0, -1, 3, 4, 78, -1, 5, 79, 6, -1, 7, 80, 8, -1, 9, 81, 10, -1, 11, 82, 12, -1, 11, 83, 12, -1, 11, 12, -1, - 15, 16, -1, 17, 85, 18, -1, -1, 17, 84, - 18, -1, -1, 86, -1, 84, 86, -1, -1, 99, - -1, 85, 99, -1, 66, 87, 67, -1, -1, 87, - 93, -1, 87, 88, -1, 48, 89, 49, -1, 48, - 49, -1, 50, 32, 91, 33, 51, -1, 50, 51, - -1, 89, 93, -1, 90, -1, 92, -1, 30, 31, - -1, 90, -1, 91, 90, -1, 34, 98, 35, -1, - 34, 99, 35, -1, 46, 90, 47, -1, 46, 32, - 91, 33, 47, -1, 23, 95, 24, -1, 25, 26, - -1, 95, 25, 26, -1, 21, 97, 94, 22, -1, - 28, 29, -1, 70, 96, 99, 71, -1, 38, 39, - -1, 38, 100, 39, -1, 101, -1, 100, 101, -1, - 40, 42, 43, 41, -1, 40, 92, 41, -1 + 15, 16, -1, 17, 86, 18, -1, 17, 99, 18, + -1, -1, 17, 84, 18, -1, 17, 85, 18, -1, + -1, 87, -1, 84, 87, -1, -1, 92, -1, 85, + 92, -1, -1, 107, -1, 86, 107, -1, 64, 88, + 65, -1, -1, 88, 101, -1, 88, 94, -1, 88, + 89, -1, 62, 90, 63, -1, -1, 90, 101, -1, + 90, 54, 91, 55, -1, -1, 91, 101, -1, 66, + 93, 67, -1, -1, 93, 101, -1, 93, 94, -1, + 48, 95, 49, -1, 48, 49, -1, 50, 32, 97, + 33, 51, -1, 50, 51, -1, 95, 101, -1, 96, + -1, 98, -1, 30, 31, -1, 96, -1, 97, 96, + -1, 34, 106, 35, -1, 34, 107, 35, -1, -1, + 100, -1, 99, 100, -1, 36, 37, -1, 46, 96, + 47, -1, 46, 32, 97, 33, 47, -1, 23, 103, + 24, -1, 25, 26, -1, 103, 25, 26, -1, 21, + 105, 102, 22, -1, 28, 29, -1, 70, 104, 107, + 71, -1, 38, 39, -1, 38, 108, 39, -1, 109, + -1, 108, 109, -1, 40, 42, 43, 41, -1, 40, + 98, 41, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short yyrline[] = { - 0, 309, 309, 315, 321, 330, 336, 339, 342, 348, - 355, 358, 388, 406, 408, 414, 422, 424, 429, 500, - 506, 507, 510, 522, 526, 530, 534, 541, 544, 548, - 561, 568, 575, 583, 588, 614, 618, 632, 639, 643, - 656, 664, 670, 713, 720, 729, 739, 750, 756 + 0, 314, 314, 320, 326, 335, 341, 344, 347, 353, + 360, 363, 366, 390, 393, 401, 403, 406, 411, 413, + 419, 427, 429, 434, 460, 466, 467, 470, 472, 477, + 483, 484, 487, 493, 494, 505, 511, 512, 515, 527, + 531, 535, 539, 546, 549, 553, 566, 573, 580, 588, + 593, 608, 610, 615, 623, 635, 639, 653, 660, 664, + 677, 685, 691, 734, 741, 750, 760, 771, 777 }; #endif @@ -607,11 +622,12 @@ "XTOK_INSTANCEPATH", "ZTOK_INSTANCEPATH", "XTOK_LOCALINSTANCEPATH", "ZTOK_LOCALINSTANCEPATH", "XTOK_LOCALCLASSPATH", "ZTOK_LOCALCLASSPATH", "$accept", "start", "cimOperation", "message", "simpleResp", - "iMethodResp", "errorResp", "iReturnValue", "instances", - "instanceNames", "instance", "instanceData", "property", "propertyData", - "value", "valueArray", "valueReference", "qualifier", - "localNameSpacePath", "namespaces", "nameSpacePath", "host", - "instancePath", "instanceName", "keyBindings", "keyBinding", 0 + "iMethodResp", "errorResp", "iReturnValue", "classes", "instances", + "instanceNames", "class", "classData", "method", "methodData", + "parameter", "instance", "instanceData", "property", "propertyData", + "value", "valueArray", "valueReference", "classNames", "className", + "qualifier", "localNameSpacePath", "namespaces", "nameSpacePath", + "host", "instancePath", "instanceName", "keyBindings", "keyBinding", 0 }; #endif @@ -635,19 +651,23 @@ static const unsigned char yyr1[] = { 0, 76, 77, 78, 79, 80, 81, 81, 81, 82, - 83, 83, 83, 84, 84, 84, 85, 85, 85, 86, - 87, 87, 87, 88, 88, 88, 88, 89, 89, 89, - 90, 91, 91, 92, 92, 93, 93, 94, 95, 95, - 96, 97, 98, 99, 99, 100, 100, 101, 101 + 83, 83, 83, 83, 83, 84, 84, 84, 85, 85, + 85, 86, 86, 86, 87, 88, 88, 88, 88, 89, + 90, 90, 90, 91, 91, 92, 93, 93, 93, 94, + 94, 94, 94, 95, 95, 95, 96, 97, 97, 98, + 98, 99, 99, 99, 100, 101, 101, 102, 103, 103, + 104, 105, 106, 107, 107, 108, 108, 109, 109 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 3, 3, 3, 3, 3, 3, 2, 2, - 3, 0, 3, 0, 1, 2, 0, 1, 2, 3, - 0, 2, 2, 3, 2, 5, 2, 2, 1, 1, - 2, 1, 2, 3, 3, 3, 5, 3, 2, 3, + 3, 3, 0, 3, 3, 0, 1, 2, 0, 1, + 2, 0, 1, 2, 3, 0, 2, 2, 2, 3, + 0, 2, 4, 0, 2, 3, 0, 2, 2, 3, + 2, 5, 2, 2, 1, 1, 2, 1, 2, 3, + 3, 0, 1, 2, 2, 3, 5, 3, 2, 3, 4, 2, 4, 2, 3, 1, 2, 4, 3 }; @@ -657,48 +677,54 @@ static const unsigned char yydefact[] = { 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, - 0, 3, 0, 0, 4, 8, 0, 13, 0, 0, - 5, 9, 0, 20, 0, 0, 14, 17, 6, 7, - 43, 0, 0, 45, 0, 12, 15, 10, 18, 0, - 0, 0, 44, 46, 0, 0, 0, 19, 22, 21, - 0, 0, 0, 0, 48, 0, 0, 0, 24, 0, - 28, 29, 0, 26, 0, 0, 33, 34, 47, 30, - 31, 0, 35, 23, 27, 0, 0, 0, 0, 0, - 32, 0, 41, 0, 0, 42, 36, 25, 0, 0, - 40, 38, 37, 0, 39 + 0, 3, 0, 0, 4, 8, 0, 15, 0, 0, + 5, 9, 0, 0, 25, 36, 0, 0, 0, 16, + 19, 0, 52, 22, 6, 7, 54, 63, 0, 0, + 65, 0, 0, 13, 17, 14, 20, 10, 23, 11, + 53, 0, 0, 0, 64, 66, 0, 0, 0, 30, + 24, 28, 27, 26, 35, 38, 37, 0, 0, 0, + 0, 68, 0, 0, 0, 40, 0, 44, 45, 0, + 42, 0, 0, 0, 49, 50, 67, 46, 47, 0, + 55, 39, 43, 0, 33, 29, 31, 0, 0, 0, + 0, 48, 0, 0, 61, 0, 0, 62, 56, 41, + 32, 34, 0, 0, 60, 58, 57, 0, 59 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yysigned_char yydefgoto[] = { - -1, 2, 6, 8, 10, 13, 18, 19, 24, 25, - 26, 34, 48, 59, 70, 71, 41, 49, 84, 89, - 65, 77, 51, 27, 32, 33 + -1, 2, 6, 8, 10, 13, 18, 19, 26, 27, + 28, 29, 41, 61, 81, 103, 30, 42, 62, 76, + 88, 89, 53, 31, 32, 63, 106, 113, 83, 98, + 68, 33, 39, 40 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -41 +#define YYPACT_NINF -53 static const yysigned_char yypact[] = { - 14, 22, 38, 35, -41, 39, -41, 40, 41, 42, - 43, -41, 1, 44, -41, -41, 34, -30, 45, 46, - -41, -41, -7, -41, -18, -15, -41, -41, -41, -41, - -41, -22, 3, -41, -39, -41, -41, -41, -41, -36, - 9, 15, -41, -41, 7, -20, -26, -41, -41, -41, - 47, 24, 25, 21, -41, 30, 33, 8, -41, -27, - -41, -41, 33, -41, 36, 27, -41, -41, -41, -41, - -41, -9, -41, -41, -41, -3, 37, 48, -4, 23, - -41, 18, -41, 49, 50, -41, -41, -41, 51, 20, - -41, -41, -41, 52, -41 + 16, 49, 54, 53, -53, 57, -53, 59, 63, 60, + 62, -53, 40, 64, -53, -53, 56, -24, 61, 65, + -53, -53, 38, -18, -53, -53, -15, -16, -8, -53, + -53, -10, -53, -53, -53, -53, -53, -53, -11, 7, + -53, -33, -39, -53, -53, -53, -53, -53, -53, -53, + -53, -32, 35, 39, -53, -53, 33, -14, -7, -53, + -53, -53, -53, -53, -53, -53, -53, 55, 44, 46, + 41, -53, 52, 58, 37, -53, -13, -53, -53, 58, + -53, -3, 66, 47, -53, -53, -53, -53, -53, 15, + -53, -53, -53, 29, -53, -53, -53, 67, 68, 18, + 43, -53, 36, -28, -53, 70, 71, -53, -53, -53, + -53, -53, 72, 42, -53, -53, -53, 73, -53 }; /* YYPGOTO[NTERM-NUM]. */ static const yysigned_char yypgoto[] = { - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - 55, -41, -41, -41, -40, 11, 31, 16, -41, -41, - -41, -41, -41, -24, -41, 53 + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, 74, -53, -53, -53, -53, 75, -53, 50, -53, + -52, 22, 48, -53, 76, -42, -53, -53, -53, -53, + -53, -27, -53, 69 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -708,28 +734,32 @@ #define YYTABLE_NINF -1 static const unsigned char yytable[] = { - 35, 38, 22, 37, 57, 60, 62, 44, 22, 45, - 55, 46, 39, 15, 39, 52, 16, 1, 17, 44, - 40, 55, 73, 22, 79, 63, 3, 55, 47, 58, - 81, 80, 30, 31, 50, 80, 23, 55, 4, 56, - 5, 78, 42, 31, 92, 93, 7, 11, 23, 9, - 21, 14, 53, 12, 20, 72, 54, 28, 29, 66, - 67, 69, 68, 55, 76, 22, 82, 85, 64, 87, - 86, 83, 90, 75, 88, 74, 61, 91, 94, 36, - 0, 0, 0, 0, 0, 43 + 66, 48, 45, 43, 74, 77, 23, 56, 49, 57, + 47, 58, 22, 56, 23, 57, 72, 58, 56, 1, + 51, 37, 38, 51, 69, 79, 22, 110, 64, 59, + 23, 52, 60, 56, 92, 75, 91, 101, 67, 96, + 24, 101, 25, 56, 80, 72, 54, 38, 100, 24, + 25, 94, 15, 3, 4, 16, 99, 17, 5, 72, + 95, 111, 102, 72, 7, 73, 116, 117, 9, 11, + 14, 12, 21, 34, 20, 36, 82, 35, 70, 84, + 71, 85, 86, 87, 90, 23, 0, 109, 72, 107, + 108, 105, 65, 114, 97, 112, 104, 0, 115, 118, + 44, 93, 46, 0, 0, 78, 0, 50, 55 }; static const yysigned_char yycheck[] = { - 18, 25, 38, 18, 44, 45, 32, 46, 38, 48, - 30, 50, 34, 12, 34, 39, 15, 3, 17, 46, - 42, 30, 49, 38, 33, 51, 4, 30, 67, 49, - 33, 71, 39, 40, 70, 75, 66, 30, 0, 32, - 5, 65, 39, 40, 24, 25, 7, 6, 66, 9, - 16, 8, 43, 11, 10, 47, 41, 12, 12, 35, - 35, 31, 41, 30, 28, 38, 29, 71, 21, 51, - 47, 23, 22, 62, 25, 59, 45, 26, 26, 24, - -1, -1, -1, -1, -1, 32 + 42, 28, 18, 18, 56, 57, 38, 46, 18, 48, + 18, 50, 36, 46, 38, 48, 30, 50, 46, 3, + 34, 39, 40, 34, 51, 32, 36, 55, 67, 62, + 38, 42, 65, 46, 76, 49, 49, 89, 70, 81, + 64, 93, 66, 46, 51, 30, 39, 40, 33, 64, + 66, 54, 12, 4, 0, 15, 83, 17, 5, 30, + 63, 103, 33, 30, 7, 32, 24, 25, 9, 6, + 8, 11, 16, 12, 10, 37, 21, 12, 43, 35, + 41, 35, 41, 31, 47, 38, -1, 51, 30, 71, + 47, 23, 42, 22, 28, 25, 29, -1, 26, 26, + 26, 79, 27, -1, -1, 57, -1, 31, 39 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -738,14 +768,16 @@ { 0, 3, 77, 4, 0, 5, 78, 7, 79, 9, 80, 6, 11, 81, 8, 12, 15, 17, 82, 83, - 10, 16, 38, 66, 84, 85, 86, 99, 12, 12, - 39, 40, 100, 101, 87, 18, 86, 18, 99, 34, - 42, 92, 39, 101, 46, 48, 50, 67, 88, 93, - 70, 98, 99, 43, 41, 30, 32, 90, 49, 89, - 90, 92, 32, 51, 21, 96, 35, 35, 41, 31, - 90, 91, 47, 49, 93, 91, 28, 97, 99, 33, - 90, 33, 29, 23, 94, 71, 47, 51, 25, 95, - 22, 26, 24, 25, 26 + 10, 16, 36, 38, 64, 66, 84, 85, 86, 87, + 92, 99, 100, 107, 12, 12, 37, 39, 40, 108, + 109, 88, 93, 18, 87, 18, 92, 18, 107, 18, + 100, 34, 42, 98, 39, 109, 46, 48, 50, 62, + 65, 89, 94, 101, 67, 94, 101, 70, 106, 107, + 43, 41, 30, 32, 96, 49, 95, 96, 98, 32, + 51, 90, 21, 104, 35, 35, 41, 31, 96, 97, + 47, 49, 101, 97, 54, 63, 101, 28, 105, 107, + 33, 96, 33, 91, 29, 23, 102, 71, 47, 51, + 55, 101, 25, 103, 22, 26, 24, 25, 26 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -1356,182 +1388,269 @@ switch (yyn) { case 2: -#line 310 "cimXmlResp.y" +#line 315 "cimXmlResp.y" { } break; case 3: -#line 316 "cimXmlResp.y" +#line 321 "cimXmlResp.y" { } break; case 4: -#line 322 "cimXmlResp.y" +#line 327 "cimXmlResp.y" { } break; case 5: -#line 331 "cimXmlResp.y" +#line 336 "cimXmlResp.y" { } break; case 6: -#line 337 "cimXmlResp.y" +#line 342 "cimXmlResp.y" { } break; case 7: -#line 340 "cimXmlResp.y" +#line 345 "cimXmlResp.y" { } break; case 8: -#line 343 "cimXmlResp.y" +#line 348 "cimXmlResp.y" { } break; case 9: -#line 349 "cimXmlResp.y" +#line 354 "cimXmlResp.y" { setError(parm,&yyval.xtokErrorResp); } break; case 10: -#line 356 "cimXmlResp.y" +#line 361 "cimXmlResp.y" { } break; - case 12: -#line 389 "cimXmlResp.y" + case 11: +#line 364 "cimXmlResp.y" + { + } + break; + + case 13: +#line 391 "cimXmlResp.y" { } break; case 14: -#line 409 "cimXmlResp.y" +#line 394 "cimXmlResp.y" + { + } + break; + + case 16: +#line 404 "cimXmlResp.y" + { + } + break; + + case 17: +#line 407 "cimXmlResp.y" + { + } + break; + + case 19: +#line 414 "cimXmlResp.y" { setInstNsAndCn(PARM->curInstance,yyvsp[0].xtokInstance.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curInstance,CMPI_instance); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); PARM->curInstance=NULL; } break; - case 15: -#line 415 "cimXmlResp.y" + case 20: +#line 420 "cimXmlResp.y" { setInstNsAndCn(PARM->curInstance,yyvsp[0].xtokInstance.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curInstance,CMPI_instance); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); PARM->curInstance=NULL; } break; - case 17: -#line 425 "cimXmlResp.y" + case 22: +#line 430 "cimXmlResp.y" { - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curPath,CMPI_ref); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } break; - case 18: -#line 430 "cimXmlResp.y" + case 23: +#line 435 "cimXmlResp.y" { setInstNsAndCn(PARM->curInstance,yyvsp[0].xtokInstanceName.className,PARM->nameSpace); - simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)PARM->curPath,CMPI_ref); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } break; - case 19: -#line 501 "cimXmlResp.y" + case 24: +#line 461 "cimXmlResp.y" { } break; - case 20: -#line 506 "cimXmlResp.y" + case 25: +#line 466 "cimXmlResp.y" {;} break; - case 21: -#line 508 "cimXmlResp.y" + case 26: +#line 468 "cimXmlResp.y" { } break; - case 22: + case 27: +#line 470 "cimXmlResp.y" + { + } + break; + + case 28: +#line 472 "cimXmlResp.y" + { + } + break; + + case 29: +#line 478 "cimXmlResp.y" + { + } + break; + + case 30: +#line 483 "cimXmlResp.y" + {;} + break; + + case 31: +#line 485 "cimXmlResp.y" + { + } + break; + + case 32: +#line 488 "cimXmlResp.y" + { + } + break; + + case 33: +#line 493 "cimXmlResp.y" + {;} + break; + + case 34: +#line 495 "cimXmlResp.y" + { + } + break; + + case 35: +#line 506 "cimXmlResp.y" + { + } + break; + + case 36: #line 511 "cimXmlResp.y" + {;} + break; + + case 37: +#line 513 "cimXmlResp.y" + { + } + break; + + case 38: +#line 516 "cimXmlResp.y" { addInstProperty(&(PARM->curInstance),&yyvsp[0].xtokProperty); } break; - case 23: -#line 523 "cimXmlResp.y" + case 39: +#line 528 "cimXmlResp.y" { yyval.xtokProperty.val=yyvsp[-1].xtokPropertyData; } break; - case 24: -#line 527 "cimXmlResp.y" + case 40: +#line 532 "cimXmlResp.y" { yyval.xtokProperty.val.null=1; } break; - case 25: -#line 531 "cimXmlResp.y" + case 41: +#line 536 "cimXmlResp.y" { yyval.xtokProperty.val.array=yyvsp[-3].xtokValueArray; } break; - case 26: -#line 535 "cimXmlResp.y" + case 42: +#line 540 "cimXmlResp.y" { yyval.xtokProperty.val.null=1; } break; - case 27: -#line 542 "cimXmlResp.y" + case 43: +#line 547 "cimXmlResp.y" { } break; - case 28: -#line 545 "cimXmlResp.y" + case 44: +#line 550 "cimXmlResp.y" { yyval.xtokPropertyData.value=yyvsp[0].xtokValue.value; } break; - case 29: -#line 549 "cimXmlResp.y" + case 45: +#line 554 "cimXmlResp.y" { yyval.xtokPropertyData.ref=yyvsp[0].xtokValueReference; } break; - case 30: -#line 562 "cimXmlResp.y" + case 46: +#line 567 "cimXmlResp.y" { yyval.xtokValue.value=yyvsp[-1].xtokValue.value; } break; - case 31: -#line 569 "cimXmlResp.y" + case 47: +#line 574 "cimXmlResp.y" { yyval.xtokValueArray.next=1; yyval.xtokValueArray.max=64; @@ -1540,60 +1659,84 @@ } break; - case 32: -#line 576 "cimXmlResp.y" + case 48: +#line 581 "cimXmlResp.y" { yyval.xtokValueArray.values[yyval.xtokValueArray.next]=yyvsp[0].xtokValue.value; yyval.xtokValueArray.next++; } break; - case 33: -#line 584 "cimXmlResp.y" + case 49: +#line 589 "cimXmlResp.y" { yyval.xtokValueReference.instancePath=yyvsp[-1].xtokInstancePath; yyval.xtokValueReference.type=typeValRef_InstancePath; } break; - case 34: -#line 589 "cimXmlResp.y" + case 50: +#line 594 "cimXmlResp.y" { yyval.xtokValueReference.instanceName=yyvsp[-1].xtokInstanceName; yyval.xtokValueReference.type=typeValRef_InstanceName; } break; - case 35: -#line 615 "cimXmlResp.y" + case 52: +#line 611 "cimXmlResp.y" + { + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); + PARM->curPath=NULL; + } + break; + + case 53: +#line 616 "cimXmlResp.y" + { + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); + PARM->curPath=NULL; + } + break; + + case 54: +#line 624 "cimXmlResp.y" + { + createClassPath(&PARM->curPath, NULL, yyval.className); + printf("className.y: %s %p\n",yyval.className,PARM->curPath); + } + break; + + case 55: +#line 636 "cimXmlResp.y" { yyval.xtokQualifier.value=yyvsp[-1].xtokValue.value; } break; - case 36: -#line 619 "cimXmlResp.y" + case 56: +#line 640 "cimXmlResp.y" { // $$.value=$2.value; } break; - case 37: -#line 633 "cimXmlResp.y" + case 57: +#line 654 "cimXmlResp.y" { yyval.xtokLocalNameSpacePath=yyvsp[-1].xtokNameSpace.cns; } break; - case 38: -#line 640 "cimXmlResp.y" + case 58: +#line 661 "cimXmlResp.y" { yyval.xtokNameSpace.cns=strdup(yyvsp[-1].xtokNameSpace.ns); } break; - case 39: -#line 644 "cimXmlResp.y" + case 59: +#line 665 "cimXmlResp.y" { int l=strlen(yyvsp[-2].xtokNameSpace.cns)+strlen(yyvsp[-1].xtokNameSpace.ns)+2; yyval.xtokNameSpace.cns=(char*)malloc(l); @@ -1604,22 +1747,22 @@ } break; - case 40: -#line 657 "cimXmlResp.y" + case 60: +#line 678 "cimXmlResp.y" { yyval.xtokNameSpacePath.host=yyvsp[-2].xtokHost; yyval.xtokNameSpacePath.nameSpacePath=yyvsp[-1].xtokLocalNameSpacePath; } break; - case 41: -#line 665 "cimXmlResp.y" + case 61: +#line 686 "cimXmlResp.y" { } break; - case 42: -#line 671 "cimXmlResp.y" + case 62: +#line 692 "cimXmlResp.y" { yyval.xtokInstancePath.path=yyvsp[-2].xtokNameSpacePath; yyval.xtokInstancePath.instanceName=yyvsp[-1].xtokInstanceName; @@ -1627,8 +1770,8 @@ } break; - case 43: -#line 714 "cimXmlResp.y" + case 63: +#line 735 "cimXmlResp.y" { yyval.xtokInstanceName.className=yyvsp[-1].xtokInstanceName.className; yyval.xtokInstanceName.bindings.next=0; @@ -1637,8 +1780,8 @@ } break; - case 44: -#line 721 "cimXmlResp.y" + case 64: +#line 742 "cimXmlResp.y" { yyval.xtokInstanceName.className=yyvsp[-2].xtokInstanceName.className; yyval.xtokInstanceName.bindings=yyvsp[-1].xtokKeyBindings; @@ -1646,8 +1789,8 @@ } break; - case 45: -#line 730 "cimXmlResp.y" + case 65: +#line 751 "cimXmlResp.y" { yyval.xtokKeyBindings.next=1; yyval.xtokKeyBindings.max=16; @@ -1659,8 +1802,8 @@ } break; - case 46: -#line 740 "cimXmlResp.y" + case 66: +#line 761 "cimXmlResp.y" { yyval.xtokKeyBindings.keyBindings[yyval.xtokKeyBindings.next].name=yyvsp[0].xtokKeyBinding.name; yyval.xtokKeyBindings.keyBindings[yyval.xtokKeyBindings.next].value=yyvsp[0].xtokKeyBinding.value; @@ -1670,8 +1813,8 @@ } break; - case 47: -#line 751 "cimXmlResp.y" + case 67: +#line 772 "cimXmlResp.y" { yyval.xtokKeyBinding.name=yyvsp[-3].xtokKeyBinding.name; yyval.xtokKeyBinding.value=yyvsp[-2].xtokKeyValue.value; @@ -1679,8 +1822,8 @@ } break; - case 48: -#line 757 "cimXmlResp.y" + case 68: +#line 778 "cimXmlResp.y" { yyval.xtokKeyBinding.name=yyvsp[-2].xtokKeyBinding.name; yyval.xtokKeyBinding.value=NULL; @@ -1693,7 +1836,7 @@ } /* Line 999 of yacc.c. */ -#line 1696 "cimXmlResp.c" +#line 1839 "cimXmlResp.c" yyvsp -= yylen; yyssp -= yylen; @@ -1887,6 +2030,6 @@ } -#line 765 "cimXmlResp.y" +#line 786 "cimXmlResp.y" |
From: Benjamin B. <bg...@us...> - 2005-06-06 14:17:55
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1136/Plugin/com/ibm/ecute/rsa/core/internal/dialogs Modified Files: EditQualifiersDialog.java Log Message: 2.1 beta 1c full support of the OCL qualifier for a class as a class constraint Index: EditQualifiersDialog.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs/EditQualifiersDialog.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- EditQualifiersDialog.java 2 Jun 2005 16:21:28 -0000 1.6 +++ EditQualifiersDialog.java 6 Jun 2005 14:17:44 -0000 1.7 @@ -1105,6 +1105,13 @@ addQualiferToValueTable(qualifierName, "true", definedIn, qualifierObject, -1, false); allAvailableQualifers.remove(qualifierObject); } + qualifierName = "OCL"; + String oclValue = existsOCL((Class)element); + if(oclValue != null){ + Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); + addQualiferToValueTable(qualifierName, oclValue, definedIn, qualifierObject, -1, false); + allAvailableQualifers.remove(qualifierObject); + } } //Qualifiers with Parameter Scope @@ -3159,11 +3166,11 @@ } } - /* + // OCL if(qualifierName.equalsIgnoreCase("OCL")){ if (element instanceof Class){ - List elementList = ((Class)element).getPackage().getOwnedElements(); + List elementList = ((Class)element).getNearestPackage().getOwnedElements(); ArrayList constraintList = new ArrayList(); for (int i = 0; i < elementList.size(); i++){ if (elementList.get(i) instanceof Constraint) @@ -3181,19 +3188,38 @@ foundConstraint = true; if(newValue.equalsIgnoreCase("null")){ - elementList.remove(constraint); - //constraint.destroy(); - //diagramHelper.destroyView((View)constraint); + + //constraint.setSpecification(null); + constrainedElements.remove(0); + + ArrayList tempList = new ArrayList(elementList.size()-1); + for(int m = 0; m < elementList.size(); m++){ + + if(!(elementList.get(m) instanceof Constraint)){ + tempList.add(elementList.get(m)); + } else { + Constraint constr = (Constraint)elementList.get(m); + if(!constr.getName().equalsIgnoreCase(constraint.getName())){ + tempList.add(constr); + } + } + } + elementList = tempList; + constraint.destroy(); + break; } String tempBody, body = ""; // prepare constraint body content if(newValue.startsWith("{")){ + newValue = newValue.substring(1); + } + if(newValue.endsWith("}")){ int length = newValue.length(); - tempBody = newValue.substring(2, length - 2); - } else { - tempBody = newValue; + newValue = newValue.substring(0, length -1); } + tempBody = newValue.trim(); + int index = tempBody.indexOf(","); boolean multiple = false; if (index != -1) @@ -3211,10 +3237,8 @@ if (!multiple) body = tempBody; - //set constraint body and language + //set constraint body ((OpaqueExpression)constraint.getSpecification()).setBody(body); - - } } } @@ -3225,7 +3249,7 @@ createClassOCL((Class)element, newValue); } } - }*/ + } } private Class getSelectedClass(String name, Package package_, boolean otherPackages) { @@ -3643,34 +3667,6 @@ // create specification constraint.createSpecification(UML2Package.eINSTANCE.getOpaqueExpression()); setOCLBody(constraint, value); -// String tempBody, body = ""; -// // prepare constraint body content -// if(value.startsWith("{")){ -// int length = value.length(); -// tempBody = value.substring(2, length - 2); -// } else { -// tempBody = value; -// } -// int index = tempBody.indexOf(","); -// boolean multiple = false; -// if (index != -1) -// multiple = true; -// while (index != -1){ -// int length = tempBody.length(); -// body = body.concat(tempBody.substring(0, index - 1)); -// body = body.concat("\n"); -// tempBody = tempBody.substring(index + 2); -// index = tempBody.indexOf(","); -// } -// if (multiple){ -// body = body.concat(tempBody.substring(index + 1)); -// } -// if (!multiple) -// body = tempBody; -// -// //set constraint body and language -// ((OpaqueExpression)constraint.getSpecification()).setBody(body); -// ((OpaqueExpression)constraint.getSpecification()).setLanguage("OCL"); // get the connection line between the constraint and the class constraint.getConstrainedElements().add(lastClass); @@ -3691,6 +3687,37 @@ } } + private String existsOCL(Class class_ ){ + + String value = null; + + Package thisPackage = class_.getNearestPackage(); + EList ownedMembersList = thisPackage.getOwnedMembers(); + for(int i = 0; i < ownedMembersList.size(); i++){ + + if(ownedMembersList.get(i) instanceof Constraint){ + + Constraint thisConstraint = (Constraint)ownedMembersList.get(i); + EList constrainedElements = thisConstraint.getConstrainedElements(); + for(int j = 0; j < constrainedElements.size(); j++){ + + if(constrainedElements.get(j) instanceof Class){ + + Class thisClass = (Class)constrainedElements.get(j); + if(thisClass.equals(class_)){ + value = "{"+((OpaqueExpression)thisConstraint.getSpecification()).getBody()+"}"; + i = ownedMembersList.size(); + break; + } + } + } + } + } + + // return the cantent of the constraint + return value; + } + private void setOCLBody(Constraint constraint, String value){ String tempBody, body = ""; |
From: Benjamin B. <bg...@us...> - 2005-06-06 14:17:55
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1136/Plugin/com/ibm/ecute/plugins/output/funcionality Modified Files: RSAModelCreator.java Log Message: 2.1 beta 1c full support of the OCL qualifier for a class as a class constraint Index: RSAModelCreator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/RSAModelCreator.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- RSAModelCreator.java 31 May 2005 13:12:46 -0000 1.12 +++ RSAModelCreator.java 6 Jun 2005 14:17:43 -0000 1.13 @@ -586,78 +586,6 @@ if(name.equalsIgnoreCase("Composition")&& !value.equalsIgnoreCase("false")){ lastClassComposition = true; } - - // create OCL class constraint - if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ - Package package_ = lastCategory; - Constraint constraint = (Constraint)package_.createOwnedMember(UML2Package.eINSTANCE.getConstraint()); - constraint.setName("OCL " + lastClass.getName()); - - // create specification - constraint.createSpecification(UML2Package.eINSTANCE.getOpaqueExpression()); - // set OCL body - setOCLBody(constraint, value); -// String tempBody, body = ""; -// // prepare constraint body content -// if(value.startsWith("{")){ -// int length = value.length(); -// tempBody = value.substring(2, length - 2); -// } else { -// tempBody = value; -// } -// int index = tempBody.indexOf(","); -// boolean multiple = false; -// if (index != -1) -// multiple = true; -// while (index != -1){ -// int length = tempBody.length(); -// body = body.concat(tempBody.substring(0, index - 1)); -// body = body.concat("\n"); -// tempBody = tempBody.substring(index + 2); -// index = tempBody.indexOf(","); -// } -// if (multiple){ -// body = body.concat(tempBody.substring(index + 1)); -// } -// if (!multiple) -// body = tempBody; -// -// //set constraint body and language -// ((OpaqueExpression)constraint.getSpecification()).setBody(body); -// ((OpaqueExpression)constraint.getSpecification()).setLanguage("OCL"); - - // get the connection line between the constraint and the class - constraint.getConstrainedElements().add(lastClass); - - // add constraint to diagram - ArrayList list = new ArrayList(); - list.add(constraint); - List diagrams = diagramHelper.getDiagrams(package_, UMLDiagramKind.CLASS_LITERAL); - Iterator it = diagrams.iterator(); - Diagram thisDiagram = null; - while(it.hasNext()){ - Diagram diagram = (Diagram)it.next(); - if(diagram.getName().equalsIgnoreCase("Main")) - thisDiagram = diagram; - } - if (thisDiagram != null){ - diagramHelper.createViews(thisDiagram, list); - } - } - } - - if(type == TMETHOD){ - - // create pre/post conditions of a method - // not implemented yet - if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ - System.out.println("class: " + lastClass.getName()); - System.out.println("name: " + name + " value: "+ value); - - // lastMethod.getPreconditions().add(); - // lastMethod.getPostconditions().add(); - } - } // because of the different role order in RSA theElement is @@ -832,7 +760,48 @@ int stereotypePropertyIndex = ((List) theElement.getValue(cimStereotype, "QualifierName")).size(); theElement.setValue(cimStereotype, "QualifierName["+stereotypePropertyIndex+"]", name); theElement.setValue(cimStereotype, "QualifierValue["+stereotypePropertyIndex+"]", value); - + + } else if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ + if(theElement instanceof Class){ + // create OCL class constraint + Package package_ = lastCategory; + Constraint constraint = (Constraint)package_.createOwnedMember(UML2Package.eINSTANCE.getConstraint()); + constraint.setName("OCL " + lastClass.getName()); + + // create specification + constraint.createSpecification(UML2Package.eINSTANCE.getOpaqueExpression()); + // set OCL body + setOCLBody(constraint, value); + + // get the connection line between the constraint and the class + constraint.getConstrainedElements().add(lastClass); + + // add constraint to diagram + ArrayList list = new ArrayList(); + list.add(constraint); + List diagrams = diagramHelper.getDiagrams(package_, UMLDiagramKind.CLASS_LITERAL); + Iterator it = diagrams.iterator(); + Diagram thisDiagram = null; + while(it.hasNext()){ + Diagram diagram = (Diagram)it.next(); + if(diagram.getName().equalsIgnoreCase("Main")) + thisDiagram = diagram; + } + if (thisDiagram != null){ + diagramHelper.createViews(thisDiagram, list); + } + } else if(theElement instanceof Operation){ + // create pre/post conditions of a method + // TODO not implemented yet + if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ + System.out.println("class: " + lastClass.getName()); + System.out.println("name: " + name + " value: "+ value); + + // lastMethod.getPreconditions().add(); + // lastMethod.getPostconditions().add(); + } + } + }else{ if (value.length() == 0) |
From: Benjamin B. <bg...@us...> - 2005-06-06 14:17:55
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1136/Plugin/com/ibm/ecute/rsa/core/internal/properties Modified Files: QualifiersPropertySection.java Log Message: 2.1 beta 1c full support of the OCL qualifier for a class as a class constraint Index: QualifiersPropertySection.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/QualifiersPropertySection.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- QualifiersPropertySection.java 31 May 2005 13:12:47 -0000 1.16 +++ QualifiersPropertySection.java 6 Jun 2005 14:17:44 -0000 1.17 @@ -397,6 +397,13 @@ addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); allAvailableQualifers.remove(qualifierObject); } + qualifierName = "OCL"; + String oclValue = existsOCL((Class)element); + if(oclValue != null){ + Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); + addQualiferToTable(qualifierName, oclValue, definedIn, qualifierObject, -1, false); + allAvailableQualifers.remove(qualifierObject); + } } //Qualifiers with Parameter Scope @@ -923,6 +930,37 @@ return thisModel; } + private String existsOCL(Class class_ ){ + + String value = null; + + Package thisPackage = class_.getNearestPackage(); + EList ownedMembersList = thisPackage.getOwnedMembers(); + for(int i = 0; i < ownedMembersList.size(); i++){ + + if(ownedMembersList.get(i) instanceof Constraint){ + + Constraint thisConstraint = (Constraint)ownedMembersList.get(i); + EList constrainedElements = thisConstraint.getConstrainedElements(); + for(int j = 0; j < constrainedElements.size(); j++){ + + if(constrainedElements.get(j) instanceof Class){ + + Class thisClass = (Class)constrainedElements.get(j); + if(thisClass.equals(class_)){ + value = "{"+((OpaqueExpression)thisConstraint.getSpecification()).getBody()+"}"; + i = ownedMembersList.size(); + break; + } + } + } + } + } + + // return the cantent of the constraint + return value; + } + private boolean existsQualifierListConstraint(){ Model model = getModel(); |
From: Adrian S. <a3s...@us...> - 2005-06-06 13:19:59
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4616 Modified Files: client.c cmci.h Log Message: Added getClass, enumClassNames and enumClasses support - not tested yet Index: cmci.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmci.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cmci.h 6 Jun 2005 12:20:08 -0000 1.4 +++ cmci.h 6 Jun 2005 13:19:49 -0000 1.5 @@ -98,16 +98,13 @@ @param op ObjectPath containing namespace and classname components. @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, CMPI_FLAG_DeepInheritance, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. - @param properties If not NULL, the members of the array define one or more Property - names. Each returned Object MUST NOT include elements for any Properties - missing from this list @param rc Output: Service return status (suppressed when NULL). @return Enumeration of Instances. */ CMPIEnumeration* (*enumClasses) (CMCIClient* cl, - CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); + CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc); /** Get Instance using <op> as reference. Instance structure can be controled using the <flags> parameter. Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- client.c 6 Jun 2005 12:20:08 -0000 1.5 +++ client.c 6 Jun 2005 13:19:49 -0000 1.6 @@ -307,10 +307,11 @@ static inline void addXmlClassnameParam(UtilStringBuffer *sb, CMPIObjectPath *cop) { - sb->ft->append3Chars(sb, - "<IPARAMVALUE NAME=\"ClassName\"><CLASSNAME NAME=\"", - (char*)cop->ft->getClassName(cop, NULL), - "\"/></IPARAMVALUE>\n"); + CMPIString *cn=cop->ft->getClassName(cop, NULL); + if (cn && cn->hdl && *((char*)cn->hdl)) + sb->ft->append3Chars(sb, + "<IPARAMVALUE NAME=\"ClassName\"><CLASSNAME NAME=\"", + (char*)cn->hdl,"\"/></IPARAMVALUE>\n"); } static void addXmlPropertyListParam(UtilStringBuffer *sb, char** properties) @@ -575,7 +576,7 @@ return NULL; } - if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_ref) { + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_instance) { CMPIEnumeration *enm = newCMPIEnumeration(rh.rvArray,NULL); CMSetStatus(rc, CMPI_RC_OK); return enm; @@ -966,23 +967,159 @@ } -static CMPIConstClass* getClass (CMCIClient* cl, - CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +static CMPIConstClass* getClass (CMCIClient* mb, + CMPIObjectPath* cop, CMPIFlags flags, char** properties, CMPIStatus* rc) { - CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); - return NULL; + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + char *error; + + addXmlClassnameParam(sb, cop); + con->ft->genRequest(cl,"GetClass",cop,0,0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"GetClass\">"); + + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + emitlocal(sb,flags & CMPI_FLAG_LocalOnly); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + + addXmlPropertyListParam(sb, properties); + + addXmlClassnameParam(sb, cop); + + pathToXml(sb, cop); + + sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error=con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_class) { + CMSetStatus(rc,CMPI_RC_OK); + return (CMPIConstClass*)(rh.rvArray->ft->getElementAt(rh.rvArray, 0, NULL).value.inst); + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; } -static CMPIEnumeration* enumClassNames (CMCIClient* cl, - CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc) +static CMPIEnumeration* enumClassNames (CMCIClient* mb, + CMPIObjectPath* cop, CMPIFlags flags, CMPIStatus* rc) { - CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); - return NULL; + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + char *error; + + con->ft->genRequest(cl,"EnumerateClassNames",cop,0,0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"EnumerateClassNames\">"); + + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + emitdeep(sb,flags & CMPI_FLAG_DeepInheritance); + + addXmlClassnameParam(sb, cop); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_ref) { + CMPIEnumeration *enm = newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc,CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; } -static CMPIEnumeration* enumClasses (CMCIClient* cl, - CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +static CMPIEnumeration* enumClasses (CMCIClient* mb, + CMPIObjectPath* cop, CMPIFlags flags, CMPIStatus* rc) { + ClientEnc *cl = (ClientEnc *)mb; + CMCIConnection *con = cl->connection; + UtilStringBuffer *sb = newStringBuffer(2048); + char *error; + ResponseHdr rh; + + con->ft->genRequest(cl, "EnumerateClasses", cop, 0, 0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb, "<IMETHODCALL NAME=\"EnumerateClasses\">"); + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + addXmlClassnameParam(sb, cop); + + emitdeep(sb,flags & CMPI_FLAG_DeepInheritance); + emitlocal(sb,flags & CMPI_FLAG_LocalOnly); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + + addXmlClassnameParam(sb, cop); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con, cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); + + if (rh.errCode != 0) { + CMSetStatusWithChars(rc, rh.errCode, rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_class) { + CMPIEnumeration *enm = newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc, CMPI_RC_OK); + return enm; + } + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); return NULL; } |
From: Adrian S. <a3s...@us...> - 2005-06-06 12:20:18
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1594 Modified Files: client.c cmci.h Log Message: added getClass enumClassNames and enumClasses to cmci.h and client.c with dummy support rearanged enumInstanceNames Index: cmci.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmci.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cmci.h 5 Jun 2005 21:06:56 -0000 1.3 +++ cmci.h 6 Jun 2005 12:20:08 -0000 1.4 @@ -56,21 +56,61 @@ struct _ClientEnc; typedef struct _ClientEnc ClientEnc; + +struct _CMPIConstClass; +typedef struct _CMPIConstClass CMPIConstClass; typedef struct _CMCIClientFT { - /** Enumerate Instance Names of the class (and subclasses) defined by <op>. + /** Get Class using <op> as reference. Class structure can be + controled using the flags parameter. @param cl Client this pointer. @param op ObjectPath containing namespace and classname components. + @param flags Any combination of the following flags are supported: + CMPI_FLAG_LocalOnly, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. + @param properties If not NULL, the members of the array define one or more Property + names. Each returned Object MUST NOT include elements for any Properties + missing from this list + @param rc Output: Service return status (suppressed when NULL). + @return The Class. + */ + CMPIConstClass* (*getClass) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); + + + /** Enumerate Class Names (and subclass names) in the namespace defined by <op>. Inheritance scope can be controled using the + flags parameter. + @param cl Client this pointer. + @param op ObjectPath containing namespace component. + @param flags The following flag is supported: CMPI_FLAG_DeepInheritance. @param rc Output: Service return status (suppressed when NULL). @return Enumeration of ObjectPathes. */ - CMPIEnumeration* (*enumInstanceNames) + + CMPIEnumeration* (*enumClassNames) (CMCIClient* cl, - CMPIObjectPath* op, CMPIStatus* rc); + CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc); + + /** Enumerate Classes (and subclasses) in the namespace defined by <op>. + Class structure and inheritance scope can be controled using the <flags> parameter. + @param cl Client this pointer. + @param op ObjectPath containing namespace and classname components. + @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, + CMPI_FLAG_DeepInheritance, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. + @param properties If not NULL, the members of the array define one or more Property + names. Each returned Object MUST NOT include elements for any Properties + missing from this list + @param rc Output: Service return status (suppressed when NULL). + @return Enumeration of Instances. + */ + + CMPIEnumeration* (*enumClasses) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); /** Get Instance using <op> as reference. Instance structure can be - controled using the CMPIInvocationFlags entry in <ctx>. + controled using the <flags> parameter. @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. @param flags Any combination of the following flags are supported: @@ -85,8 +125,6 @@ (CMCIClient* cl, CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); - // class 2 services - /** Create Instance from <inst> using <op> as reference. @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. @@ -133,9 +171,19 @@ (CMCIClient* cl, CMPIObjectPath* op, const char *query, const char *lang, CMPIStatus* rc); - /** Enumerate Instances of the class (and subclasses) defined by <op>. + /** Enumerate Instance Names of the class (and subclasses) defined by <op>. + @param cl Client this pointer. + @param op ObjectPath containing namespace and classname components. + @param rc Output: Service return status (suppressed when NULL). + @return Enumeration of ObjectPathes. + */ + CMPIEnumeration* (*enumInstanceNames) + (CMCIClient* cl, + CMPIObjectPath* op, CMPIStatus* rc); + + /** Enumerate Instances of the class (and subclasses) defined by <op>. Instance structure and inheritance scope can be controled using the - CMPIInvocationFlags entry in <ctx>. + <flags> parameter. @param cl Client this pointer. @param op ObjectPath containing namespace and classname components. @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- client.c 5 Jun 2005 21:06:55 -0000 1.4 +++ client.c 6 Jun 2005 12:20:08 -0000 1.5 @@ -965,13 +965,39 @@ return retval; } + +static CMPIConstClass* getClass (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + +static CMPIEnumeration* enumClassNames (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + +static CMPIEnumeration* enumClasses (CMCIClient* cl, + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + + static CMCIClientFT clientFt = { - enumInstanceNames, + getClass, + enumClassNames, + enumClasses, getInstance, createInstance, setInstance, deleteInstance, execQuery, + enumInstanceNames, enumInstances, associators, associatorNames, |
From: Viktor M. <mih...@us...> - 2005-06-06 11:13:09
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28876 Modified Files: Makefile.am Log Message: Fixed source file list. Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Makefile.am 3 Jun 2005 10:31:47 -0000 1.23 +++ Makefile.am 6 Jun 2005 11:12:59 -0000 1.24 @@ -88,8 +88,8 @@ mrwlock.c \ mlog.c \ dbpAdapter.c \ - sqlLexer.c \ - sqlParser.c \ + sqlLexer.l \ + sqlParser.y \ sqlStatement.c \ avltree.c @@ -148,9 +148,10 @@ cimXmlParser.h native.h support.h cimXmlGen.h \ cimXmlRequest.h genericlist.h objectImpl.h trace.h \ hashtable.h utilft.h mlog.h \ - cmpidt.h cmpift.h cmpiftx.h cmpimacs.h cmpimacsx.h cmpios.h fileRepository.h \ + cmpidt.h cmpift.h cmpiftx.h cmpimacs.h cmpimacsx.h cmpios.h \ + fileRepository.h \ selectexp.h queryOperation.h \ - sfcVersion.h mrwlock.h + sfcVersion.h mrwlock.h sqlStatement.h avltree.h EXTRA_DIST=sfcb.cfg.pre.in sfcb.spec sfcbrepos.sh.in sfcbstage.sh.in \ @@ -162,7 +163,7 @@ dist_sfcbdata_SCRIPTS=genSslCert.sh getSchema.sh -dist_sfcbdata_DATA=default.reg +dist_sfcbdata_DATA=default.reg interop.mof nodist_bin_SCRIPTS=sfcbrepos sfcbstage sfcbunstage |
From: Adrian S. <a3s...@us...> - 2005-06-05 21:07:05
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27306 Modified Files: client.c cmci.h cmcimacs.h test.c Log Message: Copied David's functions to client.c Updated functions needing processing flags. Fixed error in cmcimacs.h Updated getInstance call in test.c Index: cmci.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmci.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cmci.h 4 May 2005 18:18:28 -0000 1.2 +++ cmci.h 5 Jun 2005 21:06:56 -0000 1.3 @@ -73,6 +73,8 @@ controled using the CMPIInvocationFlags entry in <ctx>. @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. + @param flags Any combination of the following flags are supported: + CMPI_FLAG_LocalOnly, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. @param properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list @@ -81,7 +83,7 @@ */ CMPIInstance* (*getInstance) (CMCIClient* cl, - CMPIObjectPath* op, char** properties, CMPIStatus* rc); + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); // class 2 services @@ -100,11 +102,14 @@ @param cl Client this pointer. @param op ObjectPath containing namespace, classname and key components. @param inst Complete instance. + @param flags The following flag is supported: CMPI_FLAG_IncludeQualifiers. + @param properties If not NULL, the members of the array define one or more Property + names, only those properties will be updated. Else, all properties will be updated. @return Service return status. */ CMPIStatus (*setInstance) (CMCIClient* cl, - CMPIObjectPath* op, CMPIInstance* inst, char ** properties); + CMPIObjectPath* op, CMPIInstance* inst, CMPIFlags flags, char ** properties); /** Delete an existing Instance using <op> as reference. @param cl Client this pointer. @@ -133,6 +138,8 @@ CMPIInvocationFlags entry in <ctx>. @param cl Client this pointer. @param op ObjectPath containing namespace and classname components. + @param flags Any combination of the following flags are supported: CMPI_FLAG_LocalOnly, + CMPI_FLAG_DeepInheritance, CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. @param properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list @@ -141,7 +148,7 @@ */ CMPIEnumeration* (*enumInstances) (CMCIClient* cl, - CMPIObjectPath* op, char** properties, CMPIStatus* rc); + CMPIObjectPath* op, CMPIFlags flags, char** properties, CMPIStatus* rc); /** Enumerate instances associated with the Instance defined by the <op>. @param cl Client this pointer. @@ -166,6 +173,8 @@ via an Association in which the returned Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the returned Object MUST match the value of this parameter). + @param flags Any combination of the following flags are supported: + CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. @param properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list @@ -175,7 +184,8 @@ CMPIEnumeration* (*associators) (CMCIClient* cl, CMPIObjectPath* op, const char *assocClass, const char *resultClass, - const char *role, const char *resultRole, char** properties, CMPIStatus* rc); + const char *role, const char *resultRole, CMPIFlags flags, + char** properties, CMPIStatus* rc); /** Enumerate ObjectPaths associated with the Instance defined by <op>. @param cl Client this pointer. @@ -222,6 +232,8 @@ via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter). + @param flags Any combination of the following flags are supported: + CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin. @param properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list @@ -231,7 +243,7 @@ CMPIEnumeration* (*references) (CMCIClient* cl, CMPIObjectPath* op, const char *resultClass ,const char *role , - char** properties, CMPIStatus* rc); + CMPIFlags flags, char** properties, CMPIStatus* rc); /** Enumerates the association ObjectPaths that refer to the instance defined by <op>. Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- client.c 3 Jun 2005 15:32:11 -0000 1.3 +++ client.c 5 Jun 2005 21:06:55 -0000 1.4 @@ -41,7 +41,7 @@ CMCIClient enc; CMCIClientData data; CMCIConnection *connection; -}; +}; struct _CMCIConnection { CMCIConnectionFT *ft; // The handle to the curl object @@ -61,13 +61,6 @@ }; #define NUM_HEADERS ((sizeof(headers))/(sizeof(headers[0]))) -static const char xmlHeader[]={ - "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" - "<CIM CIMVERSION=\"2.0\" DTDVERSION=\"2.0\">\n" - "<MESSAGE ID=\"4711\" PROTOCOLVERSION=\"1.0\">" - "<SIMPLEREQ>\n" -}; - static char *getErrorMessage(CURLcode err) { static char error[128]; @@ -111,7 +104,7 @@ else return NULL; } -static char* genRequest(ClientEnc *cle, char *op, CMPIObjectPath *cop, int cls, int keys) +static char* genRequest(ClientEnc *cle, char *op, CMPIObjectPath *cop, int cls, int keys) { CMCIConnection *con=cle->connection; CMCIClientData *cld=&cle->data; @@ -119,21 +112,21 @@ UtilStringBuffer *sb=newStringBuffer(1024); char userPwd[256]; char method[256]="CIMMethod: "; - - + + if (!con->mHandle) return "Unable to initialize curl interface."; - + // if (!supportsSSL() && url.scheme == "https") // throw HttpException("this curl library does not support https urls."); con->mResponse->ft->reset(con->mResponse); - + con->mUri->ft->reset(con->mUri); con->mUri->ft->append6Chars(con->mUri,cld->scheme,"://",cld->hostName,":",cld->port,"/cimom"); sb->ft->appendChars(sb,"CIMObject: "); //url.ns.toStringBuffer(sb,"%2F"); - + /* Initialize curl with the url */ rv = curl_easy_setopt(con->mHandle, CURLOPT_URL, con->mUri->ft->getCharPtr(con->mUri)); @@ -153,9 +146,9 @@ if (cld->pwd) { strcat(userPwd,":"); rv = curl_easy_setopt(con->mHandle, CURLOPT_USERPWD, userPwd); - } + } } - + // Initialize default headers con->ft->initializeHeaders(con); @@ -175,13 +168,13 @@ // Use CURLOPT_FILE instead of CURLOPT_WRITEDATA - more portable rv = curl_easy_setopt(con->mHandle, CURLOPT_FILE, con->mResponse); - + // Fail if we receive an error (HTTP response code >= 300) rv = curl_easy_setopt(con->mHandle, CURLOPT_FAILONERROR, 1); // Turn this on to enable debugging // rv = curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); - + return NULL; } @@ -206,14 +199,14 @@ if (con->mResponse->ft->getSize(con->mResponse) == 0) return "No data received from server."; - + return NULL; } static void initializeHeaders(CMCIConnection *con) { unsigned int i; - + if (con->mHeaders) { curl_slist_free_all(con->mHeaders); con->mHeaders = NULL; @@ -231,15 +224,15 @@ CMCIConnection *initConnection(CMCIClientData *cld) { - CMCIConnection *c=(CMCIConnection*)calloc(1,sizeof(CMCIConnection)); + CMCIConnection *c=(CMCIConnection*)calloc(1,sizeof(CMCIConnection)); c->ft=&conFt; c->mHandle = curl_easy_init(); c->mHeaders = NULL; c->mBody = newStringBuffer(256); c->mUri = newStringBuffer(256); c->mResponse = newStringBuffer(2048); - - return c; + + return c; } @@ -247,15 +240,15 @@ extern char *keytype2Chars(CMPIType type); extern void pathToXml(UtilStringBuffer *sb, CMPIObjectPath *cop); -static void emitlocal(UtilStringBuffer *sb, int f) +static void emitlocal(UtilStringBuffer *sb, int f) { - if (f) + if (f) sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"LocalOnly\"><VALUE>TRUE</VALUE></IPARAMVALUE>\n"); - else + else sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"LocalOnly\"><VALUE>FALSE</VALUE></IPARAMVALUE>\n"); -} +} -static void emitqual(UtilStringBuffer *sb, int f) +static void emitqual(UtilStringBuffer *sb, int f) { if (f) sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"IncludeQualifiers\"><VALUE>TRUE</VALUE></IPARAMVALUE>\n"); @@ -263,15 +256,15 @@ sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"IncludeQualifiers\"><VALUE>FALSE</VALUE></IPARAMVALUE>\n"); } -static void emitorigin(UtilStringBuffer *sb, int f) +static void emitorigin(UtilStringBuffer *sb, int f) { if (f) sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"IncludeClassOrigin\"><VALUE>TRUE</VALUE></IPARAMVALUE>\n"); else sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"IncludeClassOrigin\"><VALUE>FALSE</VALUE></IPARAMVALUE>\n"); -} +} -static void emitdeep(UtilStringBuffer *sb, int f) +static void emitdeep(UtilStringBuffer *sb, int f) { if (f) sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"DeepInheritance\"><VALUE>TRUE</VALUE></IPARAMVALUE>\n"); @@ -279,98 +272,130 @@ sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"DeepInheritance\"><VALUE>FALSE</VALUE></IPARAMVALUE>\n"); } +#if 0 +static void addXmlProperty(UtilStringBuffer *sb, char *name, char *value) +{ + sb->ft->append3Chars(sb, + "<PROPERTY NAME=\"", name, "\" TYPE=\"string\">"); + sb->ft->append3Chars(sb, "<VALUE> \"", value, "\"</VALUE>"); + sb->ft->appendChars (sb, "</PROPERTY>\n"); +} +#endif +static void addXmlNamespace(UtilStringBuffer *sb, UtilList *nsc) +{ + char *nsp; -static CMPIEnumeration *enumInstanceNames(CMCIClient* mb, - CMPIObjectPath* cop, CMPIStatus* rc) -{ + sb->ft->appendChars(sb,"<LOCALNAMESPACEPATH>"); + for (nsp = nsc->ft->getFirst(nsc); nsp; nsp = nsc->ft->getNext(nsc)) + sb->ft->append3Chars(sb, "<NAMESPACE NAME=\"", nsp, "\"></NAMESPACE>"); + sb->ft->appendChars(sb, "</LOCALNAMESPACEPATH>\n"); +} + +static inline void addXmlHeader(UtilStringBuffer *sb) +{ + static const char xmlHeader[]={ + "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" + "<CIM CIMVERSION=\"2.0\" DTDVERSION=\"2.0\">\n" + "<MESSAGE ID=\"4711\" PROTOCOLVERSION=\"1.0\">" + "<SIMPLEREQ>\n" + }; + + sb->ft->appendChars(sb, xmlHeader); +} + +static inline void addXmlClassnameParam(UtilStringBuffer *sb, + CMPIObjectPath *cop) +{ + sb->ft->append3Chars(sb, + "<IPARAMVALUE NAME=\"ClassName\"><CLASSNAME NAME=\"", + (char*)cop->ft->getClassName(cop, NULL), + "\"/></IPARAMVALUE>\n"); +} + +static void addXmlPropertyListParam(UtilStringBuffer *sb, char** properties) +{ + if (properties) { + sb->ft->appendChars(sb, "<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); + while (*properties) { + sb->ft->append3Chars(sb, "<VALUE>", *properties, "</VALUE>"); + properties++; + } + sb->ft->appendChars(sb, "</VALUE.ARRAY></IPARAMVALUE>\n"); + } +} + + + +static CMPIEnumeration *enumInstanceNames(CMCIClient* mb, CMPIObjectPath* cop, CMPIStatus* rc) +{ ClientEnc *cl=(ClientEnc*)mb; CMCIConnection *con=cl->connection; UtilStringBuffer *sb=newStringBuffer(2048); - UtilList *nsc; - CMPIString *cn; - char *ns,*error; + char *error; - cn=cop->ft->getClassName(cop,NULL); con->ft->genRequest(cl,"EnumerateInstanceNames",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); - nsc=getNameSpaceComponents(cop); - sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"EnumerateInstanceNames\">" - "<LOCALNAMESPACEPATH>"); - for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) - sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); - sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); - - sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ClassName\"><CLASSNAME NAME=\"",(char*)cn->hdl, - "\"/></IPARAMVALUE>\n"); + addXmlHeader(sb); + + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"EnumerateInstanceNames\">"); + + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + addXmlClassnameParam(sb, cop); sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); - - if ((error=con->ft->getResponse(con,cop))) { + + if ((error = con->ft->getResponse(con,cop))) { CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); return NULL; } // fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); - + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); if (rh.errCode!=0) { CMSetStatusWithChars(rc,rh.errCode,rh.description); return NULL; } - - if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_ref) { - CMPIEnumeration *enm=newCMPIEnumeration(rh.rvArray,NULL); + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_ref) { + CMPIEnumeration *enm = newCMPIEnumeration(rh.rvArray,NULL); CMSetStatus(rc,CMPI_RC_OK); return enm; - } - + } + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); return NULL; } - - -static CMPIInstance* getInstance(CMCIClient* mb, - CMPIObjectPath* cop, char** properties, CMPIStatus* rc) +static CMPIInstance * getInstance(CMCIClient* mb, + CMPIObjectPath* cop, CMPIFlags flags, char** properties, CMPIStatus* rc) { ClientEnc *cl=(ClientEnc*)mb; CMCIConnection *con=cl->connection; UtilStringBuffer *sb=newStringBuffer(2048); - UtilList *nsc; - CMPIString *cn; - char *ns,*error; - - cn=cop->ft->getClassName(cop,NULL); + char *error; + + addXmlClassnameParam(sb, cop); con->ft->genRequest(cl,"GetInstance",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); - - nsc=getNameSpaceComponents(cop); - sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"GetInstance\">\n" - "<LOCALNAMESPACEPATH>"); - for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) - sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); - sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); - emitlocal(sb,0); - emitorigin(sb,0); - emitqual(sb,0); + addXmlHeader(sb); + + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"GetInstance\">"); - if (properties) { - sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); - while (*properties) { - sb->ft->append3Chars(sb,"<VALUE>",*properties,"</VALUE>"); - properties++; - } - sb->ft->appendChars(sb,"</VALUE.ARRAY></IPARAMVALUE>\n"); - } + addXmlNamespace(sb, getNameSpaceComponents(cop)); - sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"InstanceName\">\n" - "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); + emitlocal(sb,flags & CMPI_FLAG_LocalOnly); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + + addXmlPropertyListParam(sb, properties); + + addXmlClassnameParam(sb, cop); pathToXml(sb, cop); @@ -380,43 +405,191 @@ // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); - + if ((error=con->ft->getResponse(con,cop))) { CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); return NULL; } // fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); - + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); if (rh.errCode!=0) { CMSetStatusWithChars(rc,rh.errCode,rh.description); return NULL; } - - if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_instance) { + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_instance) { CMSetStatus(rc,CMPI_RC_OK); - return rh.rvArray->ft->getElementAt(rh.rvArray,0,NULL).value.inst; - } - + return rh.rvArray->ft->getElementAt(rh.rvArray, 0, NULL).value.inst; + } + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); return NULL; -} - +} +static CMPIObjectPath *createInstance(CMCIClient *mb, + CMPIObjectPath *cop, CMPIInstance *inst, CMPIStatus *rc) +{ + ClientEnc *cl = (ClientEnc*)mb; + CMCIConnection *con = cl->connection; + UtilStringBuffer *sb = newStringBuffer(2048); + char *error; + ResponseHdr rh; + + con->ft->genRequest(cl, "CreateInstance", cop, 0, 0); + addXmlHeader(sb); -static CMPIEnumeration* execQuery (CMCIClient* cl, - CMPIObjectPath* op, const char *query, const char *lang, CMPIStatus* rc) -{ - CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Not implemented by sfcc"); - return NULL; -} + sb->ft->appendChars(sb, "<IMETHODCALL NAME=\"CreateInstance\">"); + + addXmlNamespace(sb, getNameSpaceComponents(cop)); + +//#warning "createInstance: TODO - build Xml parameters for *inst" + /* issue here is using the stuff from inst for property list */ + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con, cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); + if (rh.errCode != 0) { + CMSetStatusWithChars(rc, rh.errCode, rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_ref) { + CMPIObjectPath *objpath = newCMPIObjectPath(NULL, + (char*)cop->ft->getClassName(cop, NULL), NULL); +//#warning "createInstance: TODO - setup *objpath from rh.rvArray value" + CMSetStatus(rc,CMPI_RC_OK); + return objpath; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; +} + +static CMPIStatus setInstance(CMCIClient* cl, + CMPIObjectPath* op, CMPIInstance* inst, CMPIFlags flags, char ** properties) +{ + CMPIStatus rc; + CMSetStatusWithChars(&rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return rc; +} + +static CMPIStatus deleteInstance(CMCIClient* mb, CMPIObjectPath* cop) +{ + ClientEnc *cl = (ClientEnc *)mb; + CMCIConnection *con = cl->connection; + UtilStringBuffer *sb = newStringBuffer(2048); + char *error; + ResponseHdr rh; + CMPIStatus rc; + + con->ft->genRequest(cl, "DeleteInstance", cop, 0, 0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb, "<IMETHODCALL NAME=\"DeleteInstance\">"); + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + addXmlClassnameParam(sb, cop); + + pathToXml(sb, cop); + + sb->ft->appendChars(sb, "\"/></IPARAMVALUE>\n"); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con, cop))) { + CMSetStatusWithChars(&rc,CMPI_RC_ERR_FAILED,error); + return rc; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); + + if (rh.errCode != 0) { + CMSetStatusWithChars(&rc, rh.errCode, rh.description); + } else { + CMSetStatus(&rc, CMPI_RC_OK); + } + return rc; +} + +static CMPIEnumeration *execQuery(CMCIClient* cl, CMPIObjectPath* op, + const char *query, const char *lang, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} + +static CMPIEnumeration * enumInstances(CMCIClient* mb, + CMPIObjectPath* cop, CMPIFlags flags, char** properties, CMPIStatus* rc) +{ + ClientEnc *cl = (ClientEnc *)mb; + CMCIConnection *con = cl->connection; + UtilStringBuffer *sb = newStringBuffer(2048); + char *error; + ResponseHdr rh; + + con->ft->genRequest(cl, "EnumerateInstances", cop, 0, 0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb, "<IMETHODCALL NAME=\"EnumerateInstances\">"); + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + addXmlClassnameParam(sb, cop); + + emitdeep(sb,flags & CMPI_FLAG_DeepInheritance); + emitlocal(sb,flags & CMPI_FLAG_LocalOnly); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + + addXmlPropertyListParam(sb, properties); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con, cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); + + if (rh.errCode != 0) { + CMSetStatusWithChars(rc, rh.errCode, rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL) == CMPI_ref) { + CMPIEnumeration *enm = newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc, CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return NULL; +} static CMPIEnumeration* associators (CMCIClient* mb, - CMPIObjectPath* cop, const char *assocClass, const char *resultClass, - const char *role, const char *resultRole, char** properties, CMPIStatus* rc) + CMPIObjectPath* cop, const char *assocClass, const char *resultClass, + const char *role, const char *resultRole, CMPIFlags flags, char** properties, + CMPIStatus* rc) { ClientEnc *cl=(ClientEnc*)mb; @@ -428,7 +601,7 @@ cn=cop->ft->getClassName(cop,NULL); con->ft->genRequest(cl,"Associators",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); + addXmlHeader(sb); nsc=getNameSpaceComponents(cop); sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"Associators\">\n" @@ -456,8 +629,9 @@ sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"ResultRole\"><VALUE>", resultRole, "</VALUE></IPARAMVALUE>\n"); - emitorigin(sb,0); - emitqual(sb,0); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + if (properties) { sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); @@ -497,8 +671,8 @@ } static CMPIEnumeration* associatorNames(CMCIClient* mb, - CMPIObjectPath* cop, const char *assocClass, const char *resultClass, - const char *role, const char *resultRole, CMPIStatus* rc) + CMPIObjectPath* cop, const char *assocClass, const char *resultClass, + const char *role, const char *resultRole, CMPIStatus* rc) { ClientEnc *cl=(ClientEnc*)mb; CMCIConnection *con=cl->connection; @@ -509,7 +683,7 @@ cn=cop->ft->getClassName(cop,NULL); con->ft->genRequest(cl,"AssociatorNames",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); + addXmlHeader(sb); nsc=getNameSpaceComponents(cop); sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"AssociatorNames\">\n" @@ -568,8 +742,8 @@ static CMPIEnumeration* references(CMCIClient* mb, - CMPIObjectPath* cop, const char *resultClass ,const char *role , - char** properties, CMPIStatus* rc) + CMPIObjectPath* cop, const char *resultClass ,const char *role , + CMPIFlags flags, char** properties, CMPIStatus* rc) { ClientEnc *cl=(ClientEnc*)mb; CMCIConnection *con=cl->connection; @@ -580,7 +754,7 @@ cn=cop->ft->getClassName(cop,NULL); con->ft->genRequest(cl,"References",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); + addXmlHeader(sb); nsc=getNameSpaceComponents(cop); sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"References\">\n" @@ -601,8 +775,9 @@ sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, "</VALUE></IPARAMVALUE>\n"); - emitorigin(sb,0); - emitqual(sb,0); + emitorigin(sb,flags & CMPI_FLAG_IncludeClassOrigin); + emitqual(sb,flags & CMPI_FLAG_IncludeQualifiers); + if (properties) { sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); @@ -644,8 +819,8 @@ static CMPIEnumeration* referenceNames(CMCIClient* mb, - CMPIObjectPath* cop, const char *resultClass ,const char *role, - CMPIStatus* rc) + CMPIObjectPath* cop, const char *resultClass ,const char *role, + CMPIStatus* rc) { ClientEnc *cl=(ClientEnc*)mb; CMCIConnection *con=cl->connection; @@ -656,7 +831,7 @@ cn=cop->ft->getClassName(cop,NULL); con->ft->genRequest(cl,"ReferenceNames",cop,0,0); - sb->ft->appendChars(sb,xmlHeader); + addXmlHeader(sb); nsc=getNameSpaceComponents(cop); sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"ReferenceNames\">\n" @@ -706,47 +881,130 @@ } +static CMPIData invokeMethod(CMCIClient* cl, CMPIObjectPath* op,const char *method, + CMPIArgs* in, CMPIArgs* out, CMPIStatus* rc) +{ + CMPIData rv = {CMPI_null, CMPI_notFound}; + CMSetStatusWithChars(rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return rv; +} +static CMPIStatus setProperty(CMCIClient* cl, + CMPIObjectPath* op, const char *name , CMPIValue* value, + CMPIType type) +{ + + CMPIStatus rc; + CMSetStatusWithChars(&rc, CMPI_RC_ERROR_SYSTEM, "method not supported"); + return rc; +} -static CMCIClientFT clientFt = { +static CMPIData getProperty(CMCIClient *mb, + CMPIObjectPath *cop, const char *name, CMPIStatus *rc) +{ + ClientEnc *cl = (ClientEnc*)mb; + CMCIConnection *con = cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + char *error; + ResponseHdr rh; + CMPIData retval; + + con->ft->genRequest(cl, "GetProperty", cop, 0, 0); + + addXmlHeader(sb); + + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"GetProperty\">"); + + addXmlNamespace(sb, getNameSpaceComponents(cop)); + + sb->ft->append3Chars(sb, + "<IPARAMVALUE NAME=\"InstanceName\"><INSTANCE CLASSNAME=\"", + (char*)cop->ft->getClassName(cop, NULL), "\">\n"); + + pathToXml(sb, cop); + + sb->ft->appendChars(sb, "</INSTANCENAME></IPARAMVALUE>"); + + sb->ft->append3Chars(sb, + "<IPARAMVALUE NAME=\"PropertyName\">\n<VALUE> \"", + name, "\" </VALUE>\n</IPARAMVALUE>"); + + sb->ft->appendChars(sb, "</IMETHODCALL></SIMPLEREQ></MESSAGE></CIM>"); + + sb->ft->appendChars(sb, "</IMETHODCALL></SIMPLEREQ></MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error = con->ft->getResponse(con, cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); +//#warning "getProperty: TODO: setup error return value in retval" + return retval; + } + +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode != 0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); +//#warning "getProperty: TODO: setup error return value in retval" + return retval; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray, NULL) == CMPI_INTEGER) { +//#warning "getProperty: TODO - setup CMPIData object from rh.rvArray here" + CMSetStatus(rc, CMPI_RC_OK); + return retval; + } + + CMSetStatusWithChars(rc, CMPI_RC_ERR_FAILED, "Unexpected return value"); +//#warning "getProperty: TODO: setup error return value in retval" + return retval; +} + +static CMCIClientFT clientFt = { enumInstanceNames, getInstance, - NULL, // createInstance - NULL, // setInstance, - NULL, // deleteInstance, + createInstance, + setInstance, + deleteInstance, execQuery, - NULL, // enumInstances, + enumInstances, associators, associatorNames, references, referenceNames, - NULL, // invokeMethod, - NULL, // setProperty, - NULL, // getProperty + invokeMethod, + setProperty, + getProperty }; -CMCIClient *cmciConnect(const char *hn, const char *port, + + + +CMCIClient *cmciConnect(const char *hn, const char *port, const char *user, const char *pwd, CMPIStatus *rc) { - + ClientEnc *cc=(ClientEnc*)calloc(1,sizeof(ClientEnc)); - + cc->enc.hdl=&cc->data; cc->enc.ft=&clientFt; - + cc->data.hostName= hn ? strdup(hn) : "localhost"; cc->data.port= port ? strdup(port) : "5988"; cc->data.user= user ? strdup(user) : NULL; cc->data.pwd= pwd ? strdup(pwd) : NULL; cc->data.scheme= "http"; - + cc->connection=initConnection(&cc->data); - + return (CMCIClient*)cc; - -} + +} Index: test.c =================================================================== RCS file: /cvsroot/sblim/sfcc/test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test.c 4 May 2005 18:20:08 -0000 1.1 +++ test.c 5 Jun 2005 21:06:56 -0000 1.2 @@ -17,9 +17,8 @@ printf("--- enumInstanceNames rc: %d - %s\n",rc.rc, rc.msg ? (char*)rc.msg->hdl : NULL); CMAddKey(cop,"Name","localhost.localdomain",CMPI_chars); -// CMAddKey(cop,"Name","dyn-9-152-141-116.boeblingen.de.ibm.com" ,CMPI_chars); - ci=cc->ft->getInstance(cc,cop,NULL,&rc); + ci=cc->ft->getInstance(cc,cop,0,NULL,&rc); printf("--- getInstance rc: %d - %s\n",rc.rc, rc.msg ? (char*)rc.msg->hdl : NULL); return 0; Index: cmcimacs.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmcimacs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cmcimacs.h 4 May 2005 18:20:08 -0000 1.1 +++ cmcimacs.h 5 Jun 2005 21:06:56 -0000 1.2 @@ -66,13 +66,13 @@ */ inline static void CMSetStatusWithChars(CMPIStatus* st, CMPIrc rcp, char* chars) - { if (rc) { + { if (st) { (st)->rc=(rcp); (st)->msg=newCMPIString((chars),NULL); } } #else #define CMSetStatusWithChars(st,rcp,chars) \ - { if (rc) { (st)->rc=(rcp); \ + { if (st) { (st)->rc=(rcp); \ (st)->msg=newCMPIString((chars),NULL); }} #endif |
From: Adrian S. <a3s...@us...> - 2005-06-03 15:32:21
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4971 Modified Files: client.c Log Message: Added untested support for Associators, AssociatorNames, Reference, ReferenceNames Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- client.c 4 May 2005 18:17:22 -0000 1.2 +++ client.c 3 Jun 2005 15:32:11 -0000 1.3 @@ -279,6 +279,8 @@ sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"DeepInheritance\"><VALUE>FALSE</VALUE></IPARAMVALUE>\n"); } + + static CMPIEnumeration *enumInstanceNames(CMCIClient* mb, CMPIObjectPath* cop, CMPIStatus* rc) { @@ -331,6 +333,8 @@ return NULL; } + + static CMPIInstance* getInstance(CMCIClient* mb, CMPIObjectPath* cop, char** properties, CMPIStatus* rc) { @@ -400,11 +404,330 @@ } + +static CMPIEnumeration* execQuery (CMCIClient* cl, + CMPIObjectPath* op, const char *query, const char *lang, CMPIStatus* rc) +{ + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Not implemented by sfcc"); + return NULL; +} + + + +static CMPIEnumeration* associators (CMCIClient* mb, + CMPIObjectPath* cop, const char *assocClass, const char *resultClass, + const char *role, const char *resultRole, char** properties, CMPIStatus* rc) + +{ + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + UtilList *nsc; + CMPIString *cn; + char *ns,*error; + + cn=cop->ft->getClassName(cop,NULL); + con->ft->genRequest(cl,"Associators",cop,0,0); + sb->ft->appendChars(sb,xmlHeader); + + nsc=getNameSpaceComponents(cop); + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"Associators\">\n" + "<LOCALNAMESPACEPATH>"); + for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) + sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); + sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); + + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ObjectName\">\n" + "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); + pathToXml(sb, cop); + sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); + + if (assocClass!=NULL) + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"AssocClass\"><CLASSNAME NAME=\"", assocClass, + "\"/></IPARAMVALUE>\n"); + if (resultClass!=NULL) + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ResultClass\"><CLASSNAME NAME=\"", resultClass, + "\"/></IPARAMVALUE>\n"); + + if (role) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, + "</VALUE></IPARAMVALUE>\n"); + if (resultRole) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"ResultRole\"><VALUE>", resultRole, + "</VALUE></IPARAMVALUE>\n"); + + emitorigin(sb,0); + emitqual(sb,0); + + if (properties) { + sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); + while (*properties) { + sb->ft->append3Chars(sb,"<VALUE>",*properties,"</VALUE>"); + properties++; + } + sb->ft->appendChars(sb,"</VALUE.ARRAY></IPARAMVALUE>\n"); + } + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error=con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_instance) { + CMPIEnumeration *enm=newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc,CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; +} + +static CMPIEnumeration* associatorNames(CMCIClient* mb, + CMPIObjectPath* cop, const char *assocClass, const char *resultClass, + const char *role, const char *resultRole, CMPIStatus* rc) +{ + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + UtilList *nsc; + CMPIString *cn; + char *ns,*error; + + cn=cop->ft->getClassName(cop,NULL); + con->ft->genRequest(cl,"AssociatorNames",cop,0,0); + sb->ft->appendChars(sb,xmlHeader); + + nsc=getNameSpaceComponents(cop); + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"AssociatorNames\">\n" + "<LOCALNAMESPACEPATH>"); + for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) + sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); + sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); + + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ObjectName\">\n" + "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); + pathToXml(sb, cop); + sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); + + if (assocClass!=NULL) + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"AssocClass\"><CLASSNAME NAME=\"", assocClass, + "\"/></IPARAMVALUE>\n"); + if (resultClass!=NULL) + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ResultClass\"><CLASSNAME NAME=\"", resultClass, + "\"/></IPARAMVALUE>\n"); + + if (role) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, + "</VALUE></IPARAMVALUE>\n"); + if (resultRole) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"ResultRole\"><VALUE>", resultRole, + "</VALUE></IPARAMVALUE>\n"); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error=con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_ref) { + CMPIEnumeration *enm=newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc,CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; +} + + + +static CMPIEnumeration* references(CMCIClient* mb, + CMPIObjectPath* cop, const char *resultClass ,const char *role , + char** properties, CMPIStatus* rc) +{ + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + UtilList *nsc; + CMPIString *cn; + char *ns,*error; + + cn=cop->ft->getClassName(cop,NULL); + con->ft->genRequest(cl,"References",cop,0,0); + sb->ft->appendChars(sb,xmlHeader); + + nsc=getNameSpaceComponents(cop); + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"References\">\n" + "<LOCALNAMESPACEPATH>"); + for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) + sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); + sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); + + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ObjectName\">\n" + "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); + pathToXml(sb, cop); + sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); + + if (resultClass) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"ResultClass\"><VALUE>", resultClass, + "</VALUE></IPARAMVALUE>\n"); + if (role) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, + "</VALUE></IPARAMVALUE>\n"); + + emitorigin(sb,0); + emitqual(sb,0); + + if (properties) { + sb->ft->appendChars(sb,"<IPARAMVALUE NAME=\"PropertyList\"><VALUE.ARRAY>"); + while (*properties) { + sb->ft->append3Chars(sb,"<VALUE>",*properties,"</VALUE>"); + properties++; + } + sb->ft->appendChars(sb,"</VALUE.ARRAY></IPARAMVALUE>\n"); + } + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error=con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_instance) { + CMPIEnumeration *enm=newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc,CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; +} + + + +static CMPIEnumeration* referenceNames(CMCIClient* mb, + CMPIObjectPath* cop, const char *resultClass ,const char *role, + CMPIStatus* rc) +{ + ClientEnc *cl=(ClientEnc*)mb; + CMCIConnection *con=cl->connection; + UtilStringBuffer *sb=newStringBuffer(2048); + UtilList *nsc; + CMPIString *cn; + char *ns,*error; + + cn=cop->ft->getClassName(cop,NULL); + con->ft->genRequest(cl,"ReferenceNames",cop,0,0); + sb->ft->appendChars(sb,xmlHeader); + + nsc=getNameSpaceComponents(cop); + sb->ft->appendChars(sb,"<IMETHODCALL NAME=\"ReferenceNames\">\n" + "<LOCALNAMESPACEPATH>"); + for (ns=nsc->ft->getFirst(nsc); ns; ns=nsc->ft->getNext(nsc)) + sb->ft->append3Chars(sb,"<NAMESPACE NAME=\"",ns,"\"></NAMESPACE>"); + sb->ft->appendChars(sb,"</LOCALNAMESPACEPATH>\n"); + + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ObjectName\">\n" + "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); + pathToXml(sb, cop); + sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); + + if (resultClass!=NULL) + sb->ft->append3Chars(sb,"<IPARAMVALUE NAME=\"ResultClass\"><CLASSNAME NAME=\"", resultClass, + "\"/></IPARAMVALUE>\n"); + if (role) + sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, + "</VALUE></IPARAMVALUE>\n"); + + sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); + con->ft->addPayload(con,sb); + + if ((error=con->ft->getResponse(con,cop))) { + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,error); + return NULL; + } +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); + + ResponseHdr rh=scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse),cop); + + if (rh.errCode!=0) { + CMSetStatusWithChars(rc,rh.errCode,rh.description); + return NULL; + } + + if (rh.rvArray->ft->getSimpleType(rh.rvArray,NULL)==CMPI_ref) { + CMPIEnumeration *enm=newCMPIEnumeration(rh.rvArray,NULL); + CMSetStatus(rc,CMPI_RC_OK); + return enm; + } + + CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); + return NULL; +} + + + + + + static CMCIClientFT clientFt = { enumInstanceNames, - getInstance + getInstance, + NULL, // createInstance + NULL, // setInstance, + NULL, // deleteInstance, + execQuery, + NULL, // enumInstances, + associators, + associatorNames, + references, + referenceNames, + NULL, // invokeMethod, + NULL, // setProperty, + NULL, // getProperty }; + CMCIClient *cmciConnect(const char *hn, const char *port, const char *user, const char *pwd, CMPIStatus *rc) { |
From: Gareth S B. <bes...@us...> - 2005-06-03 15:22:33
|
Update of /cvsroot/sblim/sfcb/regressionTests/sblim/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575/sblim/tests Removed Files: testsuite.sh Log Message: remove remaining old sfcb regressiontest files. Deprecated by new SBLIM test providers --- testsuite.sh DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-06-03 15:22:33
|
Update of /cvsroot/sblim/sfcb/regressionTests/sblim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575/sblim Removed Files: Linux_Base.reg cmpi-base-setting dummy.mof ind-helper-makefile makefile Log Message: remove remaining old sfcb regressiontest files. Deprecated by new SBLIM test providers --- Linux_Base.reg DELETED --- --- cmpi-base-setting DELETED --- --- makefile DELETED --- --- dummy.mof DELETED --- --- ind-helper-makefile DELETED --- |
Update of /cvsroot/sblim/sfcb/regressionTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575 Removed Files: RegressionTesting.html broker.sh build.sh clean.sh getSblimBase.sh reset.sh setEnv sfcb.cfg test.sh wbemcli.ind Log Message: remove remaining old sfcb regressiontest files. Deprecated by new SBLIM test providers --- sfcb.cfg DELETED --- --- getSblimBase.sh DELETED --- --- clean.sh DELETED --- --- setEnv DELETED --- --- build.sh DELETED --- --- test.sh DELETED --- --- broker.sh DELETED --- --- wbemcli.ind DELETED --- --- RegressionTesting.html DELETED --- --- reset.sh DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-06-03 15:22:33
|
Update of /cvsroot/sblim/sfcb/regressionTests/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575/scripts Removed Files: catdiff sfcbdiff wbemcat Log Message: remove remaining old sfcb regressiontest files. Deprecated by new SBLIM test providers --- wbemcat DELETED --- --- sfcbdiff DELETED --- --- catdiff DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-06-03 15:22:33
|
Update of /cvsroot/sblim/sfcb/regressionTests/schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575/schema Removed Files: baseProvider.reg interop.mof Log Message: remove remaining old sfcb regressiontest files. Deprecated by new SBLIM test providers --- baseProvider.reg DELETED --- --- interop.mof DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-06-03 15:16:06
|
Update of /cvsroot/sblim/sfcb/regressionTests/LifeCycleIndications/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29224/tests Removed Files: CreateDeleteSeq01.sh CreateFilter01.OK CreateFilter01.xml CreateHandler01.OK CreateHandler01.xml CreateSubscription01.OK CreateSubscription01.xml DeleteFilter01.OK DeleteFilter01.xml DeleteHandler01.OK DeleteHandler01.xml DeleteSubscription01.OK DeleteSubscription01.xml Log Message: remove old Lifecycle indication tests. Deprecated by new cmpi-tests/cmpi-lifecycleindicationtest provider --- CreateFilter01.xml DELETED --- --- DeleteHandler01.xml DELETED --- --- CreateHandler01.xml DELETED --- --- DeleteHandler01.OK DELETED --- --- DeleteSubscription01.OK DELETED --- --- DeleteFilter01.xml DELETED --- --- CreateDeleteSeq01.sh DELETED --- --- DeleteSubscription01.xml DELETED --- --- DeleteFilter01.OK DELETED --- --- CreateFilter01.OK DELETED --- --- CreateHandler01.OK DELETED --- --- CreateSubscription01.OK DELETED --- --- CreateSubscription01.xml DELETED --- |