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: Benjamin B. <bg...@us...> - 2005-06-29 11:24:10
|
Update of /cvsroot/sblim/ecute/Plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8766/Plugin Modified Files: runEntryPoint.bat Log Message: ECUTE 2.1 beta 1f: full CMPI provider generation support for RSA Index: runEntryPoint.bat =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/runEntryPoint.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- runEntryPoint.bat 27 Dec 2004 12:49:49 -0000 1.4 +++ runEntryPoint.bat 29 Jun 2005 11:24:02 -0000 1.5 @@ -10,8 +10,8 @@ set _JAVAW_ECUTE=javaw :endjh -set ECUTE=D:\workspace\Ecute -D: +set ECUTE=C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\ecute +C: cd %ECUTE% set orig_classpath=%CLASSPATH% |
|
From: yeechan <ibm...@us...> - 2005-06-28 20:36:20
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13386 Modified Files: instance.c Log Message: setProperty type DateTime added Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- instance.c 21 Jun 2005 22:50:51 -0000 1.6 +++ instance.c 28 Jun 2005 20:36:09 -0000 1.7 @@ -223,6 +223,12 @@ data.type=CMPI_chars; data.state=CMPI_nullValue; } + else if (type == CMPI_dateTime) { + if (value == NULL); + else { + data.state = CMPI_nullValue; + } + else if (type == CMPI_sint64 || type == CMPI_uint64 || type == CMPI_real64) data.value = *value; else data.value.Int = value->Int; |
|
From: Adrian S. <a3s...@us...> - 2005-06-26 21:52:20
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30692 Modified Files: cimXmlRequest.c cimXmlRequest.h httpAdapter.c httpComm.c Log Message: Added "TE: trailers" support. When not specified in XML requests chunking will not used in the reply. Improved tracing support in httpComm.c Index: httpComm.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpComm.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- httpComm.c 20 Jun 2005 13:09:44 -0000 1.2 +++ httpComm.c 26 Jun 2005 21:52:08 -0000 1.3 @@ -62,9 +62,19 @@ #ifdef SFCB_DEBUG if ((_sfcb_trace_mask & TRACE_XMLOUT) ) { - fprintf(stderr,"-#- xmlOut %d bytes:\n%*s",count,count,(char*)data); - if (*(((char*)data)+count-1)!='\n') fprintf(stderr,"\n"); - fprintf(stderr,"-#- xmlOut end\n"); + char *mp,*m=alloca(count*2),*d=(char*)data; + int i; + fprintf(stderr,"->> xmlOut %d bytes:\n",count); + for (mp=m,i=0; i<count; i++) + switch (d[i]) { + case '\r': *mp++='\\'; *mp++='r'; break; + case '\n': *mp++='\\'; *mp++='n'; break; + case ' ' : *mp++='~'; break; + default: *mp++=d[i]; + } + *mp=0; + fprintf(stderr,"%s\n",m); + fprintf(stderr,"-<< xmlOut end\n"); } #endif Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- httpAdapter.c 20 Jun 2005 13:09:34 -0000 1.12 +++ httpAdapter.c 26 Jun 2005 21:52:08 -0000 1.13 @@ -399,7 +399,7 @@ static char cach[] = {"Cache-Control: no-cache\r\n"}; static char op[] = {"CIMOperation: MethodResponse\r\n"}; static char tenc[] = {"Transfer-encoding: chunked\r\n"}; - static char trls[] = {"Trailers: CIMError, CIMStatusCode, CIMStatusCodeDescription\r\n"}; + static char trls[] = {"Trailer: CIMError, CIMStatusCode, CIMStatusCodeDescription\r\n"}; _SFCB_ENTER(TRACE_HTTPDAEMON, "writeChunkHeaders"); @@ -684,7 +684,7 @@ { CimXmlRequestContext ctx = - { inBuf.content, inBuf.principle, inBuf.host, len - hl, &conn_fd }; + { inBuf.content, inBuf.principle, inBuf.host, inBuf.trailers, len - hl, &conn_fd }; ctx.chunkFncs=&httpChunkFunctions; #ifdef SFCB_DEBUG Index: cimXmlRequest.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cimXmlRequest.h 11 Apr 2005 23:13:41 -0000 1.2 +++ cimXmlRequest.h 26 Jun 2005 21:52:08 -0000 1.3 @@ -51,6 +51,7 @@ char *cimXmlDoc; char *principal; char *host; + int teTrailers; unsigned long cimXmlDocLength; struct commHndl *commHndl; struct chunkFunctions *chunkFncs; Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cimXmlRequest.c 13 Jun 2005 23:37:31 -0000 1.12 +++ cimXmlRequest.c 26 Jun 2005 21:52:08 -0000 1.13 @@ -799,7 +799,8 @@ binCtx.type=CMPI_class; binCtx.xmlAs=binCtx.noResp=0; binCtx.chunkFncs=ctx->chunkFncs; - if (noChunking) + + if (noChunking || ctx->teTrailers==0) hdr->chunkedMode=binCtx.chunkedMode=0; else { sreq.flags|=FL_chunked; @@ -819,7 +820,7 @@ closeProviderContext(&binCtx); - if (noChunking) { + if (noChunking || ctx->teTrailers==0) { if (err == 0) _SFCB_RETURN(genResponses(&binCtx, resp, l)) _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp[err-1]->rc, (char*)resp[err-1]->object[0].data))); @@ -1175,7 +1176,7 @@ binCtx.xmlAs=binCtx.noResp=0; binCtx.chunkFncs=ctx->chunkFncs; - if (noChunking) + if (noChunking || ctx->teTrailers==0) hdr->chunkedMode=binCtx.chunkedMode=0; else { sreq->flags|=FL_chunked; @@ -1195,7 +1196,7 @@ closeProviderContext(&binCtx); free(sreq); - if (noChunking) { + if (noChunking || ctx->teTrailers==0) { if (err == 0) _SFCB_RETURN(genResponses(&binCtx, resp, l)) _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp[err-1]->rc, (char*)resp[err-1]->object[0].data))); @@ -1252,7 +1253,8 @@ binCtx.type=CMPI_instance; binCtx.xmlAs=XML_asObj; binCtx.noResp=0; binCtx.chunkFncs=ctx->chunkFncs; - if (noChunking) + + if (noChunking || ctx->teTrailers==0) hdr->chunkedMode=binCtx.chunkedMode=0; else { sreq.flags|=FL_chunked; @@ -1272,7 +1274,7 @@ _SFCB_TRACE(1, ("--- Back from Provider")); closeProviderContext(&binCtx); - if (noChunking) { + if (noChunking || ctx->teTrailers==0) { if (err == 0) _SFCB_RETURN(genResponses(&binCtx, resp, l)) _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp[err-1]->rc, (char*)resp[err-1]->object[0].data))); @@ -1418,7 +1420,8 @@ binCtx.xmlAs=XML_asObj; binCtx.noResp=0; binCtx.pAs=NULL; binCtx.chunkFncs=ctx->chunkFncs; - if (noChunking) + + if (noChunking || ctx->teTrailers==0) hdr->chunkedMode=binCtx.chunkedMode=0; else { sreq->flags|=FL_chunked; @@ -1438,7 +1441,7 @@ closeProviderContext(&binCtx); free(sreq); - if (noChunking) { + if (noChunking || ctx->teTrailers==0) { if (err == 0) _SFCB_RETURN(genResponses(&binCtx, resp, l)) _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp[err-1]->rc, (char*)resp[err-1]->object[0].data))); @@ -1579,7 +1582,8 @@ binCtx.xmlAs=XML_asObj; binCtx.noResp=0; binCtx.pAs=NULL; binCtx.chunkFncs=ctx->chunkFncs; - if (noChunking) + + if (noChunking || ctx->teTrailers==0) hdr->chunkedMode=binCtx.chunkedMode=0; else { sreq->flags|=FL_chunked; @@ -1598,7 +1602,7 @@ closeProviderContext(&binCtx); free(sreq); - if (noChunking) { + if (noChunking || ctx->teTrailers==0) { if (err == 0) _SFCB_RETURN(genResponses(&binCtx, resp, l)) _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp[err-1]->rc, (char*)resp[err-1]->object[0].data))); |
|
From: Adrian S. <a3s...@us...> - 2005-06-26 21:46:12
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27899 Modified Files: Makefile.am cimXmlParser.c cimXmlResp.c cimXmlResp.h cimXmlResp.y client.c cmci.h cmcidt.h test.c Log Message: Various updates to cimXmlResp.y Fixed wrong xml closing footers Added CMPIConstClass to CMPIValue union Since we have a problem with CURL concerning chunk and trailer decoding, a change has been made in sfcb: When sfcb does not find a "TE: trailers" header in the XML request, chunking will not occur. This version of sfcc will not include a "TE: trailers" header... Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- client.c 23 Jun 2005 22:54:11 -0000 1.15 +++ client.c 26 Jun 2005 21:46:02 -0000 1.16 @@ -55,7 +55,8 @@ static const char *headers[] = { "Content-type: application/xml; charset=\"utf-8\"", - "Connection: Keep-Alive, TE", + "Accept:", + "Expect:", "CIMProtocolVersion: 1.0", "CIMOperation: MethodCall" }; @@ -193,6 +194,7 @@ CURLcode rv; rv = curl_easy_perform(con->mHandle); + if (rv) { long responseCode = -1; char *error; @@ -396,7 +398,8 @@ addXmlNamespace(sb, getNameSpaceComponents(cop)); addXmlClassnameParam(sb, cop); - sb->ft->appendChars(sb, "</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -493,8 +496,8 @@ "<INSTANCENAME CLASSNAME=\"",(char*)cn->hdl,"\">\n"); pathToXml(sb, cop); sb->ft->appendChars(sb,"</INSTANCENAME>\n</IPARAMVALUE>\n"); - - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -559,10 +562,10 @@ } sb->ft->appendChars(sb,"</INSTANCE>\n</IPARAMVALUE>\n"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); - -// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); if ((error = con->ft->getResponse(con, cop))) { @@ -570,7 +573,7 @@ return NULL; } -// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); +// 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); @@ -695,7 +698,7 @@ </CIM> */ -// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); if ((error = con->ft->getResponse(con, cop))) { @@ -703,7 +706,7 @@ return rc; } -// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); +// 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); @@ -770,7 +773,7 @@ sb->ft->appendChars(sb,"</IMETHODCALL>\n"); addXmlFooter(sb); -// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); +// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); if ((error = con->ft->getResponse(con, cop))) { @@ -778,7 +781,7 @@ return rc; } -// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); +// 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); @@ -846,14 +849,14 @@ sb->ft->appendChars(sb,"</IMETHODCALL>\n"); addXmlFooter(sb); -// fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); +// 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)); +// fprintf(stderr,"%s\n",con->mResponse->ft->getCharPtr(con->mResponse)); rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); @@ -868,7 +871,7 @@ CMSetStatus(rc, CMPI_RC_OK); return enm; } - fprintf(stderr,"rv: %x %d\n",rv,rv); +// fprintf(stderr,"rv: %x %d\n",rv,rv); CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); return NULL; } @@ -905,7 +908,8 @@ addXmlPropertyListParam(sb, properties); - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -914,7 +918,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)); rh = scanCimXmlResponse(con->mResponse->ft->getCharPtr(con->mResponse), cop); @@ -1035,7 +1039,8 @@ sb->ft->appendChars(sb,"</VALUE.ARRAY></IPARAMVALUE>\n"); } - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1143,7 +1148,8 @@ sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"ResultRole\"><VALUE>", resultRole, "</VALUE></IPARAMVALUE>\n"); - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1229,7 +1235,8 @@ sb->ft->appendChars(sb,"</VALUE.ARRAY></IPARAMVALUE>\n"); } - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1293,11 +1300,11 @@ 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, + if (role) sb->ft->append3Chars(sb, "<IPARAMVALUE NAME=\"Role\"><VALUE>", role, "</VALUE></IPARAMVALUE>\n"); - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1678,7 +1685,8 @@ addXmlClassnameParam(sb, cop); - sb->ft->appendChars(sb,"</IMETHODCALL></SIMPLEREQ>\n</MESSAGE></CIM>"); + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1698,7 +1706,7 @@ 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); + return rh.rvArray->ft->getElementAt(rh.rvArray, 0, NULL).value.cls; } CMSetStatusWithChars(rc,CMPI_RC_ERR_FAILED,"Unexpected return value"); @@ -1725,10 +1733,13 @@ /* Construct the CIM-XML request */ 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>"); + + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); @@ -1776,13 +1787,16 @@ /* Construct the CIM-XML request */ addXmlHeader(sb); sb->ft->appendChars(sb, "<IMETHODCALL NAME=\"EnumerateClasses\">"); + addXmlNamespace(sb, getNameSpaceComponents(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>"); + + sb->ft->appendChars(sb,"</IMETHODCALL>\n"); + addXmlFooter(sb); // fprintf(stderr,"%s\n",sb->ft->getCharPtr(sb)); con->ft->addPayload(con,sb); Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcc/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 20 Jun 2005 17:04:30 -0000 1.1 +++ Makefile.am 26 Jun 2005 21:46:02 -0000 1.2 @@ -26,7 +26,7 @@ cimXmlResp.y \ cimXmlParser.c -noinst_PROGRAMS=test +bin_PROGRAMS=test test_SOURCES = test.c test_LDADD = -lcmpisfcc Index: cimXmlResp.c =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cimXmlResp.c 20 Jun 2005 15:17:02 -0000 1.5 +++ cimXmlResp.c 26 Jun 2005 21:46:02 -0000 1.6 @@ -587,16 +587,16 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 129 +#define YYLAST 138 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 78 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 36 +#define YYNNTS 38 /* YYNRULES -- Number of rules. */ -#define YYNRULES 74 +#define YYNRULES 79 /* YYNRULES -- Number of states. */ -#define YYNSTATES 129 +#define YYNSTATES 137 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -650,13 +650,13 @@ static const unsigned char yyprhs[] = { 0, 0, 3, 7, 11, 15, 19, 23, 27, 30, - 33, 37, 41, 42, 46, 50, 54, 55, 57, 60, - 61, 63, 66, 67, 69, 72, 73, 75, 78, 83, - 87, 88, 91, 94, 97, 101, 102, 105, 110, 111, - 114, 118, 119, 122, 125, 129, 133, 137, 138, 141, - 144, 147, 152, 155, 157, 160, 164, 168, 169, 171, - 174, 177, 181, 187, 191, 194, 198, 203, 206, 211, - 214, 218, 220, 223, 228 + 33, 37, 41, 42, 46, 50, 54, 58, 59, 61, + 64, 65, 67, 70, 71, 73, 76, 77, 79, 82, + 83, 85, 88, 93, 98, 102, 103, 106, 109, 112, + 116, 117, 120, 125, 126, 129, 133, 134, 137, 140, + 144, 148, 152, 153, 156, 159, 162, 167, 170, 172, + 175, 179, 183, 184, 186, 189, 192, 196, 202, 206, + 209, 213, 218, 221, 226, 229, 233, 235, 238, 243 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -665,40 +665,41 @@ 79, 0, -1, 3, 4, 80, -1, 5, 81, 6, -1, 7, 82, 8, -1, 9, 83, 10, -1, 11, 84, 12, -1, 11, 85, 12, -1, 11, 12, -1, - 15, 16, -1, 17, 88, 18, -1, 17, 103, 18, + 15, 16, -1, 17, 88, 18, -1, 17, 105, 18, -1, -1, 17, 89, 18, -1, 17, 86, 18, -1, - 17, 87, 18, -1, -1, 91, -1, 86, 91, -1, - -1, 96, -1, 87, 96, -1, -1, 111, -1, 88, - 111, -1, -1, 90, -1, 89, 90, -1, 68, 110, - 96, 69, -1, 64, 92, 65, -1, -1, 92, 105, - -1, 92, 98, -1, 92, 93, -1, 62, 94, 63, - -1, -1, 94, 105, -1, 94, 54, 95, 55, -1, - -1, 95, 105, -1, 66, 97, 67, -1, -1, 97, - 105, -1, 97, 98, -1, 48, 99, 49, -1, 52, - 99, 53, -1, 50, 99, 51, -1, -1, 99, 105, - -1, 99, 100, -1, 99, 102, -1, 99, 32, 101, - 33, -1, 30, 31, -1, 100, -1, 101, 100, -1, - 34, 110, 35, -1, 34, 111, 35, -1, -1, 104, - -1, 103, 104, -1, 36, 37, -1, 46, 100, 47, - -1, 46, 32, 101, 33, 47, -1, 23, 107, 24, - -1, 25, 26, -1, 107, 25, 26, -1, 21, 109, - 106, 22, -1, 28, 29, -1, 72, 108, 111, 73, - -1, 38, 39, -1, 38, 112, 39, -1, 113, -1, - 112, 113, -1, 40, 42, 43, 41, -1, 40, 102, - 41, -1 + 17, 87, 18, -1, 17, 90, 18, -1, -1, 93, + -1, 86, 93, -1, -1, 98, -1, 87, 98, -1, + -1, 113, -1, 88, 113, -1, -1, 92, -1, 89, + 92, -1, -1, 91, -1, 90, 91, -1, 44, 113, + 98, 45, -1, 68, 112, 98, 69, -1, 64, 94, + 65, -1, -1, 94, 107, -1, 94, 100, -1, 94, + 95, -1, 62, 96, 63, -1, -1, 96, 107, -1, + 96, 54, 97, 55, -1, -1, 97, 107, -1, 66, + 99, 67, -1, -1, 99, 107, -1, 99, 100, -1, + 48, 101, 49, -1, 52, 101, 53, -1, 50, 101, + 51, -1, -1, 101, 107, -1, 101, 102, -1, 101, + 104, -1, 101, 32, 103, 33, -1, 30, 31, -1, + 102, -1, 103, 102, -1, 34, 112, 35, -1, 34, + 113, 35, -1, -1, 106, -1, 105, 106, -1, 36, + 37, -1, 46, 102, 47, -1, 46, 32, 103, 33, + 47, -1, 23, 109, 24, -1, 25, 26, -1, 109, + 25, 26, -1, 21, 111, 108, 22, -1, 28, 29, + -1, 72, 110, 113, 73, -1, 38, 39, -1, 38, + 114, 39, -1, 115, -1, 114, 115, -1, 40, 42, + 43, 41, -1, 40, 104, 41, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short yyrline[] = { 0, 418, 418, 424, 430, 439, 445, 448, 451, 457, - 464, 467, 470, 491, 494, 497, 507, 509, 516, 525, - 527, 535, 544, 546, 551, 559, 561, 569, 597, 611, - 626, 627, 632, 636, 643, 658, 659, 666, 680, 681, - 696, 708, 709, 714, 727, 731, 735, 742, 743, 747, - 753, 758, 782, 789, 796, 804, 809, 824, 826, 831, - 839, 850, 854, 868, 875, 879, 892, 900, 906, 950, - 957, 966, 976, 987, 993 + 464, 467, 470, 491, 494, 497, 500, 507, 509, 516, + 525, 527, 535, 544, 546, 551, 559, 561, 569, 579, + 581, 589, 604, 617, 631, 646, 647, 652, 656, 663, + 678, 679, 686, 700, 701, 716, 728, 729, 734, 747, + 751, 755, 762, 763, 767, 773, 778, 802, 809, 816, + 824, 829, 844, 846, 851, 859, 870, 874, 888, 895, + 899, 912, 920, 926, 970, 977, 986, 996, 1007, 1013 }; #endif @@ -732,12 +733,12 @@ "XTOK_LOCALCLASSPATH", "ZTOK_LOCALCLASSPATH", "$accept", "start", "cimOperation", "message", "simpleResp", "iMethodResp", "errorResp", "iReturnValue", "classes", "instances", "instanceNames", - "objectsWithPath", "objectWithPath", "class", "classData", "method", - "methodData", "parameter", "instance", "instanceData", "property", - "propertyData", "value", "valueArray", "valueReference", "classNames", - "className", "qualifier", "localNameSpacePath", "namespaces", - "nameSpacePath", "host", "instancePath", "instanceName", "keyBindings", - "keyBinding", 0 + "objectsWithPath", "namedInstances", "namedInstance", "objectWithPath", + "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 @@ -761,26 +762,26 @@ static const unsigned char yyr1[] = { 0, 78, 79, 80, 81, 82, 83, 83, 83, 84, - 85, 85, 85, 85, 85, 85, 86, 86, 86, 87, - 87, 87, 88, 88, 88, 89, 89, 89, 90, 91, - 92, 92, 92, 92, 93, 94, 94, 94, 95, 95, - 96, 97, 97, 97, 98, 98, 98, 99, 99, 99, - 99, 99, 100, 101, 101, 102, 102, 103, 103, 103, - 104, 105, 105, 106, 107, 107, 108, 109, 110, 111, - 111, 112, 112, 113, 113 + 85, 85, 85, 85, 85, 85, 85, 86, 86, 86, + 87, 87, 87, 88, 88, 88, 89, 89, 89, 90, + 90, 90, 91, 92, 93, 94, 94, 94, 94, 95, + 96, 96, 96, 97, 97, 98, 99, 99, 99, 100, + 100, 100, 101, 101, 101, 101, 101, 102, 103, 103, + 104, 104, 105, 105, 105, 106, 107, 107, 108, 109, + 109, 110, 111, 112, 113, 113, 114, 114, 115, 115 }; /* 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, 3, 0, 3, 3, 3, 0, 1, 2, 0, - 1, 2, 0, 1, 2, 0, 1, 2, 4, 3, - 0, 2, 2, 2, 3, 0, 2, 4, 0, 2, - 3, 0, 2, 2, 3, 3, 3, 0, 2, 2, - 2, 4, 2, 1, 2, 3, 3, 0, 1, 2, - 2, 3, 5, 3, 2, 3, 4, 2, 4, 2, - 3, 1, 2, 4, 3 + 3, 3, 0, 3, 3, 3, 3, 0, 1, 2, + 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, + 1, 2, 4, 4, 3, 0, 2, 2, 2, 3, + 0, 2, 4, 0, 2, 3, 0, 2, 2, 3, + 3, 3, 0, 2, 2, 2, 4, 2, 1, 2, + 3, 3, 0, 1, 2, 2, 3, 5, 3, 2, + 3, 4, 2, 4, 2, 3, 1, 2, 4, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -789,56 +790,58 @@ static const unsigned char yydefact[] = { 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, - 0, 3, 0, 0, 4, 8, 0, 16, 0, 0, - 5, 9, 0, 0, 30, 41, 0, 0, 0, 0, - 0, 26, 17, 20, 0, 58, 23, 6, 7, 60, - 69, 0, 0, 71, 0, 0, 0, 0, 14, 18, - 15, 21, 10, 24, 13, 27, 11, 59, 0, 0, - 0, 70, 72, 0, 47, 47, 47, 35, 29, 33, - 32, 31, 40, 43, 42, 0, 0, 0, 0, 0, - 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 55, 56, 73, 52, 53, 0, 61, - 0, 44, 49, 50, 48, 46, 45, 38, 34, 36, - 67, 0, 0, 68, 0, 54, 0, 0, 0, 0, - 66, 62, 51, 37, 39, 64, 63, 0, 65 + 0, 3, 0, 0, 4, 8, 0, 17, 0, 0, + 5, 9, 0, 0, 0, 35, 46, 0, 0, 0, + 0, 0, 0, 30, 27, 18, 21, 0, 63, 24, + 6, 7, 65, 74, 0, 0, 76, 0, 0, 0, + 0, 0, 14, 19, 15, 22, 10, 25, 13, 28, + 16, 31, 11, 64, 0, 0, 0, 75, 77, 0, + 0, 52, 52, 52, 40, 34, 38, 37, 36, 45, + 48, 47, 0, 0, 0, 0, 0, 0, 79, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 33, 60, 61, 78, 57, 58, 0, 66, 0, 49, + 54, 55, 53, 51, 50, 43, 39, 41, 72, 0, + 0, 73, 0, 59, 0, 0, 0, 0, 71, 67, + 56, 42, 44, 69, 68, 0, 70 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yysigned_char yydefgoto[] = { - -1, 2, 6, 8, 10, 13, 18, 19, 27, 28, - 29, 30, 31, 32, 44, 69, 88, 117, 33, 45, - 70, 85, 102, 98, 103, 34, 35, 104, 112, 119, - 76, 90, 47, 36, 42, 43 + -1, 2, 6, 8, 10, 13, 18, 19, 28, 29, + 30, 31, 32, 33, 34, 35, 48, 76, 96, 125, + 36, 49, 77, 93, 110, 106, 111, 37, 38, 112, + 120, 127, 83, 98, 51, 39, 45, 46 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -62 +#define YYPACT_NINF -68 static const yysigned_char yypact[] = { - 21, 31, 47, 26, -62, 49, -62, 40, 52, 61, - 62, -62, 59, 69, -62, -62, 75, -23, 80, 81, - -62, -62, 57, 42, -62, -62, 25, -13, -14, -10, - -15, -62, -62, -62, -9, -62, -62, -62, -62, -62, - -62, 0, 45, -62, 13, -29, 74, 30, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -32, 55, - 58, -62, -62, -12, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, 72, 64, 32, 68, 70, - 65, -62, 73, 77, 66, 34, 16, -20, 23, 79, - 86, 37, -62, -62, -62, -62, -62, -62, -1, -62, - 77, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, 87, 89, -62, 67, -62, 27, -30, 90, 63, - -62, -62, -62, -62, -62, -62, -62, 91, -62 + 7, 11, 50, 66, -68, 75, -68, 82, 86, 83, + 85, -68, 61, 87, -68, -68, 79, -19, 84, 88, + -68, -68, 62, 46, 60, -68, -68, 29, -12, -13, + 0, -14, -11, -68, -68, -68, -68, -5, -68, -68, + -68, -68, -68, -68, 21, 48, -68, 36, 18, -16, + 89, 36, -68, -68, -68, -68, -68, -68, -68, -68, + -68, -68, -68, -68, -29, 63, 64, -68, -68, 58, + -9, -68, -68, -68, -68, -68, -68, -68, -68, -68, + -68, -68, 76, 60, 38, 73, 74, 70, -68, -68, + 81, 90, 67, 35, 28, -18, -17, 92, 93, 40, + -68, -68, -68, -68, -68, -68, 26, -68, 90, -68, + -68, -68, -68, -68, -68, -68, -68, -68, -68, 94, + 95, -68, 68, -68, 42, -35, 96, 2, -68, -68, + -68, -68, -68, -68, -68, 97, -68 }; /* YYPGOTO[NTERM-NUM]. */ static const yysigned_char yypgoto[] = { - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, 85, 92, -62, -62, -62, -62, -17, -62, - 76, 24, -61, 18, 82, -62, 88, -44, -62, -62, - -62, -62, 71, -22, -62, 78 + -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, + -68, -68, -68, 98, 100, 99, -68, -68, -68, -68, + -7, -68, 69, 17, -67, 16, 91, -68, 101, -48, + -68, -68, -68, -68, 65, -22, -68, 80 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -848,36 +851,38 @@ #define YYTABLE_NINF -1 static const unsigned char yytable[] = { - 71, 74, 84, 54, 50, 48, 23, 53, 52, 56, - 82, 51, 100, 22, 58, 23, 63, 63, 82, 64, - 83, 65, 97, 66, 1, 123, 63, 22, 23, 82, - 77, 5, 114, 106, 58, 3, 79, 115, 72, 97, - 46, 24, 59, 25, 109, 26, 82, 4, 100, 9, - 58, 24, 25, 26, 91, 115, 7, 82, 11, 63, - 122, 64, 63, 65, 82, 66, 100, 105, 58, 63, - 14, 15, 12, 124, 16, 67, 17, 107, 68, 20, - 63, 40, 41, 101, 61, 41, 108, 126, 127, 86, - 87, 21, 37, 38, 39, 75, 25, 46, 80, 81, - 89, 92, 23, 93, 96, 94, 95, 82, 110, 111, - 113, 120, 118, 99, 121, 55, 125, 128, 116, 49, - 62, 73, 57, 60, 0, 0, 0, 0, 0, 78 + 78, 81, 47, 92, 58, 54, 52, 60, 57, 23, + 1, 70, 90, 62, 108, 3, 64, 22, 56, 23, + 131, 90, 55, 91, 105, 24, 134, 135, 70, 70, + 70, 22, 71, 24, 72, 114, 73, 115, 23, 123, + 69, 105, 86, 50, 84, 25, 116, 26, 117, 27, + 4, 79, 25, 26, 27, 64, 90, 123, 90, 122, + 108, 99, 64, 65, 70, 90, 71, 108, 72, 64, + 73, 5, 90, 15, 70, 130, 16, 132, 17, 113, + 74, 70, 7, 75, 109, 43, 44, 67, 44, 94, + 95, 9, 11, 14, 12, 21, 40, 20, 23, 42, + 41, 50, 26, 89, 97, 88, 87, 100, 101, 102, + 82, 103, 104, 121, 107, 129, 119, 128, 80, 126, + 90, 118, 133, 136, 124, 68, 0, 53, 0, 85, + 61, 59, 0, 0, 0, 66, 0, 0, 63 }; static const yysigned_char yycheck[] = { - 44, 45, 63, 18, 18, 18, 38, 29, 18, 18, - 30, 28, 32, 36, 34, 38, 46, 46, 30, 48, - 32, 50, 83, 52, 3, 55, 46, 36, 38, 30, - 47, 5, 33, 53, 34, 4, 58, 98, 67, 100, - 72, 64, 42, 66, 88, 68, 30, 0, 32, 9, - 34, 64, 66, 68, 76, 116, 7, 30, 6, 46, - 33, 48, 46, 50, 30, 52, 32, 51, 34, 46, - 8, 12, 11, 117, 15, 62, 17, 54, 65, 10, - 46, 39, 40, 49, 39, 40, 63, 24, 25, 65, - 66, 16, 12, 12, 37, 21, 66, 72, 43, 41, - 28, 69, 38, 35, 31, 35, 41, 30, 29, 23, - 73, 22, 25, 47, 47, 30, 26, 26, 100, 27, - 42, 45, 34, 41, -1, -1, -1, -1, -1, 58 + 48, 49, 24, 70, 18, 18, 18, 18, 30, 38, + 3, 46, 30, 18, 32, 4, 34, 36, 18, 38, + 55, 30, 29, 32, 91, 44, 24, 25, 46, 46, + 46, 36, 48, 44, 50, 53, 52, 54, 38, 106, + 47, 108, 64, 72, 51, 64, 63, 66, 96, 68, + 0, 67, 64, 66, 68, 34, 30, 124, 30, 33, + 32, 83, 34, 42, 46, 30, 48, 32, 50, 34, + 52, 5, 30, 12, 46, 33, 15, 125, 17, 51, + 62, 46, 7, 65, 49, 39, 40, 39, 40, 72, + 73, 9, 6, 8, 11, 16, 12, 10, 38, 37, + 12, 72, 66, 45, 28, 41, 43, 69, 35, 35, + 21, 41, 31, 73, 47, 47, 23, 22, 49, 25, + 30, 29, 26, 26, 108, 45, -1, 28, -1, 64, + 32, 31, -1, -1, -1, 44, -1, -1, 37 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -886,17 +891,18 @@ { 0, 3, 79, 4, 0, 5, 80, 7, 81, 9, 82, 6, 11, 83, 8, 12, 15, 17, 84, 85, - 10, 16, 36, 38, 64, 66, 68, 86, 87, 88, - 89, 90, 91, 96, 103, 104, 111, 12, 12, 37, - 39, 40, 112, 113, 92, 97, 72, 110, 18, 91, - 18, 96, 18, 111, 18, 90, 18, 104, 34, 42, - 102, 39, 113, 46, 48, 50, 52, 62, 65, 93, - 98, 105, 67, 98, 105, 21, 108, 96, 110, 111, - 43, 41, 30, 32, 100, 99, 99, 99, 94, 28, - 109, 111, 69, 35, 35, 41, 31, 100, 101, 47, - 32, 49, 100, 102, 105, 51, 53, 54, 63, 105, - 29, 23, 106, 73, 33, 100, 101, 95, 25, 107, - 22, 47, 33, 55, 105, 26, 24, 25, 26 + 10, 16, 36, 38, 44, 64, 66, 68, 86, 87, + 88, 89, 90, 91, 92, 93, 98, 105, 106, 113, + 12, 12, 37, 39, 40, 114, 115, 113, 94, 99, + 72, 112, 18, 93, 18, 98, 18, 113, 18, 92, + 18, 91, 18, 106, 34, 42, 104, 39, 115, 98, + 46, 48, 50, 52, 62, 65, 95, 100, 107, 67, + 100, 107, 21, 110, 98, 112, 113, 43, 41, 45, + 30, 32, 102, 101, 101, 101, 96, 28, 111, 113, + 69, 35, 35, 41, 31, 102, 103, 47, 32, 49, + 102, 104, 107, 51, 53, 54, 63, 107, 29, 23, + 108, 73, 33, 102, 103, 97, 25, 109, 22, 47, + 33, 55, 107, 26, 24, 25, 26 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -1585,7 +1591,13 @@ } break; - case 17: + case 16: +#line 501 "cimXmlResp.y" + { + } + break; + + case 18: #line 510 "cimXmlResp.y" { PARM->curClass=native_new_CMPIConstClass(yyvsp[0].xtokClass.className,NULL); @@ -1595,7 +1607,7 @@ } break; - case 18: + case 19: #line 517 "cimXmlResp.y" { PARM->curClass=native_new_CMPIConstClass(yyvsp[0].xtokClass.className,NULL); @@ -1605,7 +1617,7 @@ } break; - case 20: + case 21: #line 528 "cimXmlResp.y" { PARM->curInstance=native_new_CMPIInstance(NULL,NULL); @@ -1616,7 +1628,7 @@ } break; - case 21: + case 22: #line 536 "cimXmlResp.y" { PARM->curInstance=native_new_CMPIInstance(NULL,NULL); @@ -1626,7 +1638,7 @@ } break; - case 23: + case 24: #line 547 "cimXmlResp.y" { simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); @@ -1634,7 +1646,7 @@ } break; - case 24: + case 25: #line 552 "cimXmlResp.y" { // setInstNsAndCn(PARM->curInstance,PARM->nameSpace,$2.className); @@ -1643,7 +1655,7 @@ } break; - case 26: + case 27: #line 562 "cimXmlResp.y" { PARM->curInstance=native_new_CMPIInstance(NULL,NULL); @@ -1654,7 +1666,7 @@ } break; - case 27: + case 28: #line 570 "cimXmlResp.y" { PARM->curInstance=native_new_CMPIInstance(NULL,NULL); @@ -1664,16 +1676,45 @@ } break; - case 28: -#line 598 "cimXmlResp.y" + case 30: +#line 582 "cimXmlResp.y" + { + PARM->curInstance=native_new_CMPIInstance(NULL,NULL); + setInstNsAndCn(PARM->curInstance,PARM->nameSpace,yyvsp[0].xtokNamedInstance.instance.className); + setInstProperties(PARM->curInstance,&PARM->properties); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); + PARM->curInstance=NULL; + } + break; + + case 31: +#line 590 "cimXmlResp.y" + { + PARM->curInstance=native_new_CMPIInstance(NULL,NULL); + setInstNsAndCn(PARM->curInstance,PARM->nameSpace,yyvsp[0].xtokNamedInstance.instance.className); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); + PARM->curInstance=NULL; + } + break; + + case 32: +#line 605 "cimXmlResp.y" + { + yyval.xtokNamedInstance.path=yyvsp[-2].xtokInstanceName; + yyval.xtokNamedInstance.instance=yyvsp[-1].xtokInstance; + } + break; + + case 33: +#line 618 "cimXmlResp.y" { yyval.xtokObjectWithPath.path=yyvsp[-2].xtokInstancePath; yyval.xtokObjectWithPath.instance=yyvsp[-1].xtokInstance; } break; - case 29: -#line 612 "cimXmlResp.y" + case 34: +#line 632 "cimXmlResp.y" { if (PARM->Qs) yyval.xtokClass.qualifiers=PARM->qualifiers; @@ -1687,37 +1728,37 @@ } break; - case 30: -#line 626 "cimXmlResp.y" + case 35: +#line 646 "cimXmlResp.y" {;} break; - case 31: -#line 628 "cimXmlResp.y" + case 36: +#line 648 "cimXmlResp.y" { PARM->Qs++; addQualifier(&(PARM->qualifiers),&yyvsp[0].xtokQualifier); } break; - case 32: -#line 632 "cimXmlResp.y" + case 37: +#line 652 "cimXmlResp.y" { PARM->Ps++; addProperty(&(PARM->properties),&yyvsp[0].xtokProperty); } break; - case 33: -#line 636 "cimXmlResp.y" + case 38: +#line 656 "cimXmlResp.y" { PARM->Ms++; addMethod(&(PARM->methods),&yyvsp[0].xtokMethod); } break; - case 34: -#line 644 "cimXmlResp.y" + case 39: +#line 664 "cimXmlResp.y" { if (PARM->MQs) yyval.xtokMethod.qualifiers=yyvsp[-1].xtokMethodData.qualifiers; @@ -1731,13 +1772,13 @@ } break; - case 35: -#line 658 "cimXmlResp.y" + case 40: +#line 678 "cimXmlResp.y" {;} break; - case 36: -#line 660 "cimXmlResp.y" + case 41: +#line 680 "cimXmlResp.y" { if (PARM->MQs==0) memset(&yyval.xtokMethodData.qualifiers,0,sizeof(yyval.xtokMethodData.qualifiers)); @@ -1746,8 +1787,8 @@ } break; - case 37: -#line 667 "cimXmlResp.y" + case 42: +#line 687 "cimXmlResp.y" { if (PARM->MPs==0) memset(&yyval.xtokMethodData.params,0,sizeof(yyval.xtokMethodData.params)); @@ -1760,13 +1801,13 @@ } break; - case 38: -#line 680 "cimXmlResp.y" + case 43: +#line 700 "cimXmlResp.y" {;} break; - case 39: -#line 682 "cimXmlResp.y" + case 44: +#line 702 "cimXmlResp.y" { if (PARM->MPQs==0) memset(&yyval.xtokParam.qualifiers,0,sizeof(yyval.xtokParam.qualifiers)); @@ -1775,8 +1816,8 @@ } break; - case 40: -#line 697 "cimXmlResp.y" + case 45: +#line 717 "cimXmlResp.y" { if (PARM->Qs) yyval.xtokInstance.qualifiers=PARM->qualifiers; @@ -1787,62 +1828,62 @@ } break; - case 41: -#line 708 "cimXmlResp.y" + case 46: +#line 728 "cimXmlResp.y" {;} break; - case 42: -#line 710 "cimXmlResp.y" + case 47: +#line 730 "cimXmlResp.y" { PARM->Qs++; addQualifier(&(PARM->qualifiers),&yyvsp[0].xtokQualifier); } break; - case 43: -#line 715 "cimXmlResp.y" + case 48: +#line 735 "cimXmlResp.y" { PARM->Ps++; addProperty(&(PARM->properties),&yyvsp[0].xtokProperty); } break; - case 44: -#line 728 "cimXmlResp.y" + case 49: +#line 748 "cimXmlResp.y" { yyval.xtokProperty.val=yyvsp[-1].xtokPropertyData; } break; - case 45: -#line 732 "cimXmlResp.y" + case 50: +#line 752 "cimXmlResp.y" { yyval.xtokProperty.val=yyvsp[-1].xtokPropertyData; } break; - case 46: -#line 736 "cimXmlResp.y" + case 51: +#line 756 "cimXmlResp.y" { yyval.xtokProperty.val=yyvsp[-1].xtokPropertyData; } break; - case 47: -#line 742 "cimXmlResp.y" + case 52: +#line 762 "cimXmlResp.y" {yyval.xtokPropertyData.null=1;} break; - case 48: -#line 744 "cimXmlResp.y" + case 53: +#line 764 "cimXmlResp.y" { addQualifier(&(PARM->qualifiers),&yyvsp[0].xtokQualifier); } break; - case 49: -#line 748 "cimXmlResp.y" + case 54: +#line 768 "cimXmlResp.y" { // printf("--- value: %s\n",$1.value); yyval.xtokPropertyData.value=yyvsp[0].xtokValue.value; @@ -1850,16 +1891,16 @@ } break; - case 50: -#line 754 "cimXmlResp.y" + case 55: +#line 774 "cimXmlResp.y" { yyval.xtokPropertyData.ref=yyvsp[0].xtokValueReference; yyval.xtokPropertyData.null=0; } break; - case 51: -#line 759 "cimXmlResp.y" + case 56: +#line 779 "cimXmlResp.y" { // printf("--- valueArray: \n"); yyval.xtokPropertyData.array=yyvsp[-2].xtokValueArray; @@ -1867,100 +1908,100 @@ } break; - case 52: -#line 783 "cimXmlResp.y" + case 57: +#line 803 "cimXmlResp.y" { yyval.xtokValue.value=yyvsp[-1].xtokValue.value; } break; - case 53: -#line 790 "cimXmlResp.y" + case 58: +#line 810 "cimXmlResp.y" { yyval.xtokValueArray.next=1; - yyval.xtokValueArray.max=64; - yyval.xtokValueArray.values=(char**)malloc(sizeof(char*)*64); + yyval.xtokValueArray.max=128; + yyval.xtokValueArray.values=(char**)malloc(sizeof(char*)*128); yyval.xtokValueArray.values[0]=yyvsp[0].xtokValue.value; } break; - case 54: -#line 797 "cimXmlResp.y" + case 59: +#line 817 "cimXmlResp.y" { yyval.xtokValueArray.values[yyval.xtokValueArray.next]=yyvsp[0].xtokValue.value; yyval.xtokValueArray.next++; } break; - case 55: -#line 805 "cimXmlResp.y" + case 60: +#line 825 "cimXmlResp.y" { yyval.xtokValueReference.instancePath=yyvsp[-1].xtokInstancePath; yyval.xtokValueReference.type=typeValRef_InstancePath; } break; - case 56: -#line 810 "cimXmlResp.y" + case 61: +#line 830 "cimXmlResp.y" { yyval.xtokValueReference.instanceName=yyvsp[-1].xtokInstanceName; yyval.xtokValueReference.type=typeValRef_InstanceName; } break; - case 58: -#line 827 "cimXmlResp.y" + case 63: +#line 847 "cimXmlResp.y" { simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } break; - case 59: -#line 832 "cimXmlResp.y" + case 64: +#line 852 "cimXmlResp.y" { simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curPath,CMPI_ref); PARM->curPath=NULL; } break; - case 60: -#line 840 "cimXmlResp.y" + case 65: +#line 860 "cimXmlResp.y" { createClassPath(&PARM->curPath, NULL, yyval.className); } break; - case 61: -#line 851 "cimXmlResp.y" + case 66: +#line 871 "cimXmlResp.y" { yyval.xtokQualifier.value=yyvsp[-1].xtokValue.value; } break; - case 62: -#line 855 "cimXmlResp.y" + case 67: +#line 875 "cimXmlResp.y" { // $$.value=$2.value; } break; - case 63: -#line 869 "cimXmlResp.y" + case 68: +#line 889 "cimXmlResp.y" { yyval.xtokLocalNameSpacePath=yyvsp[-1].xtokNameSpace.cns; } break; - case 64: -#line 876 "cimXmlResp.y" + case 69: +#line 896 "cimXmlResp.y" { yyval.xtokNameSpace.cns=strdup(yyvsp[-1].xtokNameSpace.ns); } break; - case 65: -#line 880 "cimXmlResp.y" + case 70: +#line 900 "cimXmlResp.y" { int l=strlen(yyvsp[-2].xtokNameSpace.cns)+strlen(yyvsp[-1].xtokNameSpace.ns)+2; yyval.xtokNameSpace.cns=(char*)malloc(l); @@ -1971,22 +2012,22 @@ } break; - case 66: -#line 893 "cimXmlResp.y" + case 71: +#line 913 "cimXmlResp.y" { yyval.xtokNameSpacePath.host=yyvsp[-2].xtokHost; yyval.xtokNameSpacePath.nameSpacePath=yyvsp[-1].xtokLocalNameSpacePath; } break; - case 67: -#line 901 "cimXmlResp.y" + case 72: +#line 921 "cimXmlResp.y" { } break; - case 68: -#line 907 "cimXmlResp.y" + case 73: +#line 927 "cimXmlResp.y" { yyval.xtokInstancePath.path=yyvsp[-2].xtokNameSpacePath; yyval.xtokInstancePath.instanceName=yyvsp[-1].xtokInstanceName; @@ -1994,8 +2035,8 @@ } break; - case 69: -#line 951 "cimXmlResp.y" + case 74: +#line 971 "cimXmlResp.y" { yyval.xtokInstanceName.className=yyvsp[-1].xtokInstanceName.className; yyval.xtokInstanceName.bindings.next=0; @@ -2004,8 +2045,8 @@ } break; - case 70: -#line 958 "cimXmlResp.y" + case 75: +#line 978 "cimXmlResp.y" { yyval.xtokInstanceName.className=yyvsp[-2].xtokInstanceName.className; yyval.xtokInstanceName.bindings=yyvsp[-1].xtokKeyBindings; @@ -2013,8 +2054,8 @@ } break; - case 71: -#line 967 "cimXmlResp.y" + case 76: +#line 987 "cimXmlResp.y" { yyval.xtokKeyBindings.next=1; yyval.xtokKeyBindings.max=16; @@ -2026,8 +2067,8 @@ } break; - case 72: -#line 977 "cimXmlResp.y" + case 77: +#line 997 "cimXmlResp.y" { yyval.xtokKeyBindings.keyBindings[yyval.xtokKeyBindings.next].name=yyvsp[0].xtokKeyBinding.name; yyval.xtokKeyBindings.keyBindings[yyval.xtokKeyBindings.next].value=yyvsp[0].xtokKeyBinding.value; @@ -2037,8 +2078,8 @@ } break; - case 73: -#line 988 "cimXmlResp.y" + case 78: +#line 1008 "cimXmlResp.y" { yyval.xtokKeyBinding.name=yyvsp[-3].xtokKeyBinding.name; yyval.xtokKeyBinding.value=yyvsp[-2].xtokKeyValue.value; @@ -2046,8 +2087,8 @@ } break; - case 74: -#line 994 "cimXmlResp.y" + case 79: +#line 1014 "cimXmlResp.y" { yyval.xtokKeyBinding.name=yyvsp[-2].xtokKeyBinding.name; yyval.xtokKeyBinding.value=NULL; @@ -2060,7 +2101,7 @@ } /* Line 999 of yacc.c. */ -#line 2063 "cimXmlResp.c" +#line 2104 "cimXmlResp.c" yyvsp -= yylen; yyssp -= yylen; @@ -2254,6 +2295,6 @@ } -#line 1002 "cimXmlResp.y" +#line 1022 "cimXmlResp.y" Index: cmci.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmci.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cmci.h 13 Jun 2005 23:50:46 -0000 1.6 +++ cmci.h 26 Jun 2005 21:46:02 -0000 1.7 @@ -22,6 +22,9 @@ #ifndef _CMPIC_H_ #define _CMPIC_H_ +struct _CMPIConstClass; +typedef struct _CMPIConstClass CMPIConstClass; + #include "cmcidt.h" #include "cmcift.h" #include "cmcimacs.h" @@ -57,9 +60,6 @@ struct _ClientEnc; typedef struct _ClientEnc ClientEnc; -struct _CMPIConstClass; -typedef struct _CMPIConstClass CMPIConstClass; - typedef struct _CMCIClientFT { /** Get Class using <op> as reference. Class structure can be Index: cimXmlParser.c =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlParser.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cimXmlParser.c 20 Jun 2005 15:04:18 -0000 1.3 +++ cimXmlParser.c 26 Jun 2005 21:46:02 -0000 1.4 @@ -158,7 +158,7 @@ char *ptr, wa[32]; char msg1[] = { "Unknown attribute in list for " }; char msg2[] = { "Bad attribute list for " }; - char word[11]; + char word[32]; for (n = 0; (e + n)->attr; n++) wa[n] = 0; @@ -209,12 +209,14 @@ return 1; } - ptr = (char *) alloca(strlen(tag) + strlen(msg2) + 48); + ptr = (char *) alloca(strlen(tag) + strlen(msg2) + 96); strcpy(ptr, msg2); strcat(ptr, tag); strcat(ptr, ": "); - strncpy(word, xb->cur, 10); - strcat(ptr, word); + strncpy(word, xb->cur, 30); + word[30]=0; + strcat(ptr, word); + strcat(ptr," "); strcat(ptr, tag); Throw(xb, ptr); return -1; Index: test.c =================================================================== RCS file: /cvsroot/sblim/sfcc/test.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- test.c 23 Jun 2005 22:54:12 -0000 1.12 +++ test.c 26 Jun 2005 21:46:02 -0000 1.13 @@ -86,9 +86,13 @@ CMPIEnumeration * enumeration; CMPIConstClass * class; CMPIStatus status; + char hostName[512]; /* Setup a conncetion to the CIMOM */ cc = cmciConnect("localhost",NULL,NULL,NULL,NULL); + + gethostname(hostName,511); + _HOSTNAME=strdup(hostName); if (1) { /* Test enumClassNames() */ @@ -123,7 +127,7 @@ printf("result(s):\n"); while (enumeration->ft->hasNext(enumeration, NULL)) { CMPIData data = enumeration->ft->getNext(enumeration, NULL); -// How get class data out of data.value.???; + showClass(data.value.cls); } } if (enumeration) CMRelease(enumeration); @@ -167,7 +171,7 @@ if (objectpath) CMRelease(objectpath); } - if (0) { + if (1) { /* Test enumInstances() */ printf("\n----------------------------------------------------------\n"); printf("Testing enumInstances() ...\n"); Index: cimXmlResp.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cimXmlResp.h 20 Jun 2005 15:04:18 -0000 1.4 +++ cimXmlResp.h 26 Jun 2005 21:46:02 -0000 1.5 @@ -228,7 +228,7 @@ XtokParam xtokParam; } YYSTYPE; /* Line 1240 of yacc.c. */ -#line 231 "cimXmlResp.h" +#line 231 "y.tab.h" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 Index: cimXmlResp.y =================================================================== RCS file: /cvsroot/sblim/sfcc/cimXmlResp.y,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cimXmlResp.y 20 Jun 2005 15:17:02 -0000 1.5 +++ cimXmlResp.y 26 Jun 2005 21:46:02 -0000 1.6 @@ -496,10 +496,10 @@ } | XTOK_IRETVALUE instances ZTOK_IRETVALUE { - } /* - | XTOK_IRETVALUE valueNamedInstances ZTOK_IRETVALUE + } + | XTOK_IRETVALUE namedInstances ZTOK_IRETVALUE { - } */ + } ; @@ -576,6 +576,26 @@ ; +namedInstances + : /* empty */ + | namedInstance + { + PARM->curInstance=native_new_CMPIInstance(NULL,NULL); + setInstNsAndCn(PARM->curInstance,PARM->nameSpace,$1.instance.className); + setInstProperties(PARM->curInstance,&PARM->properties); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); + PARM->curInstance=NULL; + } + | namedInstances namedInstance + { + PARM->curInstance=native_new_CMPIInstance(NULL,NULL); + setInstNsAndCn(PARM->curInstance,PARM->nameSpace,$2.instance.className); + simpleArrayAdd(PARM->respHdr.rvArray,(CMPIValue*)&PARM->curInstance,CMPI_instance); + PARM->curInstance=NULL; + } +; + + /* * valueNamedInstance */ @@ -789,8 +809,8 @@ : value { $$.next=1; - $$.max=64; - $$.values=(char**)malloc(sizeof(char*)*64); + $$.max=128; + $$.values=(char**)malloc(sizeof(char*)*128); $$.values[0]=$1.value; } | valueArray value Index: cmcidt.h =================================================================== RCS file: /cvsroot/sblim/sfcc/cmcidt.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cmcidt.h 4 May 2005 18:17:47 -0000 1.2 +++ cmcidt.h 26 Jun 2005 21:46:02 -0000 1.3 @@ -185,6 +185,9 @@ CMPIBoolean boolean; CMPIChar16 char16; +#ifdef _CMPIC_H_ + CMPIConstClass* cls; +#endif CMPIInstance* inst; CMPIObjectPath* ref; CMPIArgs* args; |
|
From: Viktor M. <mih...@us...> - 2005-06-24 16:02:45
|
Update of /cvsroot/sblim/gather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6739 Modified Files: Makefile.am configure.ac Added Files: sblim-gather.spec.in Log Message: Added RPM support. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/gather/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 24 Jun 2005 14:30:27 -0000 1.2 +++ configure.ac 24 Jun 2005 16:02:35 -0000 1.3 @@ -79,7 +79,7 @@ # Check for SBLIM Test Suite (defined in acinclude.m4) CHECK_TESTSUITE -AC_CONFIG_FILES([Makefile provider/Makefile]) +AC_CONFIG_FILES([Makefile sblim-gather.spec provider/Makefile]) AC_SUBST(ARCHDEF) Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/gather/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 24 Jun 2005 12:09:36 -0000 1.1 +++ Makefile.am 24 Jun 2005 16:02:35 -0000 1.2 @@ -181,7 +181,7 @@ EXTRA_DIST += $(sysconf_DATA) # We must explicity add the RPM spec file to the distribution package -#EXTRA_DIST+=sblim-cmpi-fad.spec +EXTRA_DIST+=sblim-gather.spec EXTRA_DIST += samples --- NEW FILE: sblim-gather.spec.in --- # # $Id: sblim-gather.spec.in,v 1.1 2005/06/24 16:02:35 mihajlov Exp $ # # Package spec for @PACKAGE@ # BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: SBLIM Performance Data Gatherer Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: 1 Group: Systems Management/Base License: Common Public License 1.0 Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 BuildRequires: cmpi-devel BuildRequires: sblim-cmpi-base-devel Requires: cimserver Requires: sblim-cmpi-base %Description Standards Based Linux Instrumentation Performance Data Gatherer and Providers %Package test Summary: SBLIM Gatherer Testcase Files Group: Systems Management/Base Requires: %{name} = %{version} Requires: sblim-wbemcli %Description test SBLIM Gatherer Testcase Files for the SBLIM Testsuite %prep %setup -n %{name}-%{version} export PATCH_GET=0 #%patch0 -p0 %build %configure TESTSUITEDIR=%{_datadir}/sblim-testsuite make %clean if [ `id -ur` != 0 ] then # paranoia check rm -rf $RPM_BUILD_ROOT fi %install if [ `id -ur` != 0 ] then # paranoia check rm -rf $RPM_BUILD_ROOT fi make DESTDIR=$RPM_BUILD_ROOT install # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a %post # Register Schema and Provider - this is higly provider specific %define SCHEMA %{_datadir}/%{name}/Linux_Metric.mof \ %{_datadir}/%{name}/Linux_IPProtocolEndpointMetric.mof \ %{_datadir}/%{name}/Linux_LocalFileSystemMetric.mof \ %{_datadir}/%{name}/Linux_NetworkPortMetric.mof \ %{_datadir}/%{name}/Linux_OperatingSystemMetric.mof \ %{_datadir}/%{name}/Linux_ProcessorMetric.mof \ %{_datadir}/%{name}/Linux_UnixProcessMetric.mof %define REGISTRATION %{_datadir}/%{name}/Linux_IPProtocolEndpointMetric.registration \ %{_datadir}/%{name}/Linux_LocalFileSystemMetric.registration \ %{_datadir}/%{name}/Linux_Metric.registration \ %{_datadir}/%{name}/Linux_NetworkPortMetric.registration \ %{_datadir}/%{name}/Linux_OperatingSystemMetric.registration \ %{_datadir}/%{name}/Linux_ProcessorMetric.registration \ %{_datadir}/%{name}/Linux_UnixProcessMetric.registration %{_datadir}/%{name}/provider-register.sh \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null /sbin/ldconfig %preun %{_datadir}/%{name}/provider-register.sh -d \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null %postun /sbin/ldconfig %files %defattr(-,root,root) %{_sysconfdir} %{_bindir} %{_sbindir} %{_datadir}/%{name} %{_datadir}/doc/%{name}-%{version} %{_libdir}/*.so* %{_libdir}/cmpi/*.so* %files test %defattr(-,root,root) %{_datadir}/sblim-testsuite |
|
From: Viktor M. <mih...@us...> - 2005-06-24 14:30:57
|
Update of /cvsroot/sblim/gather/provider In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25229/provider Modified Files: .cvsignore Makefile.am Removed Files: AUTHORS COPYING ChangeLog NEWS README acinclude.m4 configure.ac Log Message: Changed to have only one configure script -> size reduction of distribution tarball. Index: .cvsignore =================================================================== RCS file: /cvsroot/sblim/gather/provider/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 15 Dec 2004 07:27:25 -0000 1.1 +++ .cvsignore 24 Jun 2005 14:30:27 -0000 1.2 @@ -1 +1,2 @@ -*.d +Makefile.in + --- acinclude.m4 DELETED --- --- configure.ac DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/gather/provider/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 24 Jun 2005 12:04:56 -0000 1.1 +++ Makefile.am 24 Jun 2005 14:30:27 -0000 1.2 @@ -38,7 +38,7 @@ providerdir = @PROVIDERDIR@ # Generally useful flags -AM_CPPFLAGS = -I $(srcdir)/.. -I $(srcdir)/../util -I $(srcdir)/../comms +AM_CPPFLAGS = -I $(srcdir)/../util -I $(srcdir)/../comms AM_CFLAGS = -Wall AM_LDFLAGS = -L.. --- COPYING DELETED --- --- ChangeLog DELETED --- --- README DELETED --- --- NEWS DELETED --- --- AUTHORS DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 14:30:57
|
Update of /cvsroot/sblim/gather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25229 Modified Files: .cvsignore autoconfiscate.sh configure.ac Added Files: acinclude.m4 Log Message: Changed to have only one configure script -> size reduction of distribution tarball. Index: .cvsignore =================================================================== RCS file: /cvsroot/sblim/gather/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 15 Dec 2004 07:27:25 -0000 1.1 +++ .cvsignore 24 Jun 2005 14:30:27 -0000 1.2 @@ -1,5 +1,8 @@ -*.d reposctl reposd gatherctl gatherd +Makefile.in +config.h.in +aclocal.m4 +configure --- NEW FILE: acinclude.m4 --- dnl dnl $Id: acinclude.m4,v 1.1 2005/06/24 14:30:27 mihajlov Exp $ dnl dnl dnl (C) Copyright IBM Corp. 2004, 2005 dnl dnl THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE dnl ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE dnl CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. dnl dnl You can obtain a current copy of the Common Public License from dnl http://www.opensource.org/licenses/cpl1.0.php dnl dnl Author: Konrad Rzeszutek <ko...@us...> dnl Contributors: Viktor Mihajlovski <mih...@de...> dnl Date : 09/20/2004 dnl dnl dnl CHECK_CMPI: Check for CMPI headers and set the CPPFLAGS dnl with the -I<directory> dnl dnl CHECK_PEGASUS_2_3_2: Check for Pegasus 2.3.2 and set dnl the HAVE_PEGASUS_2_3_2 dnl flag dnl AC_DEFUN([CHECK_PEGASUS_2_3_2], [ AC_MSG_CHECKING(for Pegasus 2.3.2) if which cimserver > /dev/null 2>&1 then test_CIMSERVER=`cimserver -v` fi if test "$test_CIMSERVER" == "2.3.2"; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_3_2,1,[Defined to 1 if Pegasus 2.3.2 is used]) else AC_MSG_RESULT(no) fi ] ) dnl dnl CHECK_PEGASUS_2_4: Check for Pegasus 2.4 and set the dnl the -DPEGASUS_USE_EXPERIMENTAL_INTERFACES flag dnl AC_DEFUN([CHECK_PEGASUS_2_4], [ AC_MSG_CHECKING(for Pegasus 2.4) if which cimserver > /dev/null 2>&1 then test_CIMSERVER=`cimserver -v` fi if test "$test_CIMSERVER" == "2.4"; then AC_MSG_RESULT(yes) CPPFLAGS="$CPPFLAGS -DPEGASUS_USE_EXPERIMENTAL_INTERFACES" AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_4,1,[Defined to 1 if Pegasus 2.4 is used]) else AC_MSG_RESULT(no) fi ] ) dnl dnl Helper functions dnl AC_DEFUN([_CHECK_CMPI], [ AC_MSG_CHECKING($1) AC_TRY_LINK( [ #include <cmpimacs.h> #include <cmpidt.h> #include <cmpift.h> ], [ CMPIBroker broker; CMPIStatus status = {CMPI_RC_OK, NULL}; CMPIString *s = CMNewString(&broker, "TEST", &status); ], [ have_CMPI=yes dnl AC_MSG_RESULT(yes) ], [ have_CMPI=no dnl AC_MSG_RESULT(no) ]) ]) AC_DEFUN([_CHECK_INDHELP_HEADER], [ AC_MSG_CHECKING($1) AC_TRY_COMPILE( [ #include <stdio.h> #include <ind_helper.h> ], [ CMPISelectExp *filter = NULL; ind_set_select("/root/cimv2",NULL,filter); ], [ have_INDHELP=yes dnl AC_MSG_RESULT(yes) ], [ have_INDHELP=no dnl AC_MSG_RESULT(no) ]) ]) dnl dnl The main function to check for CMPI headers dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_CMPI' to either 'no' or 'yes' dnl AC_DEFUN([CHECK_CMPI], [ AC_MSG_CHECKING(for CMPI headers) dnl Check just with the standard include paths CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) if test "$have_CMPI" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ /opt/tog-pegasus/include/Pegasus/Provider/CMPI \ /usr/include/Pegasus/Provider/CMPI \ /usr/include/openwbem \ /usr/sniacimom/include" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_CMPI="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_CMPI" _CHECK_CMPI($_DIR_) if test "$have_CMPI" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) fi ] ) dnl dnl The main function to check for the indication_helper header. dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_INDHELP' to either 'no' or 'yes' dnl AC_DEFUN([CHECK_INDHELP_HEADER], [ INDHELP_CPP_FLAGS="$CPPFLAGS" AC_MSG_CHECKING(for indication helper header) dnl Check just with the standard include paths _CHECK_INDHELP_HEADER(standard) if test "$have_INDHELP" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/sblim \ /usr/local/include/sblim" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_INDHELP="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_INDHELP" _CHECK_INDHELP_HEADER($_DIR_) if test "$have_INDHELP" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter INDHELP_CPP_FLAGS="$CPPFLAGS" break fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$INDHELP_CPP_FLAGS" if test "$have_INDHELP" == "no"; then AC_MSG_RESULT(no) fi ] ) dnl dnl The check for the CMPI provider directory dnl Sets the PROVIDERDIR variable. dnl AC_DEFUN([CHECK_PROVIDERDIR], [ AC_MSG_CHECKING(for CMPI provider directory) _DIRS="$libdir/cmpi" save_exec_prefix=${exec_prefix} save_prefix=${prefix} if test xNONE == x${prefix}; then prefix=/usr/local fi if test xNONE == x${exec_prefix}; then exec_prefix=$prefix fi for _dir in $_DIRS do _xdir=`eval echo $_dir` AC_MSG_CHECKING( $_dir ) if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) if test x"$PROVIDERDIR" == x ; then PROVIDERDIR=$_dir fi break fi done if test x"$PROVIDERDIR" == x ; then PROVIDERDIR="$libdir"/cmpi AC_MSG_RESULT(implied: $PROVIDERDIR) fi exec_prefix=$save_exec_prefix prefix=$save_prefix ] ) dnl dnl The "check" for the CIM server type in PATH and dnl the sbin directories. dnl Sets the CIMSERVER variable. dnl AC_DEFUN([CHECK_CIMSERVER], [ AC_MSG_CHECKING(for CIM servers) _SERVERS="sfcbd cimserver owcimomd" _SAVE_PATH=$PATH PATH=/usr/sbin:/usr/local/sbin:$PATH for _name in $_SERVERS do AC_MSG_CHECKING( $_name ) which $_name > /dev/null 2>&1 if test $? == 0 ; then dnl Found it AC_MSG_RESULT(yes) if test x"$CIMSERVER" == x ; then case $_name in sfcbd) CIMSERVER=sfcb;; cimserver) CIMSERVER=pegasus;; owcimomd) CIMSERVER=openwbem;; esac fi break; fi done PATH=$_SAVE_PATH if test x"$CIMSERVER" == x ; then CIMSERVER=sfcb AC_MSG_RESULT(implied: $CIMSERVER) fi ] ) dnl dnl The check for the SBLIM test suite dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional dnl AC_DEFUN([CHECK_TESTSUITE], [ AC_MSG_CHECKING(for SBLIM testsuite) _DIRS="$datadir/sblim-testsuite" save_exec_prefix=${exec_prefix} save_prefix=${prefix} if test xNONE == x${prefix}; then prefix=/usr/local fi if test xNONE == x${exec_prefix}; then exec_prefix=$prefix fi for _name in $_DIRS do AC_MSG_CHECKING( $_name ) _xname=`eval echo $_name` if test -x $_xname/run.sh ; then dnl Found it AC_MSG_RESULT(yes) if test x"$TESTSUITEDIR" == x; then TESTSUITEDIR=$_name fi AC_SUBST(TESTSUITEDIR) break; fi done if test x"$TESTSUITEDIR" == x ; then AC_MSG_RESULT(no) fi AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) exec_prefix=$save_exec_prefix prefix=$save_prefix ] ) dnl dnl The main function to check for the cmpi-base common header dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_SBLIMBASE' to either 'no' or 'yes' dnl AC_DEFUN([_CHECK_SBLIM_BASE], [ AC_MSG_CHECKING($1) _ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -lcmpiOSBase_Common" AC_TRY_LINK( [ #include <OSBase_Common.h> ], [ get_system_name(); ], [ have_SBLIMBASE=yes LDFLAGS=$_ldflags dnl AC_MSG_RESULT(yes) ], [ have_SBLIMBASE=no LDFLAGS=$_ldflags dnl AC_MSG_RESULT(no) ]) ]) AC_DEFUN([CHECK_SBLIM_BASE], [ AC_MSG_CHECKING(for SBLIM Base) SBLIMBASE_CPP_FLAGS="$CPPFLAGS" dnl Check just with the standard include paths _CHECK_SBLIM_BASE(standard) if test "$have_SBLIMBASE" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/sblim \ /usr/local/include/sblim" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_SBLIMBASE="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_SBLIMBASE" _CHECK_SBLIM_BASE($_DIR_) if test "$have_SBLIMBASE" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter SBLIMBASE_CPP_FLAGS="$CPPFLAGS" LIBSBLIMBASE=-lcmpiOSBase_Common break fi CPPFLAGS=$_cppflags done fi CPPFLAGS=$SBLIMBASE_CPP_FLAGS AC_SUBST(LIBSBLIMBASE) if test "$have_SBLIMBASE" == "no"; then AC_MSG_ERROR(no. The required SBLIM Base package is missing.) fi ] ) Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/gather/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.ac 24 Jun 2005 12:09:36 -0000 1.1 +++ configure.ac 24 Jun 2005 14:30:27 -0000 1.2 @@ -29,7 +29,7 @@ [AS_HELP_STRING(--enable-debug,enable debug output.)]) # DECLARE ANY SPECIAL CUSTOM CONFIGURE COMMAND LINE OPTIONS HERE -AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) +AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite resides.])AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem|sniacimom).]) # Checks for libraries. @@ -61,7 +61,25 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit dup2 gethostbyname gethostname getmntent gettimeofday inet_ntoa memmove memset socket strcasecmp strchr strdup strerror strrchr strspn strstr uname]) -AC_CONFIG_FILES([Makefile]) +# CPPFLAGS for Provider Compilation +CPPFLAGS="-DCMPI_VERSION=90 $CPPFLAGS" + +# Check for required CMPI header files (defined in acinclude.m4) +CHECK_CMPI + +# Check for required libraries (defined in acinclude.m4) +CHECK_PROVIDERDIR + +# Check for CIM Server (defined in acinclude.m4) +CHECK_CIMSERVER + +# Check for SBLIM Include (defined in acinclude.m4) +CHECK_SBLIM_BASE + +# Check for SBLIM Test Suite (defined in acinclude.m4) +CHECK_TESTSUITE + +AC_CONFIG_FILES([Makefile provider/Makefile]) AC_SUBST(ARCHDEF) @@ -72,14 +90,13 @@ CPPFLAGS="-DDEBUG $CPPFLAGS" else enable_debug=no - CPPFLAGS="-DNOTRACE" + CPPFLAGS="-DNOTRACE $CPPFLAGS" fi if test $enable_provider == "yes" then PROVIDER_SUBDIR=provider AC_SUBST(PROVIDER_SUBDIR) -AC_CONFIG_SUBDIRS([provider]) fi # Display configuration options @@ -89,6 +106,20 @@ echo "The following configuration options have been selected:" echo "Enable Debug: " $enable_debug echo "Enable Provider: " $enable_provider +if test $enable_provider == yes +then +echo "CIMSERVER: " $CIMSERVER +echo "PROVIDERDIR: " $PROVIDERDIR +if test x"$TESTSUITEDIR" == x; then + TESTSUITE_SUPPORT=Disabled +else + TESTSUITE_SUPPORT=Enabled +fi +echo "Test Suite Support" $TESTSUITE_SUPPORT +if test x"$TESTSUITEDIR" != x; then +echo "TESTSUITEDIR " $TESTSUITEDIR +fi +fi echo "CPPFLAGS:" $CPPFLAGS echo "-------------------------------------------------------" Index: autoconfiscate.sh =================================================================== RCS file: /cvsroot/sblim/gather/autoconfiscate.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autoconfiscate.sh 24 Jun 2005 12:09:36 -0000 1.1 +++ autoconfiscate.sh 24 Jun 2005 14:30:27 -0000 1.2 @@ -7,5 +7,4 @@ libtoolize --force && automake --add-missing --force-missing && autoconf --force && -if test -d provider; then cd provider && ../autoconfiscate.sh; fi && -if test `basename $PWD` != provider; then echo "You may now run ./configure"; fi +echo "You may now run ./configure" |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather/comms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/comms Removed Files: makefile Log Message: Updated for Autoconf/Automake. --- makefile DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/samples Removed Files: makefile Log Message: Updated for Autoconf/Automake. --- makefile DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670 Modified Files: gatherd.c reposctl.c reposd.c Added Files: AUTHORS COPYING ChangeLog Makefile.am NEWS README.TEST autoconfiscate.sh configure.ac Removed Files: makefile rules testenv.sh Log Message: Updated for Autoconf/Automake. --- NEW FILE: ChangeLog --- --- rules DELETED --- --- makefile DELETED --- Index: reposctl.c =================================================================== RCS file: /cvsroot/sblim/gather/reposctl.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- reposctl.c 22 Dec 2004 16:45:53 -0000 1.12 +++ reposctl.c 24 Jun 2005 12:09:36 -0000 1.13 @@ -156,8 +156,11 @@ sscanf(arg,"%s",argbuf); sr.srMetricId = atoi(arg); sr.srCorrelatorId = 1; + sr.srSystemId = NULL; sr.srSystemOp = SUBSCR_OP_ANY; + sr.srResource = NULL; sr.srResourceOp = SUBSCR_OP_ANY; + sr.srValue = NULL; sr.srValueOp = SUBSCR_OP_ANY; if(rrepos_subscribe(&sr,test_callback)) printf("Failed\n"); @@ -166,8 +169,11 @@ sscanf(arg,"%s",argbuf); sr.srMetricId = atoi(arg); sr.srCorrelatorId = 1; + sr.srSystemId = NULL; sr.srSystemOp = SUBSCR_OP_ANY; + sr.srResource = NULL; sr.srResourceOp = SUBSCR_OP_ANY; + sr.srValue = NULL; sr.srValueOp = SUBSCR_OP_ANY; if(rrepos_unsubscribe(&sr,test_callback)) printf("Failed\n"); --- NEW FILE: configure.ac --- # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([sblim-gather],[2.0.0],[sbl...@li...]) AC_CONFIG_SRCDIR([cimplug.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE # Host Type AC_CANONICAL_HOST case $host_cpu in s390*) ARCHDEF="-D S390";; **) ARCHDEF="-D GENERIC";; esac # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL # Features AC_ARG_ENABLE(provider, [AS_HELP_STRING(--disable-provider,disable building the provider.)], [enable_provider=$enableval], [enable_provider="yes"] ) AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,enable debug output.)]) # DECLARE ANY SPECIAL CUSTOM CONFIGURE COMMAND LINE OPTIONS HERE AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem|sniacimom).]) # Checks for libraries. AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([dl], [dlopen]) # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h mntent.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/file.h sys/socket.h sys/time.h sys/vfs.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_FORK AC_FUNC_GETMNTENT AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STAT AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit dup2 gethostbyname gethostname getmntent gettimeofday inet_ntoa memmove memset socket strcasecmp strchr strdup strerror strrchr strspn strstr uname]) AC_CONFIG_FILES([Makefile]) AC_SUBST(ARCHDEF) AM_CONDITIONAL(PROVIDER,[test "$enable_provider" == "yes"]) if test "$enable_debug" == "yes" then CPPFLAGS="-DDEBUG $CPPFLAGS" else enable_debug=no CPPFLAGS="-DNOTRACE" fi if test $enable_provider == "yes" then PROVIDER_SUBDIR=provider AC_SUBST(PROVIDER_SUBDIR) AC_CONFIG_SUBDIRS([provider]) fi # Display configuration options echo "-------------------------------------------------------" echo "Configuration for $PACKAGE complete." echo "" echo "The following configuration options have been selected:" echo "Enable Debug: " $enable_debug echo "Enable Provider: " $enable_provider echo "CPPFLAGS:" $CPPFLAGS echo "-------------------------------------------------------" AC_OUTPUT echo "You may now run make" --- NEW FILE: README.TEST --- Test Environment for SBLIM Metrics Instrumentation The SBLIM project offers a Test Suite to perform tests against the provider implementation and consistence tests against system values. Prerequisites ............. - sblim-gather packageproperly installed - sblim-cmpi-base package - testsuite package Pepare Test ........... done automatically during configure Install Configuration Files ........................... done during make install Run Test ........ Run the test in the testsuite directory (typically /usr/share/sblim-testsuite) by executing . test-gather.sh echo Status: $SBLIM_TESTSUITE_RUN Index: reposd.c =================================================================== RCS file: /cvsroot/sblim/gather/reposd.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- reposd.c 22 Dec 2004 15:43:36 -0000 1.22 +++ reposd.c 24 Jun 2005 12:09:36 -0000 1.23 @@ -96,8 +96,10 @@ MetricResourceId *rid; MetricValue *mv; pthread_t rcomm; +#ifndef NOTRACE char cfgbuf[1000]; char *cfgidx1, *cfgidx2; +#endif m_start_logging("reposd"); m_log(M_INFO,M_QUIET,"Reposd is starting up.\n"); --- NEW FILE: COPYING --- Common Public License Version 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. REQUIREMENTS A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. --- NEW FILE: AUTHORS --- Original authors of this package are Viktor Mihajlovski <mih...@de...> Heidi Eckhart <hei...@de...> --- NEW FILE: NEWS --- Changes in Version 2.0.0 ======================== Gatherer is now fully distributable: a central repository node can collect data from a large number of remote nodes running the gatherd daemon. --- NEW FILE: autoconfiscate.sh --- #!/bin/sh # # Script to setup autoconf/automake build environment. # Run this first to create the configure script aclocal --force && autoheader --force && libtoolize --force && automake --add-missing --force-missing && autoconf --force && if test -d provider; then cd provider && ../autoconfiscate.sh; fi && if test `basename $PWD` != provider; then echo "You may now run ./configure"; fi --- NEW FILE: Makefile.am --- # $Id: Makefile.am,v 1.1 2005/06/24 12:09:36 mihajlov Exp $ # ================================================================== # (C) Copyright IBM Corp. 2005 # # THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE # ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE # CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. # # You can obtain a current copy of the Common Public License from # http://www.opensource.org/licenses/cpl1.0.php # # Author: Viktor Mihajlovski <mih...@de...> # Contributors: Dr. Gareth S. Bestor <bes...@us...> # Description: Automake input file for Files and Directories sample provider # ================================================================== SUBDIRS=. $(PROVIDER_SUBDIR) # Start from an empty extra distribution file list EXTRA_DIST= # docdir defines where the documentation goes docdir=$(datadir)/doc/$(PACKAGE)-$(VERSION) # plugin directories metricplugindir=$(libdir) reposplugindir=$(libdir) # # Automake instructions for documentation # doc_DATA=README AUTHORS COPYING README.TEST # ADD EXTRA DOC FILES IF PRESENT doc_DATA+=plugin/metricIPProtocolEndpoint.readme \ plugin/metricNetworkPort.readme \ plugin/metricProcessor.readme \ plugin/metricLocalFileSystem.readme \ plugin/metricOperatingSystem.readme \ plugin/metricUnixProcess.readme EXTRA_DIST+=$(doc_DATA) #doc_DATA+=doc/rpmbuild.txt #EXTRA_DIST+=doc # Generally useful flags AM_CPPFLAGS = -I $(srcdir)/util -I $(srcdir)/comms @ARCHDEF@ AM_CFLAGS = -Wall # Include files noinst_HEADERS = cimplug.h gatherc.h marshal.h mlist.h mplugmgr.h \ mrepos.h repos.h rplugin.h rreg.h sforward.h \ config.h gather.h metric.h mplugin.h mreg.h mretr.h \ rgather.h rplugmgr.h rrepos.h slisten.h \ util/commheap.h util/gathercfg.h util/merrdefs.h \ util/mlog.h util/mtrace.h util/commutil.h util/mcfg.h \ util/merrno.h util/mrwlock.h util/reposcfg.h \ comms/mcclt.h comms/mcdefs.h comms/mcserv.h comms/rcclt.h \ comms/rcserv.h # Gather support utility libraries lib_LTLIBRARIES = libgatherutil.la libmcserv.la librcserv.la \ librrepos.la librepos.la libgather.la librgather.la libgatherutil_la_SOURCES = util/mrwlock.c util/commheap.c util/commutil.c \ util/gatherutil.c util/mcfg.c util/gathercfg.c util/reposcfg.c \ util/mlog.c util/mtrace.c util/merrno.c libgatherutil_la_CPPFLAGS = $(AM_CPPFLAGS) -DGATHER_CONFDIR=\"$(sysconfdir)\" libmcserv_la_SOURCES = comms/mcclt_unix.c comms/mcserv_unix.c libmcserv_la_LIBADD = -lgatherutil librcserv_la_SOURCES = comms/rcclt_ip.c comms/rcserv_ip.c librcserv_la_LIBADD = -lgatherutil librrepos_la_SOURCES = rrepos.c mreposl.c marshal.c slisten.c librrepos_la_LIBADD = -lgatherutil -lmcserv -lrcserv librepos_la_SOURCES = repos.c mreposl.c rplugmgr.c rreg.c marshal.c librepos_la_LIBADD = -lgatherutil librgather_la_SOURCES = rgather.c librgather_la_LIBADD = -lgatherutil -lmcserv libgather_la_SOURCES = mlist.c mretr.c mplugmgr.c mreg.c mreposp.c gather.c libgather_la_LIBADD = -lrrepos -lgatherutil # Gather daemons sbin_PROGRAMS = gatherd reposd gatherd_SOURCES = gatherd.c gatherd_LDADD = -lgather -lmcserv reposd_SOURCES = reposd.c sforward.c reposd_LDADD = -lrepos -lmcserv -lrcserv # Gather CLIs bin_PROGRAMS = gatherctl reposctl gatherctl_SOURCES = gatherctl.c gatherctl_LDADD = -lrgather reposctl_SOURCES = reposctl.c reposctl_LDADD = -lrrepos # Gatherer Plugins metricplugin_LTLIBRARIES = libmetricOperatingSystem.la \ libmetricLocalFileSystem.la \ libmetricUnixProcess.la \ libmetricProcessor.la \ libmetricNetworkPort.la \ libmetricIPProtocolEndpoint.la libmetricOperatingSystem_la_SOURCES=plugin/metricOperatingSystem.c libmetricOperatingSystem_la_LIBADD=-lgatherutil libmetricLocalFileSystem_la_SOURCES=plugin/metricLocalFileSystem.c libmetricLocalFileSystem_la_LIBADD=-lgatherutil libmetricUnixProcess_la_SOURCES=plugin/metricUnixProcess.c libmetricProcessor_la_SOURCES=plugin/metricProcessor.c libmetricProcessor_la_LIBADD=-lgatherutil libmetricNetworkPort_la_SOURCES=plugin/metricNetworkPort.c libmetricIPProtocolEndpoint_la_SOURCES=plugin/metricIPProtocolEndpoint.c reposplugin_LTLIBRARIES = librepositoryOperatingSystem.la \ librepositoryLocalFileSystem.la \ librepositoryUnixProcess.la \ librepositoryProcessor.la \ librepositoryNetworkPort.la \ librepositoryIPProtocolEndpoint.la librepositoryOperatingSystem_la_SOURCES=plugin/repositoryOperatingSystem.c librepositoryOperatingSystem_la_LIBADD=-lgatherutil librepositoryLocalFileSystem_la_SOURCES=plugin/repositoryLocalFileSystem.c librepositoryLocalFileSystem_la_LIBADD=-lgatherutil librepositoryUnixProcess_la_SOURCES=plugin/repositoryUnixProcess.c librepositoryProcessor_la_SOURCES=plugin/repositoryProcessor.c librepositoryProcessor_la_LIBADD=-lgatherutil librepositoryNetworkPort_la_SOURCES=plugin/repositoryNetworkPort.c librepositoryIPProtocolEndpoint_la_SOURCES=plugin/repositoryIPProtocolEndpoint.c # Gather utility test programs (not installed) noinst_PROGRAMS = mcfgtest mtracetest merrnotest mcstest mcctest \ rcstest rcctest mcfgtest_SOURCES = util/mcfgtest.c mcfgtest_LDADD = -lgatherutil mtracetest_SOURCES = util/mtracetest.c mtracetest_LDADD = -lgatherutil merrnotest_SOURCES = util/merrnotest.c merrnotest_LDADD = -lgatherutil mcstest_SOURCES = comms/mcstest.c mcstest_LDADD = -lmcserv mcctest_SOURCES = comms/mcctest.c mcctest_LDADD = -lmcserv rcstest_SOURCES = comms/rcstest.c rcstest_LDADD = -lrcserv rcctest_SOURCES = comms/rcctest.c rcctest_LDADD = -lrcserv EXTRA_DIST += util/test.cfg # Gather config files sysconf_DATA = gatherd.conf reposd.conf EXTRA_DIST += $(sysconf_DATA) # We must explicity add the RPM spec file to the distribution package #EXTRA_DIST+=sblim-cmpi-fad.spec EXTRA_DIST += samples postinstall: $(MAKE) -C $(PROVIDER_SUBDIR) postinstall preuninstall: $(MAKE) -C $(PROVIDER_SUBDIR) preuninstall dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` --- testenv.sh DELETED --- Index: gatherd.c =================================================================== RCS file: /cvsroot/sblim/gather/gatherd.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gatherd.c 22 Dec 2004 15:43:36 -0000 1.9 +++ gatherd.c 24 Jun 2005 12:09:36 -0000 1.10 @@ -42,8 +42,10 @@ COMMHEAP *ch; char buffer[GATHERVALBUFLEN]; size_t bufferlen=sizeof(buffer); +#ifndef NOTRACE char cfgbuf[1000]; char *cfgidx1, *cfgidx2; +#endif int i; PluginDefinition *pdef; |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/contrib Removed Files: SuSEconfig.sblim-gather sblim-gather.spec Log Message: Updated for Autoconf/Automake. --- SuSEconfig.sblim-gather DELETED --- --- sblim-gather.spec DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/plugin Modified Files: metricProcessor.c Removed Files: makefile platform.sh Log Message: Updated for Autoconf/Automake. Index: metricProcessor.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricProcessor.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- metricProcessor.c 3 Dec 2004 15:57:22 -0000 1.6 +++ metricProcessor.c 24 Jun 2005 12:09:37 -0000 1.7 @@ -254,14 +254,14 @@ str = strchr(ptr,'\n'); ptr = strchr(ptr,':'); -#if defined (INTEL) || defined (PPC) +#if defined (S390) while( (ptr=strchr(ptr,' ')) != NULL) { if( ptr > str) { break; } id = ptr+1; ptr++; } end = str; -#elif defined (S390) +#else id = ptr-1; end = ptr; #endif --- makefile DELETED --- --- platform.sh DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:47
|
Update of /cvsroot/sblim/gather/provider/indicationtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/provider/indicationtest Removed Files: PegasusCreateFilter.xml~ Log Message: Updated for Autoconf/Automake. --- PegasusCreateFilter.xml~ DELETED --- |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:09:46
|
Update of /cvsroot/sblim/gather/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24670/util Modified Files: gathercfg.c mtrace.c mtracetest.c reposcfg.c Removed Files: makefile Log Message: Updated for Autoconf/Automake. --- makefile DELETED --- Index: gathercfg.c =================================================================== RCS file: /cvsroot/sblim/gather/util/gathercfg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gathercfg.c 20 Oct 2004 14:08:58 -0000 1.2 +++ gathercfg.c 24 Jun 2005 12:09:37 -0000 1.3 @@ -20,6 +20,10 @@ #include "gathercfg.h" #include "mcfg.h" +#ifndef GATHER_CONFDIR +#define GATHER_CONFDIR "/etc" +#endif + static int gathercfg_handle; int gathercfg_init() @@ -32,7 +36,7 @@ "TraceComponents", NULL }; - gathercfg_handle=set_configfile("/etc/gatherd.conf",allowed); + gathercfg_handle=set_configfile(GATHER_CONFDIR "/gatherd.conf",allowed); return gathercfg_handle > 0 ? 0 : 1; } Index: reposcfg.c =================================================================== RCS file: /cvsroot/sblim/gather/util/reposcfg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- reposcfg.c 21 Oct 2004 13:55:11 -0000 1.2 +++ reposcfg.c 24 Jun 2005 12:09:37 -0000 1.3 @@ -20,6 +20,10 @@ #include "reposcfg.h" #include "mcfg.h" +#ifndef GATHER_CONFDIR +#define GATHER_CONFDIR "/etc" +#endif + static int reposcfg_handle; int reposcfg_init() @@ -32,7 +36,7 @@ "TraceComponents", NULL }; - reposcfg_handle=set_configfile("/etc/reposd.conf",allowed); + reposcfg_handle=set_configfile(GATHER_CONFDIR "/reposd.conf",allowed); return reposcfg_handle > 0 ? 0 : 1; } Index: mtracetest.c =================================================================== RCS file: /cvsroot/sblim/gather/util/mtracetest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mtracetest.c 20 Oct 2004 12:49:15 -0000 1.1 +++ mtracetest.c 24 Jun 2005 12:09:37 -0000 1.2 @@ -17,6 +17,8 @@ * */ +#undef NOTRACE + #include "mtrace.h" #include <stdio.h> Index: mtrace.c =================================================================== RCS file: /cvsroot/sblim/gather/util/mtrace.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mtrace.c 30 Nov 2004 13:16:51 -0000 1.4 +++ mtrace.c 24 Jun 2005 12:09:37 -0000 1.5 @@ -18,6 +18,8 @@ * Trace Support based on the SBLIM OSBASE Providers */ +#undef NOTRACE + #include "mtrace.h" #include <stdio.h> #include <unistd.h> |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:05:07
|
Update of /cvsroot/sblim/gather/provider In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22228 Modified Files: OSBase_MetricDefinitionProvider.c OSBase_MetricGathererProvider.c OSBase_MetricIndicationProvider.c OSBase_MetricRepositoryServiceProvider.c OSBase_MetricValueProvider.c Added Files: AUTHORS COPYING ChangeLog Makefile.am NEWS README acinclude.m4 configure.ac provider-register.sh Removed Files: makefile setting.cmpi Log Message: Restructured for Autoconf/Automakes. Support of the SBLIM "ecosystem". --- NEW FILE: ChangeLog --- Index: OSBase_MetricValueProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricValueProvider.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- OSBase_MetricValueProvider.c 23 Dec 2004 14:37:39 -0000 1.11 +++ OSBase_MetricValueProvider.c 24 Jun 2005 12:04:56 -0000 1.12 @@ -33,7 +33,11 @@ #include "OSBase_MetricUtil.h" +#ifdef DEBUG +#define _debug 1 +#else #define _debug 0 +#endif CMPIBroker * _broker; --- NEW FILE: AUTHORS --- Original authors of this package are Viktor Mihajlovski <mih...@de...> Heidi Eckhart <hei...@de...> --- makefile DELETED --- Index: OSBase_MetricGathererProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricGathererProvider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- OSBase_MetricGathererProvider.c 22 Dec 2004 16:45:53 -0000 1.6 +++ OSBase_MetricGathererProvider.c 24 Jun 2005 12:04:56 -0000 1.7 @@ -34,7 +34,11 @@ #include <OSBase_Common.h> #include <cmpiOSBase_Common.h> +#ifdef DEBUG +#define _debug 1 +#else #define _debug 0 +#endif CMPIBroker * _broker; Index: OSBase_MetricIndicationProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricIndicationProvider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- OSBase_MetricIndicationProvider.c 15 Dec 2004 15:12:54 -0000 1.3 +++ OSBase_MetricIndicationProvider.c 24 Jun 2005 12:04:56 -0000 1.4 @@ -21,7 +21,12 @@ */ #define CMPI_VERSION 90 +#ifdef DEBUG #define _debug 1 +#else +#define _debug 0 +#endif + #include "cmpidt.h" #include "cmpift.h" --- NEW FILE: acinclude.m4 --- dnl dnl $Id: acinclude.m4,v 1.1 2005/06/24 12:04:56 mihajlov Exp $ dnl dnl dnl (C) Copyright IBM Corp. 2004, 2005 dnl dnl THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE dnl ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE dnl CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. dnl dnl You can obtain a current copy of the Common Public License from dnl http://www.opensource.org/licenses/cpl1.0.php dnl dnl Author: Konrad Rzeszutek <ko...@us...> dnl Contributors: Viktor Mihajlovski <mih...@de...> dnl Date : 09/20/2004 dnl dnl dnl CHECK_CMPI: Check for CMPI headers and set the CPPFLAGS dnl with the -I<directory> dnl dnl CHECK_PEGASUS_2_3_2: Check for Pegasus 2.3.2 and set dnl the HAVE_PEGASUS_2_3_2 dnl flag dnl AC_DEFUN([CHECK_PEGASUS_2_3_2], [ AC_MSG_CHECKING(for Pegasus 2.3.2) if which cimserver > /dev/null 2>&1 then test_CIMSERVER=`cimserver -v` fi if test "$test_CIMSERVER" == "2.3.2"; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_3_2,1,[Defined to 1 if Pegasus 2.3.2 is used]) else AC_MSG_RESULT(no) fi ] ) dnl dnl CHECK_PEGASUS_2_4: Check for Pegasus 2.4 and set the dnl the -DPEGASUS_USE_EXPERIMENTAL_INTERFACES flag dnl AC_DEFUN([CHECK_PEGASUS_2_4], [ AC_MSG_CHECKING(for Pegasus 2.4) if which cimserver > /dev/null 2>&1 then test_CIMSERVER=`cimserver -v` fi if test "$test_CIMSERVER" == "2.4"; then AC_MSG_RESULT(yes) CPPFLAGS="$CPPFLAGS -DPEGASUS_USE_EXPERIMENTAL_INTERFACES" AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_4,1,[Defined to 1 if Pegasus 2.4 is used]) else AC_MSG_RESULT(no) fi ] ) dnl dnl Helper functions dnl AC_DEFUN([_CHECK_CMPI], [ AC_MSG_CHECKING($1) AC_TRY_LINK( [ #include <cmpimacs.h> #include <cmpidt.h> #include <cmpift.h> ], [ CMPIBroker broker; CMPIStatus status = {CMPI_RC_OK, NULL}; CMPIString *s = CMNewString(&broker, "TEST", &status); ], [ have_CMPI=yes dnl AC_MSG_RESULT(yes) ], [ have_CMPI=no dnl AC_MSG_RESULT(no) ]) ]) AC_DEFUN([_CHECK_INDHELP_HEADER], [ AC_MSG_CHECKING($1) AC_TRY_COMPILE( [ #include <stdio.h> #include <ind_helper.h> ], [ CMPISelectExp *filter = NULL; ind_set_select("/root/cimv2",NULL,filter); ], [ have_INDHELP=yes dnl AC_MSG_RESULT(yes) ], [ have_INDHELP=no dnl AC_MSG_RESULT(no) ]) ]) dnl dnl The main function to check for CMPI headers dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_CMPI' to either 'no' or 'yes' dnl AC_DEFUN([CHECK_CMPI], [ AC_MSG_CHECKING(for CMPI headers) dnl Check just with the standard include paths CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) if test "$have_CMPI" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ /opt/tog-pegasus/include/Pegasus/Provider/CMPI \ /usr/include/Pegasus/Provider/CMPI \ /usr/include/openwbem \ /usr/sniacimom/include" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_CMPI="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_CMPI" _CHECK_CMPI($_DIR_) if test "$have_CMPI" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) fi ] ) dnl dnl The main function to check for the indication_helper header. dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_INDHELP' to either 'no' or 'yes' dnl AC_DEFUN([CHECK_INDHELP_HEADER], [ INDHELP_CPP_FLAGS="$CPPFLAGS" AC_MSG_CHECKING(for indication helper header) dnl Check just with the standard include paths _CHECK_INDHELP_HEADER(standard) if test "$have_INDHELP" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/sblim \ /usr/local/include/sblim" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_INDHELP="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_INDHELP" _CHECK_INDHELP_HEADER($_DIR_) if test "$have_INDHELP" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter INDHELP_CPP_FLAGS="$CPPFLAGS" break fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$INDHELP_CPP_FLAGS" if test "$have_INDHELP" == "no"; then AC_MSG_RESULT(no) fi ] ) dnl dnl The check for the CMPI provider directory dnl Sets the PROVIDERDIR variable. dnl AC_DEFUN([CHECK_PROVIDERDIR], [ AC_MSG_CHECKING(for CMPI provider directory) _DIRS="$libdir/cmpi" save_exec_prefix=${exec_prefix} save_prefix=${prefix} if test xNONE == x${prefix}; then prefix=/usr/local fi if test xNONE == x${exec_prefix}; then exec_prefix=$prefix fi for _dir in $_DIRS do _xdir=`eval echo $_dir` AC_MSG_CHECKING( $_dir ) if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) if test x"$PROVIDERDIR" == x ; then PROVIDERDIR=$_dir fi break fi done if test x"$PROVIDERDIR" == x ; then PROVIDERDIR="$libdir"/cmpi AC_MSG_RESULT(implied: $PROVIDERDIR) fi exec_prefix=$save_exec_prefix prefix=$save_prefix ] ) dnl dnl The "check" for the CIM server type in PATH and dnl the sbin directories. dnl Sets the CIMSERVER variable. dnl AC_DEFUN([CHECK_CIMSERVER], [ AC_MSG_CHECKING(for CIM servers) _SERVERS="sfcbd cimserver owcimomd" _SAVE_PATH=$PATH PATH=/usr/sbin:/usr/local/sbin:$PATH for _name in $_SERVERS do AC_MSG_CHECKING( $_name ) which $_name > /dev/null 2>&1 if test $? == 0 ; then dnl Found it AC_MSG_RESULT(yes) if test x"$CIMSERVER" == x ; then case $_name in sfcbd) CIMSERVER=sfcb;; cimserver) CIMSERVER=pegasus;; owcimomd) CIMSERVER=openwbem;; esac fi break; fi done PATH=$_SAVE_PATH if test x"$CIMSERVER" == x ; then CIMSERVER=sfcb AC_MSG_RESULT(implied: $CIMSERVER) fi ] ) dnl dnl The check for the SBLIM test suite dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional dnl AC_DEFUN([CHECK_TESTSUITE], [ AC_MSG_CHECKING(for SBLIM testsuite) _DIRS="$datadir/sblim-testsuite" save_exec_prefix=${exec_prefix} save_prefix=${prefix} if test xNONE == x${prefix}; then prefix=/usr/local fi if test xNONE == x${exec_prefix}; then exec_prefix=$prefix fi for _name in $_DIRS do AC_MSG_CHECKING( $_name ) _xname=`eval echo $_name` if test -x $_xname/run.sh ; then dnl Found it AC_MSG_RESULT(yes) if test x"$TESTSUITEDIR" == x; then TESTSUITEDIR=$_name fi AC_SUBST(TESTSUITEDIR) break; fi done if test x"$TESTSUITEDIR" == x ; then AC_MSG_RESULT(no) fi AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) exec_prefix=$save_exec_prefix prefix=$save_prefix ] ) dnl dnl The main function to check for the cmpi-base common header dnl Modifies the CPPFLAGS with the right include directory and sets dnl the 'have_SBLIMBASE' to either 'no' or 'yes' dnl AC_DEFUN([_CHECK_SBLIM_BASE], [ AC_MSG_CHECKING($1) _ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -lcmpiOSBase_Common" AC_TRY_LINK( [ #include <OSBase_Common.h> ], [ get_system_name(); ], [ have_SBLIMBASE=yes LDFLAGS=$_ldflags dnl AC_MSG_RESULT(yes) ], [ have_SBLIMBASE=no LDFLAGS=$_ldflags dnl AC_MSG_RESULT(no) ]) ]) AC_DEFUN([CHECK_SBLIM_BASE], [ AC_MSG_CHECKING(for SBLIM Base) SBLIMBASE_CPP_FLAGS="$CPPFLAGS" dnl Check just with the standard include paths _CHECK_SBLIM_BASE(standard) if test "$have_SBLIMBASE" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else _DIRS_="/usr/include/sblim \ /usr/local/include/sblim" for _DIR_ in $_DIRS_ do _cppflags=$CPPFLAGS _include_SBLIMBASE="$_DIR_" CPPFLAGS="$CPPFLAGS -I$_include_SBLIMBASE" _CHECK_SBLIM_BASE($_DIR_) if test "$have_SBLIMBASE" == "yes"; then dnl Found it AC_MSG_RESULT(yes) dnl Save the new -I parameter SBLIMBASE_CPP_FLAGS="$CPPFLAGS" LIBSBLIMBASE=-lcmpiOSBase_Common break fi CPPFLAGS=$_cppflags done fi CPPFLAGS=$SBLIMBASE_CPP_FLAGS AC_SUBST(LIBSBLIMBASE) if test "$have_SBLIMBASE" == "no"; then AC_MSG_ERROR(no. The required SBLIM Base package is missing.) fi ] ) --- NEW FILE: configure.ac --- # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(sblim-cmpi-gather, 2.0.0, sbl...@li...) AC_CONFIG_SRCDIR([OSBase_MetricDefForMEProvider.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE # Features AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,enable debug output.)]) # CIM Server related options AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite resides.]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem|sniacimom).]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([memmove strcasecmp strchr strdup strstr]) # CPPFLAGS for Provider Compilation CPPFLAGS="-DCMPI_VERSION=90 $CPPFLAGS" # Check for required CMPI header files (defined in acinclude.m4) CHECK_CMPI # Check for required libraries (defined in acinclude.m4) CHECK_PROVIDERDIR # Check for CIM Server (defined in acinclude.m4) CHECK_CIMSERVER # Check for SBLIM Include (defined in acinclude.m4) CHECK_SBLIM_BASE # Check for SBLIM Test Suite (defined in acinclude.m4) CHECK_TESTSUITE AC_CONFIG_FILES([Makefile]) if test "$enable_debug" == "yes" then CPPFLAGS="-DDEBUG $CPPFLAGS" else enable_debug=no fi # Display configuration options echo "-------------------------------------------------------" echo "Configuration for $PACKAGE (provider) complete." echo "" echo "CIMSERVER: " $CIMSERVER echo "PROVIDERDIR: " $PROVIDERDIR echo "Test Suite Support" $TESTSUITE_SUPPORT if test x"$TESTSUITEDIR" != x; then echo "TESTSUITEDIR " $TESTSUITEDIR fi echo "CPPFLAGS:" $CPPFLAGS echo "-------------------------------------------------------" AC_OUTPUT --- NEW FILE: Makefile.am --- # $Id: Makefile.am,v 1.1 2005/06/24 12:04:56 mihajlov Exp $ # ================================================================== # (C) Copyright IBM Corp. 2005 # # THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE # ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE # CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. # # You can obtain a current copy of the Common Public License from # http://www.opensource.org/licenses/cpl1.0.php # # Author: Viktor Mihajlovski <mih...@de...> # Contributors: Dr. Gareth S. Bestor <bes...@us...> # Description: Automake input file for Gatherer Provider # ================================================================== # Start from an empty extra distribution file list EXTRA_DIST= # docdir defines where the documentation goes #docdir=$(datadir)/doc/$(PACKAGE)-$(VERSION) # plugin directories cimplugindir=$(libdir) # # Automake instructions for documentation # #doc_DATA= # ADD EXTRA DOC FILES IF PRESENT #EXTRA_DIST+=$(doc_DATA) #doc_DATA+=doc/rpmbuild.txt #EXTRA_DIST+=doc # providerdir defines where provider libraries will be installed (@PROVIDERDIR@ is set by the configure script). providerdir = @PROVIDERDIR@ # Generally useful flags AM_CPPFLAGS = -I $(srcdir)/.. -I $(srcdir)/../util -I $(srcdir)/../comms AM_CFLAGS = -Wall AM_LDFLAGS = -L.. # Include files noinst_HEADERS = OSBase_MetricUtil.h # Gather CIM plugin libraries cimplugin_LTLIBRARIES = libcimplugOperatingSystem.la \ libcimplugLocalFileSystem.la \ libcimplugUnixProcess.la \ libcimplugProcessor.la \ libcimplugNetworkPort.la \ libcimplugIPProtocolEndpoint.la libcimplugOperatingSystem_la_SOURCES=$(srcdir)/../plugin/cimplugOperatingSystem.c libcimplugLocalFileSystem_la_SOURCES=$(srcdir)/../plugin/cimplugLocalFileSystem.c libcimplugUnixProcess_la_SOURCES=$(srcdir)/../plugin/cimplugUnixProcess.c libcimplugProcessor_la_SOURCES=$(srcdir)/../plugin/cimplugProcessor.c libcimplugNetworkPort_la_SOURCES=$(srcdir)/../plugin/cimplugNetworkPort.c libcimplugIPProtocolEndpoint_la_SOURCES=$(srcdir)/../plugin/cimplugIPProtocolEndpoint.c # Gather CMPI provider utility libraries lib_LTLIBRARIES = libOSBase_MetricUtil.la libOSBase_MetricUtil_la_SOURCES=OSBase_MetricUtil.c libOSBase_MetricUtil_la_LIBADD=-lrrepos # Gather CMPI provider libraries provider_LTLIBRARIES = libOSBase_MetricDefinitionProvider.la \ libOSBase_MetricValueProvider.la \ libOSBase_MetricGathererProvider.la \ libOSBase_MetricRepositoryServiceProvider.la \ libOSBase_MetricForMEProvider.la \ libOSBase_MetricDefForMEProvider.la \ libOSBase_MetricInstanceProvider.la \ libOSBase_MetricIndicationProvider.la libOSBase_MetricDefinitionProvider_la_SOURCES = OSBase_MetricDefinitionProvider.c libOSBase_MetricDefinitionProvider_la_LIBADD = -lOSBase_MetricUtil libOSBase_MetricValueProvider_la_SOURCES = OSBase_MetricValueProvider.c libOSBase_MetricValueProvider_la_LIBADD = -lOSBase_MetricUtil libOSBase_MetricGathererProvider_la_SOURCES = OSBase_MetricGathererProvider.c libOSBase_MetricGathererProvider_la_LIBADD = -lOSBase_MetricUtil -lrgather @LIBSBLIMBASE@ libOSBase_MetricRepositoryServiceProvider_la_SOURCES = OSBase_MetricRepositoryServiceProvider.c libOSBase_MetricRepositoryServiceProvider_la_LIBADD = -lOSBase_MetricUtil @LIBSBLIMBASE@ libOSBase_MetricForMEProvider_la_SOURCES = OSBase_MetricForMEProvider.c libOSBase_MetricForMEProvider_la_LIBADD = -lOSBase_MetricUtil libOSBase_MetricDefForMEProvider_la_SOURCES = OSBase_MetricDefForMEProvider.c libOSBase_MetricDefForMEProvider_la_LIBADD = -lOSBase_MetricUtil libOSBase_MetricInstanceProvider_la_SOURCES = OSBase_MetricInstanceProvider.c libOSBase_MetricInstanceProvider_la_LIBADD = -lOSBase_MetricUtil libOSBase_MetricIndicationProvider_la_SOURCES = OSBase_MetricIndicationProvider.c libOSBase_MetricIndicationProvider_la_LIBADD = -lOSBase_MetricUtil # # Automake instructions for ./mof subdir # MOFS= mof/Linux_Metric.mof \ mof/Linux_IPProtocolEndpointMetric.mof \ mof/Linux_LocalFileSystemMetric.mof \ mof/Linux_NetworkPortMetric.mof \ mof/Linux_OperatingSystemMetric.mof \ mof/Linux_ProcessorMetric.mof \ mof/Linux_UnixProcessMetric.mof REGS=mof/Linux_IPProtocolEndpointMetric.registration \ mof/Linux_LocalFileSystemMetric.registration \ mof/Linux_Metric.registration \ mof/Linux_NetworkPortMetric.registration \ mof/Linux_OperatingSystemMetric.registration \ mof/Linux_ProcessorMetric.registration \ mof/Linux_UnixProcessMetric.registration # Register the provider(s) and class definition(s) to the current CIM server/CIMOM postinstall: sh provider-register.sh -t @CIMSERVER@ -r $(REGS) -m $(MOFS) preuninstall: sh provider-register.sh -d -t @CIMSERVER@ -r $(REGS) -m $(MOFS) dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` # We must explicity add all the schema files to the distribution package pkgdata_DATA=$(MOFS) $(REGS) pkgdata_SCRIPTS=provider-register.sh start_gathering.sh stop_gathering.sh EXTRA_DIST+=$(pkgdata_DATA) $(pkgdata_SCRIPTS) # # Automake instructions for ./test subdir # EXTRA_DIST+=test indicationtest if TESTSUITE testsuitedir=@TESTSUITEDIR@ testsuitesystemdir=@TESTSUITEDIR@/system/linux testsuitecimdir=@TESTSUITEDIR@/cim testsuite_SCRIPTS=test/test-gather.sh testsuitesystem_DATA= test/system/linux/Linux_IPProtocolEndpointMetric.system \ test/system/linux/Linux_IPProtocolEndpointMetricValue.system \ test/system/linux/Linux_LocalFileSystemMetric.system \ test/system/linux/Linux_LocalFileSystemMetricValue.system \ test/system/linux/Linux_MetricGatherer.system \ test/system/linux/Linux_NetworkPortMetric.system \ test/system/linux/Linux_NetworkPortMetricValue.system \ test/system/linux/Linux_OperatingSystemMetric.system \ test/system/linux/Linux_OperatingSystemMetricValue.system \ test/system/linux/Linux_ProcessorMetric.system \ test/system/linux/Linux_ProcessorMetricValue.system \ test/system/linux/Linux_UnixProcessMetric.system \ test/system/linux/Linux_UnixProcessMetricValue.system testsuitesystem_SCRIPTS=test/system/linux/gather-systemname.sh testsuitecim_DATA= test/cim/Linux_IPProtocolEndpointMetric.cim \ test/cim/Linux_IPProtocolEndpointMetricValue.cim \ test/cim/Linux_LocalFileSystemMetric.cim \ test/cim/Linux_LocalFileSystemMetricValue.cim \ test/cim/Linux_MetricGatherer.cim \ test/cim/Linux_NetworkPortMetric.cim \ test/cim/Linux_NetworkPortMetricValue.cim \ test/cim/Linux_OperatingSystemMetric.cim \ test/cim/Linux_OperatingSystemMetricValue.cim \ test/cim/Linux_ProcessorMetric.cim \ test/cim/Linux_ProcessorMetricValue.cim \ test/cim/Linux_UnixProcessMetric.cim \ test/cim/Linux_UnixProcessMetricValue.cim runtest: install cd $(DESTDIR)$(TESTSUITEDIR) && ./test-cmpi-base.sh #doc_DATA+=README.TEST endif Index: OSBase_MetricDefinitionProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricDefinitionProvider.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- OSBase_MetricDefinitionProvider.c 24 Sep 2004 15:30:29 -0000 1.5 +++ OSBase_MetricDefinitionProvider.c 24 Jun 2005 12:04:56 -0000 1.6 @@ -33,7 +33,11 @@ #include "OSBase_MetricUtil.h" +#ifdef DEBUG #define _debug 1 +#else +#define _debug 0 +#endif CMPIBroker * _broker; --- NEW FILE: COPYING --- Common Public License Version 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. REQUIREMENTS A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. --- setting.cmpi DELETED --- --- NEW FILE: README --- --- NEW FILE: NEWS --- Changes in Version 2.0.0 ======================== Gatherer is now fully distributable: a central repository node can collect data from a large number of remote nodes running the gatherd daemon. Index: OSBase_MetricRepositoryServiceProvider.c =================================================================== RCS file: /cvsroot/sblim/gather/provider/OSBase_MetricRepositoryServiceProvider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- OSBase_MetricRepositoryServiceProvider.c 22 Dec 2004 16:45:53 -0000 1.3 +++ OSBase_MetricRepositoryServiceProvider.c 24 Jun 2005 12:04:56 -0000 1.4 @@ -34,7 +34,11 @@ #include <OSBase_Common.h> #include <cmpiOSBase_Common.h> +#ifdef DEBUG #define _debug 1 +#else +#define _debug 0 +#endif CMPIBroker * _broker; --- NEW FILE: provider-register.sh --- #!/bin/sh # $Id: provider-register.sh,v 1.1 2005/06/24 12:04:56 mihajlov Exp $ # ================================================================== # (C) Copyright IBM Corp. 2005 # # THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE # ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE # CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. # # You can obtain a current copy of the Common Public License from # http://www.opensource.org/licenses/cpl1.0.php # # Author: Viktor Mihajlovski <mih...@de...> # Contributors: # Description: Script to install class definitions (MOFs) and # registration data for a variety of supported CIMOMs # ================================================================== function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ /opt/tog-pegasus/bin /opt/tog-pegasus/sbin $PEGASUS_HOME/bin do if test -x $p/$1 then echo $p/$1 return 0 fi done return 1 } function pegasus_transform() { OUTFILE=$1 shift regfiles=$* PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then echo Failed to read registration files >&2 return 1 fi PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` # produce ProviderModules echo > $OUTFILE chatter "Processing provider modules:" $PROVIDERMODULES for pm in $PROVIDERMODULES do cat >> $OUTFILE <<EOFPM instance of PG_ProviderModule { Name = "$pm"; Location = "$pm"; Vendor = "SBLIM"; Version = "2.0.0"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; EOFPM done # produce Providers set -- $PROVIDERS while test x$1 != x do cat >> $OUTFILE <<EOFP instance of PG_Provider { Name = "$1"; ProviderModuleName = "$2"; }; EOFP shift 2 done #produce Capabilities let serial=0 for rf in $regfiles do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do let serial=serial+1 numcap= for cap in $CAPS do case $cap in instance) if test x$numcap == x then numcap=2 else numcap="$numcap, 2" fi;; association) if test x$numcap == x then numcap=3 else numcap="$numcap, 3" fi;; indication) if test x$numcap == x then numcap=4 else numcap="$numcap, 4" fi;; method) if test x$numcap == x then numcap=5 else numcap="$numcap, 5" fi;; **) echo unknown provider type $cap >&2 return 1;; esac done cat >> $OUTFILE <<EOFC instance of PG_ProviderCapabilities { ProviderModuleName = "$PROVIDERMODULE"; ProviderName = "$PROVIDERNAME"; ClassName = "$CLASSNAME"; ProviderType = { $numcap }; Namespaces = {"$NAMESPACE"}; SupportedProperties = NULL; SupportedMethods = NULL; CapabilityID = "$CLASSNAME-$serial"; }; EOFC done done } function pegasus_install() { if ps -C cimserver > /dev/null 2>&1 then CIMMOF=`pegasus_path cimmof` if test $? != 0 then echo "Error: cimmof not found" >&2 return 1 fi state=active else CIMMOF=`pegasus_path cimmofl` if test $? != 0 then echo "Error: cimmof not found" >&2 return 1 fi state=inactive fi mymofs= mregs= mofmode=1 while test x$1 != x do if test $1 == ":" then mofmode=0 shift continue fi if test $mofmode == 1 then mymofs="$mymofs $1" else myregs="$myregs $1" fi shift done for _TEMPDIR in /var/tmp /tmp do if test -w $_TEMPDIR then _REGFILENAME=$_TEMPDIR/$$.mof break fi done trap "rm -f $_REGFILENAME" EXIT if pegasus_transform $_REGFILENAME $myregs then chatter Registering providers with $state cimserver $CIMMOF -n root/cimv2 $mymofs && $CIMMOF -n root/PG_Interop $_REGFILENAME else echo "Failed to build pegasus registration MOF." >&2 return 1 fi } function pegasus_uninstall() { mymofs= mregs= mofmode=1 while test x$1 != x do if test $1 == ":" then mofmode=0 shift continue fi if test $mofmode == 1 then mymofs="$mymofs $1" else myregs="$myregs $1" fi shift done if ps -C cimserver > /dev/null 2>&1 then PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then echo Failed to read registration files >&2 return 1 fi CIMPROVIDER=`pegasus_path cimprovider` if test $? != 0 then echo "Error: cimprovider not found" >&2 return 1 fi for pm in $PROVIDERMODULES do chatter "Remove provider module" $pm $CIMPROVIDER -d -m $pm > /dev/null && $CIMPROVIDER -r -m $pm > /dev/null done WBEMEXEC=`pegasus_path wbemexec` if test $? != 0 then echo "Error: wbemexec not found" >&2 return 1 fi CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1 | grep -v '^CIM_'` for cls in $CLASSES do chatter Delete CIM Class $cls $WBEMEXEC > /dev/null <<EOFWX <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> <SIMPLEREQ> <IMETHODCALL NAME="DeleteClass"> <LOCALNAMESPACEPATH> <NAMESPACE NAME="root"></NAMESPACE> <NAMESPACE NAME="cimv2"></NAMESPACE> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="ClassName"> <CLASSNAME NAME="$cls"/> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> EOFWX done else echo "Sorry, cimserver must be running to deregister the providers." >&2 return 1 fi } function sfcb_transform() { OUTFILE=$1 shift regfiles=$* #produce sfcb registraion for rf in $regfiles do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do chatter "Registering class" $CLASSNAME cat >> $OUTFILE <<EOFC [$CLASSNAME] provider: $PROVIDERNAME location: $PROVIDERMODULE type: $CAPS namespace: $NAMESPACE # EOFC done done } function sfcb_rebuild() { if ps -C sfcbd > /dev/null 2>&1 then # sfcb is running -- need to restart for INITSCRIPT in /etc/init.d/sfcb /usr/local/etc/init.d/sfcb none do if test -x $INITSCRIPT then break; fi done chatter "Shutting down sfcb." if test $INITSCRIPT == none then killall sfcbd else $INITSCRIPT stop fi t=0 while ps -C sfcbd > /dev/null 2>&1 do sleep 1 t=`expr $t + 1` if test $t > 10 then echo "Timed out waiting for sfcb shutdown..." >&2 echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." >&2 return 1 fi done chatter "Rebuilding repository." sfcbrepos -f if test $? != 0 then echo "Repository rebuild failed." >&2 return 1 fi if test $INITSCRIPT == none then echo "No init script found - you need to start sfcbd manually." >&2 return 1 else chatter "Restarting sfcb." $INITSCRIPT start fi else # Not running - rebuild repository chatter "Rebuilding repository." sfcbrepos -f fi } function sfcb_install() { mymofs= mregs= mofmode=1 while test x$1 != x do if test $1 == ":" then mofmode=0 shift baseregname=`basename -$1 .registration` continue fi if test $mofmode == 1 then mymofs="$mymofs $1" else myregs="$myregs $1" fi shift done for _TEMPDIR in /var/tmp /tmp do if test -w $_TEMPDIR then _REGFILENAME=$_TEMPDIR/$baseregname.reg break fi done trap "rm -f $_REGFILENAME" EXIT if sfcb_transform $_REGFILENAME $myregs then chatter "Staging provider registration." sfcbstage -r $_REGFILENAME $mymofs if test $? != 0 then echo "Failed to stage provider registration." >&2 return 1 fi sfcb_rebuild else echo "Failed to build sfcb registration file." >&2 return 1 fi } function sfcb_uninstall() { mymofs= while test x$1 != x do if test $1 == ":" then shift baseregname=`basename -$1 .registration` break fi mymofs="$mymofs `basename $1`" shift done # "Unstage" MOFs and the registration file chatter "Unstaging provider registrations." sfcbunstage -r $baseregname.reg $mymofs # Rebuild repository sfcb_rebuild } function openwbem_transform() { OUTFILE=$1 shift moffiles=$* if rm -f $OUTFILE then for _f in $moffiles do sed "s/Provider *( *\"cmpi:/Provider(\"cmpi::/g" < $_f >> $OUTFILE done fi } function openwbem_repository() { for p in /var/lib/openwbem /usr/local/var/openwbem do if test -f $p/schema.dat then echo $p return 0 fi done return 1 } function openwbem_install() { CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then echo "Error: cimmof not found" >&2 return 1 fi if ps -C owcimomd > /dev/null 2>&1 then state=active else CIMMOF="$CIMMOF -d `openwbem_repository`" if test $? != 0 then echo "Error: OpenWBEM repository not found" >&2 return 1 fi state=inactive fi for _TEMPDIR in /var/tmp /tmp do if test -w $_TEMPDIR then _REGFILENAME=$_TEMPDIR/$$.mof break fi done trap "rm -f $_REGFILENAME" EXIT if openwbem_transform $_REGFILENAME $* then chatter Registering providers with $state owcimomd $CIMMOF $_REGFILENAME > /dev/null else echo "Failed to build OpenWBEM registration MOF." >&2 return 1 fi } function openwbem_uninstall() { CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then echo "Error: cimmof not found" >&2 return 1 fi if ps -C owcimomd > /dev/null 2>&1 then state=active else CIMMOF="$CIMMOF -d `openwbem_repository`" if test $? != 0 then echo "Error: OpenWBEM repository not found" >&2 return 1 fi state=inactive fi for _TEMPDIR in /var/tmp /tmp do if test -w $_TEMPDIR then _REGFILENAME=$_TEMPDIR/$$.mof break fi done trap "rm -f $_REGFILENAME" EXIT if openwbem_transform $_REGFILENAME $* then chatter Deregistering providers with $state owcimomd $CIMMOF -r $_REGFILENAME > /dev/null else echo "Failed to build OpenWBEM registration MOF." >&2 return 1 fi } function cim_server() { for exname in sfcbd cimserver owcimomd do if pegasus_path $exname > /dev/null then case $exname in sfcbd) echo sfcb; return 0;; cimserver) echo pegasus; return 0;; owcimomd) echo openwbem; return 0;; esac break; fi done echo unknown return 1 } function usage() { echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..." } function chatter() { if test x$verbose != x then echo $* fi } function gb_getopt() { rmode=0 mmode=0 options= moffiles= registrations= while [ -n "$1" ] do case $1 in -r) mmode=0; rmode=1; shift;; -m) mmode=1; rmode=0; shift;; -*) mmode=0; rmode=0; options="$options $1"; shift;; **) if [ $mmode == 1 ] then moffiles="$moffiles $1" elif [ $rmode == 1 ] then registrations="$registrations -r $1" else options="$options $1"; fi; shift;; esac done echo $options $registrations $moffiles } prepargs=`gb_getopt $*` args=`getopt dvht:r: $prepargs` if [ $? != 0 ] then usage $0 exit 1 fi set -- $args while [ -n "$1" ] do case $1 in -h) help=1; shift; break;; -v) verbose=1; shift;; -d) deregister=1; shift;; -t) cimserver=$2; shift 2;; -r) regs="$regs $2"; shift 2;; --) shift; break;; **) break;; esac done mofs=$* if [ "$help" == "1" ] then usage echo -e "\t-h display help message" echo -e "\t-v verbose mode" echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" echo -e "\t-r specify registration files" echo -e "\t-m specify schema mof files" echo echo Use this command to install schema mofs and register providers. echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi if test x$cimserver == x then cimserver=`cim_server` if test $? == 0 then chatter "Autoselected CIM server type:" $cimserver else echo "CIM server type could not be determined, specify with -t." >&2 exit 1 fi fi if test x$deregister == x then case $cimserver in pegasus) pegasus_install $mofs ":" $regs;; sfcb) sfcb_install $mofs ":" $regs;; openwbem) openwbem_install $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac else case $cimserver in pegasus) pegasus_uninstall $mofs ":" $regs;; sfcb) sfcb_uninstall $mofs ":" $regs;; openwbem) openwbem_uninstall $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac fi |
|
From: Viktor M. <mih...@us...> - 2005-06-24 12:05:06
|
Update of /cvsroot/sblim/gather/provider/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22228/test Modified Files: test-gather.sh Log Message: Restructured for Autoconf/Automakes. Support of the SBLIM "ecosystem". Index: test-gather.sh =================================================================== RCS file: /cvsroot/sblim/gather/provider/test/test-gather.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test-gather.sh 22 Sep 2004 12:16:47 -0000 1.7 +++ test-gather.sh 24 Jun 2005 12:04:57 -0000 1.8 @@ -57,7 +57,7 @@ #echo k | gatherctl #echo d | gatherctl GATHER=`wbemein http://${SBLIM_TESTSUITE_ACCESS}localhost/root/cimv2:Linux_MetricGatherer 2>&1` -if echo $GATHER | grep Linux_MetricDataGatherer > /dev/null +if echo $GATHER | grep -v Linux_MetricGatherer > /dev/null then echo "Error occurred listing the Metric Gatherer ... are the providers installed?" echo $GATHER @@ -76,6 +76,22 @@ exit -1 fi +# Initialize Repository Service +#echo k | reposctl +#echo d | reposctl +REPOS=`wbemein http://${SBLIM_TESTSUITE_ACCESS}localhost/root/cimv2:Linux_MetricRepositoryService 2>&1` +if echo $REPOS | grep -v Linux_MetricRepositoryService > /dev/null +then + echo "Error occurred listing the Repository Service ... are the providers installed?" + echo $REPOS + exit -1 +fi + +# Stopping everything to be in a defined state then start +wbemcm http://${SBLIM_TESTSUITE_ACCESS}$REPOS StopService > /dev/null + +wbemcm http://${SBLIM_TESTSUITE_ACCESS}$REPOS StartService > /dev/null + # Wait 60 seconds to make sure that enough samples are generated echo "need to wait 60 seconds for gatherd and sampling initialization ... please stand by ... we will be back ;-) ..."; sleep 60 |
Update of /cvsroot/sblim/gather/provider/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22228/mof Added Files: Linux_IPProtocolEndpointMetric.registration Linux_LocalFileSystemMetric.registration Linux_Metric.registration Linux_NetworkPortMetric.registration Linux_OperatingSystemMetric.registration Linux_ProcessorMetric.registration Linux_UnixProcessMetric.registration Removed Files: Linux_IPProtocolEndpointMetricRegistration.mof Linux_LocalFileSystemMetricRegistration.mof Linux_MetricRegistration.mof Linux_NetworkPortMetricRegistration.mof Linux_OperatingSystemMetricRegistration.mof Linux_ProcessorMetricRegistration.mof Linux_UnixProcessMetricRegistration.mof SampleRegistration.mof makefile makefile.IPProtocolEndpoint.pegasus makefile.IPProtocolEndpoint.standalone makefile.LocalFileSystem.pegasus makefile.LocalFileSystem.standalone makefile.NetworkPort.pegasus makefile.NetworkPort.standalone makefile.OperatingSystem.pegasus makefile.OperatingSystem.standalone makefile.Processor.pegasus makefile.Processor.standalone makefile.UnixProcess.pegasus makefile.UnixProcess.standalone makefile.pegasus makefile.sample makefile.standalone Log Message: Restructured for Autoconf/Automakes. Support of the SBLIM "ecosystem". --- makefile.IPProtocolEndpoint.standalone DELETED --- --- makefile.Processor.standalone DELETED --- --- Linux_UnixProcessMetricRegistration.mof DELETED --- --- NEW FILE: Linux_LocalFileSystemMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_LocalFileSystemMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_LocalFileSystemMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- Linux_ProcessorMetricRegistration.mof DELETED --- --- NEW FILE: Linux_Metric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_MetricInstance root/cimv2 OSBase_MetricInstanceProvider OSBase_MetricInstanceProvider instance association Linux_MetricForME root/cimv2 OSBase_MetricForMEProvider OSBase_MetricForMEProvider instance association Linux_MetricDefForME root/cimv2 OSBase_MetricDefForMEProvider OSBase_MetricDefForMEProvider instance association Linux_MetricGatherer root/cimv2 OSBase_MetricGathererProvider OSBase_MetricGathererProvider instance method Linux_MetricRepositoryService root/cimv2 OSBase_MetricRepositoryServiceProvider OSBase_MetricRepositoryServiceProvider instance method Linux_MetricIndication root/cimv2 OSBase_MetricIndicationProvider OSBase_MetricIndicationProvider indication --- makefile.LocalFileSystem.pegasus DELETED --- --- makefile.LocalFileSystem.standalone DELETED --- --- makefile.NetworkPort.pegasus DELETED --- --- makefile.standalone DELETED --- --- NEW FILE: Linux_IPProtocolEndpointMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_IPProtocolEndpointMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_IPProtocolEndpointMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- Linux_OperatingSystemMetricRegistration.mof DELETED --- --- NEW FILE: Linux_ProcessorMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_ProcessorMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_ProcessorMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- makefile.NetworkPort.standalone DELETED --- --- NEW FILE: Linux_OperatingSystemMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_OperatingSystemMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_OperatingSystemMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- makefile.UnixProcess.standalone DELETED --- --- makefile.IPProtocolEndpoint.pegasus DELETED --- --- makefile.pegasus DELETED --- --- NEW FILE: Linux_NetworkPortMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_NetworkPortMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_NetworkPortMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- Linux_IPProtocolEndpointMetricRegistration.mof DELETED --- --- makefile.UnixProcess.pegasus DELETED --- --- makefile.OperatingSystem.pegasus DELETED --- --- SampleRegistration.mof DELETED --- --- makefile DELETED --- --- makefile.Processor.pegasus DELETED --- --- NEW FILE: Linux_UnixProcessMetric.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_UnixProcessMetric root/cimv2 OSBase_MetricDefinitionProvider OSBase_MetricDefinitionProvider instance Linux_UnixProcessMetricValue root/cimv2 OSBase_MetricValueProvider OSBase_MetricValueProvider instance --- makefile.OperatingSystem.standalone DELETED --- --- Linux_MetricRegistration.mof DELETED --- --- makefile.sample DELETED --- --- Linux_NetworkPortMetricRegistration.mof DELETED --- --- Linux_LocalFileSystemMetricRegistration.mof DELETED --- |
|
From: Gareth S B. <bes...@us...> - 2005-06-23 22:54:22
|
Update of /cvsroot/sblim/sfcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19213 Modified Files: client.c test.c Log Message: added temp fix for http://sourceforge.net/tracker/index.php?func=detail&aid=1226647&group_id=128809&atid=712784 Index: client.c =================================================================== RCS file: /cvsroot/sblim/sfcc/client.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- client.c 20 Jun 2005 15:04:18 -0000 1.14 +++ client.c 23 Jun 2005 22:54:11 -0000 1.15 @@ -122,7 +122,6 @@ UtilStringBuffer *sb=newStringBuffer(1024); char userPwd[256]; char method[256]="CIMMethod: "; - if (!con->mHandle) return "Unable to initialize curl interface."; @@ -134,23 +133,23 @@ 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"); + // HACK - fix this to instead parse cop to obtain namespace components and put them in CIMObject + sb->ft->appendChars(sb, "CIMObject: root%2Fcimv2"); - /* Initialize curl with the url */ + /* Initialize curl with the url */ rv = curl_easy_setopt(con->mHandle, CURLOPT_URL, con->mUri->ft->getCharPtr(con->mUri)); - /* Disable progress output */ + /* Disable progress output */ rv = curl_easy_setopt(con->mHandle, CURLOPT_NOPROGRESS, 1); - /* This will be a HTTP post */ + /* This will be a HTTP post */ rv = curl_easy_setopt(con->mHandle, CURLOPT_POST, 1); - /* Disable SSL verification */ + /* Disable SSL verification */ rv = curl_easy_setopt(con->mHandle, CURLOPT_SSL_VERIFYHOST, 0); rv = curl_easy_setopt(con->mHandle, CURLOPT_SSL_VERIFYPEER, 0); - /* Set username and password */ + /* Set username and password */ if (cld->user) { strcpy(userPwd,cld->user); if (cld->pwd) { @@ -159,33 +158,32 @@ } } - // Initialize default headers - con->ft->initializeHeaders(con); - - // Add CIMMethod header - strcat(method,op); - con->mHeaders = curl_slist_append(con->mHeaders, method); + // Initialize default headers + con->ft->initializeHeaders(con); - // Add CIMObject header - con->mHeaders = curl_slist_append(con->mHeaders, sb->ft->getCharPtr(sb)); + // Add CIMMethod header + strcat(method,op); + con->mHeaders = curl_slist_append(con->mHeaders, method); + // Add CIMObject header + con->mHeaders = curl_slist_append(con->mHeaders, sb->ft->getCharPtr(sb)); - // Set all of the headers for the request - rv = curl_easy_setopt(con->mHandle, CURLOPT_HTTPHEADER, con->mHeaders); + // Set all of the headers for the request + rv = curl_easy_setopt(con->mHandle, CURLOPT_HTTPHEADER, con->mHeaders); - // Set up the callbacks to store the response - rv = curl_easy_setopt(con->mHandle, CURLOPT_WRITEFUNCTION, writeCb); + // Set up the callbacks to store the response + rv = curl_easy_setopt(con->mHandle, CURLOPT_WRITEFUNCTION, writeCb); - // Use CURLOPT_FILE instead of CURLOPT_WRITEDATA - more portable - rv = curl_easy_setopt(con->mHandle, CURLOPT_FILE, con->mResponse); + // 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); + // 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(con->mHandle, CURLOPT_VERBOSE, 1); + // Turn this on to enable debugging + rv = curl_easy_setopt(con->mHandle, CURLOPT_VERBOSE, 1); - return NULL; + return NULL; } /* --------------------------------------------------------------------------*/ Index: test.c =================================================================== RCS file: /cvsroot/sblim/sfcc/test.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- test.c 20 Jun 2005 15:17:02 -0000 1.11 +++ test.c 23 Jun 2005 22:54:12 -0000 1.12 @@ -110,13 +110,13 @@ if (objectpath) CMRelease(objectpath); } - if (0) { + if (1) { /* Test enumClasses() */ printf("\n----------------------------------------------------------\n"); printf("Testing enumClasses() ...\n"); objectpath = newCMPIObjectPath("root/cimv2", NULL, NULL); enumeration = cc->ft->enumClasses(cc, objectpath, 0, &status); - + /* Print the results */ printf("enumClasses() rc=%d, msg=%s\n", status.rc, (status.msg)? (char *)status.msg->hdl : NULL); if (!status.rc) { @@ -130,11 +130,11 @@ if (objectpath) CMRelease(objectpath); } - if (1) { + if (0) { /* Test getClass() */ printf("\n----------------------------------------------------------\n"); printf("Testing getClass() ...\n"); - objectpath = newCMPIObjectPath("root/cimv2", "Linux_ComputerSystem", NULL); + objectpath = newCMPIObjectPath("root/cimv2", "CIM_ComputerSystem", NULL); class = cc->ft->getClass(cc, objectpath, 0, NULL, &status); /* Print the results */ @@ -151,7 +151,7 @@ /* Test enumInstanceNames() */ printf("\n----------------------------------------------------------\n"); printf("Testing enumInstanceNames() ...\n"); - objectpath = newCMPIObjectPath("root/cimv2", "Linux_ComputerSystem", NULL); + objectpath = newCMPIObjectPath("root/cimv2", "CIM_ComputerSystem", NULL); enumeration = cc->ft->enumInstanceNames(cc, objectpath, &status); /* Print the results */ @@ -171,7 +171,7 @@ /* Test enumInstances() */ printf("\n----------------------------------------------------------\n"); printf("Testing enumInstances() ...\n"); - objectpath = newCMPIObjectPath("root/cimv2", "Linux_ComputerSystem", NULL); + objectpath = newCMPIObjectPath("root/cimv2", "CIM_ComputerSystem", NULL); enumeration = cc->ft->enumInstances(cc, objectpath, 0, NULL, &status); /* Print the results */ @@ -191,8 +191,8 @@ /* Test getInstance() */ printf("\n----------------------------------------------------------\n"); printf("Testing getInstance() ...\n"); - objectpath = newCMPIObjectPath("root/cimv2", "Linux_ComputerSystem", NULL); - CMAddKey(objectpath, "CreationClassName", "Linux_ComputerSystem", CMPI_chars); + objectpath = newCMPIObjectPath("root/cimv2", "CIM_ComputerSystem", NULL); + CMAddKey(objectpath, "CreationClassName", "CIM_ComputerSystem", CMPI_chars); CMAddKey(objectpath, "Name", _HOSTNAME, CMPI_chars); instance = cc->ft->getInstance(cc, objectpath, 0, NULL, &status); |
|
From: Benjamin B. <bg...@us...> - 2005-06-23 08:17:17
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/ui/internal/wizards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526/Plugin/com/ibm/ecute/rsa/ui/internal/wizards Modified Files: WizardsResources.properties Added Files: GenerateCMPIProvidersWizard.java GenerateCMPIProvidersWizardPage.java Log Message: Version 2.1 beta 1e: CMPI provider generator support --- NEW FILE: GenerateCMPIProvidersWizard.java --- /* * Created on Jun 22, 2005 */ package com.ibm.ecute.rsa.ui.internal.wizards; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.IExportWizard; import org.eclipse.ui.IWorkbench; import com.ibm.ecute.EcuteEclipsePlugin; import com.ibm.ecute.utils.Constants; import com.ibm.ecute.utils.License; import com.ibm.xtools.msl.core.internal.services.model.ApplicationConfiguration; /** * Copyright (c) 2003, International Business Machines * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES * RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html * * @author Benjamin Bender <be...@de...> */ public class GenerateCMPIProvidersWizard extends Wizard implements IExportWizard{ // Copyright private static final String COPYRIGHT = License.COPYRIGHT; //private static final String MOF_EXTENSION = EcuteBundle.getResourceString("MOF.extension"); private static final String PAGE_DESCRIPTION = EcuteBundle.getResourceString("GenerateCMPI.description"); private static final String PAGE_TITLE = EcuteBundle.getResourceString("GenerateCMPI.title") + " (" + Constants.toolName + " " + Constants.pluginVersion + ")"; private final String MODEL_EXTENSION = ApplicationConfiguration.getFileExtensionForType("Model"); private IStructuredSelection selection; private GenerateCMPIProvidersWizardPage mainPage; /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection) */ public void init(IWorkbench workbench, IStructuredSelection sel) { selection = sel; setWindowTitle(PAGE_TITLE); setDefaultPageImageDescriptor(EcuteEclipsePlugin.imageDescriptorFromPlugin("com.ibm.ecute","icons/wizards/cimMOFExport.gif")); } public void addPages() { super.addPages(); mainPage = new GenerateCMPIProvidersWizardPage("Main", selection, new String[] {MODEL_EXTENSION}); mainPage.setTitle(PAGE_TITLE); mainPage.setDescription(PAGE_DESCRIPTION); addPage(mainPage); } /* (non-Javadoc) * @see org.eclipse.jface.wizard.IWizard#performFinish() */ public boolean performFinish() { return mainPage.performFinish(); } } --- NEW FILE: GenerateCMPIProvidersWizardPage.java --- /* * Created on Jun 22, 2005 */ package com.ibm.ecute.rsa.ui.internal.wizards; import java.awt.event.KeyEvent; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.emf.common.util.EList; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.WizardDataTransferPage; import org.eclipse.uml2.Model; import org.eclipse.uml2.Package; import com.ibm.ecute.EcuteEclipsePlugin; import com.ibm.ecute.EntryPoint; import com.ibm.ecute.rsa.core.internal.dialogs.PackageSelectionDialog; import com.ibm.ecute.rsa.core.internal.dialogs.ProgressLogDialog; import com.ibm.ecute.rsa.ui.internal.wizards.command.ModelLabelProvider; import com.ibm.ecute.rsa.ui.internal.wizards.command.ModelPackageContentProvider; import com.ibm.ecute.utils.Constants; import com.ibm.ecute.utils.PropertyList; import com.ibm.xtools.emf.msl.internal.EObjectUtil; import com.ibm.xtools.modeler.UMLModeler; import com.ibm.xtools.modeler.ui.wizards.internal.utils.FilteredFileSelectionDialog; import com.ibm.xtools.msl.core.internal.util.EObjectResourceUtil; /** * Copyright (c) 2003, International Business Machines * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES * RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html * * @author Benjamin Bender <be...@de...> */ public class GenerateCMPIProvidersWizardPage extends WizardDataTransferPage { private static final String FILE_EXT_MODEL = EcuteBundle.getResourceString("MODEL.extension"); private static final String CMPI_GROUP = EcuteBundle.getResourceString("CMPI.provider.groupTitle"); private static final String CMPI_PATH = EcuteBundle.getResourceString("CMPI.provider.pathLabel"); private static final String CMPI_BROWSE = EcuteBundle.getResourceString("CMPI.provider.browse"); private static final String CMPI_CODE = EcuteBundle.getResourceString("CMPI.provider.codeNS"); private static final String CMPI_REP = EcuteBundle.getResourceString("CMPI.provider.repositoryNS"); private static final String CMPI_CIMMOM = EcuteBundle.getResourceString("CMPI.provider.cimmomNS"); private static final String SOURCE_GROUP = EcuteBundle.getResourceString("CMPI.source.groupTitle"); private static final String SOURCE_MODEL = EcuteBundle.getResourceString("CMPI.source.label"); private static final String SOURCE_BROWSE = EcuteBundle.getResourceString("CMPI.source.browse"); private static final String SOURCE_BROWSE_TIP = EcuteBundle.getResourceString("CMPI.source.browseToolTip"); private static final String SOURCE_ADD = EcuteBundle.getResourceString("CMPI.source.add"); private static final String SOURCE_ADD_TIP = EcuteBundle.getResourceString("CMPI.source.addToolTip"); private static final String SOURCE_REMOVE = EcuteBundle.getResourceString("CMPI.source.remove"); private static final String SOURCE_REMOVE_TIP = EcuteBundle.getResourceString("CMPI.source.removeToolTip"); private static final String SOURCE_CLEAR = EcuteBundle.getResourceString("CMPI.source.clear"); private static final String SOURCE_CLEAR_TIP = EcuteBundle.getResourceString("CMPI.source.clearToolTip"); private static final String SOURCE_ALL_PACKAGES = EcuteBundle.getResourceString("CMPI.source.allPackages"); private static final String SOURCE_SELECTED_PACKAGES = EcuteBundle.getResourceString("CMPI.source.selectedPackages"); private static final String SOURCE_MISSING_PACKAGES = EcuteBundle.getResourceString("CMPI.source.missingPackages"); private static final String SOURCE_CHECKB_QUALIFIERS = EcuteBundle.getResourceString("CMPI.source.checkBoxQualifiers"); private static final String SOURCE_DIALOG_TITLE = EcuteBundle.getResourceString("CMPI.sourceDialog.title"); private static final String SOURCE_DIALOG_MESSAGE = EcuteBundle.getResourceString("CMPI.sourceDialog.message"); private static final String SOURCE_PACKAGES_DIALOG_TITLE = EcuteBundle.getResourceString("CMPI.sourcePackageDialog.title"); private static final String SOURCE_PACKAGES_DIALOG_MESSAGE = EcuteBundle.getResourceString("CMPI.sourcePackageDialog.message"); private static final String SOURCE_PACKAGES_INFO_TITLE = EcuteBundle.getResourceString("CMPI.source.packages.info.title"); private static final String SOURCE_PACKAGES_INFO_MESSAGE = EcuteBundle.getResourceString("CMPI.source.packages.info.message"); private static final String SOURCE_PATH_ERROR1 = EcuteBundle.getResourceString("CMPI.sourcePath.error1"); private static final String DESTINATION_DIALOG_TITLE = EcuteBundle.getResourceString("CMPI.destinationDialog.title"); private static final String DESTINATION_DIALOG_MESSAGE = EcuteBundle.getResourceString("CMPI.destinationDialog.message"); private static final String DESTINATION_PATH_ERROR1 = EcuteBundle.getResourceString("CMPI.destinationPath.error1"); private static final String DESTINATION_PATH_ERROR2 = EcuteBundle.getResourceString("CMPI.destinationPath.error2"); private static final String DESTINATION_CODE_NS_ERROR = EcuteBundle.getResourceString("CMPI.codeNamespace.error"); private static final String DESTINATION_REPOSITORY_NS_ERROR = EcuteBundle.getResourceString("CMPI.repositoryNamespace.error"); private static final String DESTINATION_CIMMOM_NS_ERROR = EcuteBundle.getResourceString("CMPI.cimmimNamespace.error"); private Label modelLabel; private Text sourcePathField; private Button sourceBrowseButton; private Button sourceAllPackagesButton; private Button sourceSelectedPackagesButton; private Label sourcePackageLabel; private List sourceSelectedPackagesList; private Button sourceAddPackages; private Button sourceRemovePackages; private Button sourceClearPackages; private Button sourceQualifiersButton; private Label pathLabel; private Text destinationPathField; private Button destinationBrowseButton; private Label codeLabel; private Text codeField; private Label repositoryLabel; private Text repositoryField; private Label cimmomLabel; private Text cimmomField; private String selectedPackages[]; private Hashtable packageTable; private final String sourceFileExtensions[]; private boolean validSyntax; private static final String SOURCE_FILE_DELIMETER = "\""; private ProgressLogDialog progressLog; private String selectedModel; public GenerateCMPIProvidersWizardPage(String s, IStructuredSelection selection, String as[]) { super(s); selectedPackages = null; validSyntax = true; sourceFileExtensions = as; modelLabel = null; sourcePathField = null; sourceBrowseButton = null; sourceAllPackagesButton = null; sourceSelectedPackagesButton= null; sourcePackageLabel = null; sourceSelectedPackagesList = null; pathLabel = null; destinationPathField = null; destinationBrowseButton = null; codeLabel = null; codeField = null; repositoryLabel = null; repositoryField = null; cimmomLabel = null; cimmomField = null; selectedModel = null; packageTable = new Hashtable(); IResource currentResourceSelection = null; Object firstElement = selection.getFirstElement(); if (firstElement instanceof IAdaptable) { Object resource = ((IAdaptable) firstElement).getAdapter(org.eclipse.core.resources.IResource.class); if (resource != null) { currentResourceSelection = (IResource) resource; if (currentResourceSelection.getType() == 1) { if(currentResourceSelection.getFileExtension()!= null){ if(currentResourceSelection.getFileExtension().equalsIgnoreCase(FILE_EXT_MODEL)){ selectedModel = currentResourceSelection.getFullPath().toString(); } } } } }else{ Model model = null; ArrayList packageList = new ArrayList(); java.util.List list = UMLModeler.getUMLUIHelper().getSelectedElements(); Iterator it = list.iterator(); while(it.hasNext()){ Object obj = it.next(); if(obj instanceof Package && !(obj instanceof Model)){ Package package_ = (Package)obj; if(model == null) model = package_.getModel(); if(package_.getModel().equals(model)){ packageList.add(package_.getQualifiedName()); packageTable.put(package_.getQualifiedName(), package_); } }else{ model = (Model)obj; } } for(int i = 0; i< packageList.size(); i++){ Package package_ = (Package)packageTable.get(packageList.get(i)); EList subP = package_.getNestedPackages(); for(int j=0; j< subP.size(); j++){ String subPName = ((Package)subP.get(j)).getQualifiedName(); packageList.remove(subPName); packageTable.remove(subPName); } } if(packageList.size()>0){ selectedPackages = new String[packageList.size()]; for(int i=0; i<packageList.size(); i++){ selectedPackages[i] = (String) packageList.get(i); } } if(model!= null) selectedModel = EObjectResourceUtil.getFile(model).getProject().toString().substring(1)+"/"+model.getName()+"."+FILE_EXT_MODEL; } } public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite = new Composite(parent, 0); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(272)); composite.setSize(composite.computeSize(-1, -1)); composite.setFont(parent.getFont()); createSourceGroup(composite); createDestinationGroup(composite); setPageComplete(checkPageCompletion()); setControl(composite); } private void createSourceGroup(Composite composite) { // create source group Group group = new Group(composite, 0); group.setLayoutData(new GridData(768)); group.setLayout(new FormLayout()); group.setText(SOURCE_GROUP); // create model label modelLabel = new Label(group, 0); modelLabel.setText(SOURCE_MODEL); // create model path field sourcePathField = new Text(group, SWT.BORDER); sourcePathField.setFocus(); if(selectedModel != null) sourcePathField.setText(selectedModel); // Create Browse Button sourceBrowseButton = new Button(group, SWT.PUSH); sourceBrowseButton.setText(SOURCE_BROWSE); sourceBrowseButton.setToolTipText(SOURCE_BROWSE_TIP); sourceBrowseButton.addListener(SWT.Selection, this); //Create All Packages Buttons sourceAllPackagesButton = new Button(group, SWT.RADIO); sourceAllPackagesButton.setText(SOURCE_ALL_PACKAGES); sourceAllPackagesButton.setSelection(true); sourceAllPackagesButton.addListener(SWT.Selection, this); //Create Selected Packages Button sourceSelectedPackagesButton = new Button(group, SWT.RADIO); sourceSelectedPackagesButton.setText(SOURCE_SELECTED_PACKAGES); sourceSelectedPackagesButton.addListener(SWT.Selection, this); //Create Selected Packages List sourcePackageLabel = new Label(group, 0); sourcePackageLabel.setText("Selected packages:"); sourcePackageLabel.setEnabled(false); sourceSelectedPackagesList = new List(group, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI); sourceSelectedPackagesList.addListener(SWT.KeyDown, this); sourceSelectedPackagesList.setEnabled(false); //Create Add Button sourceAddPackages = new Button(group, SWT.PUSH); sourceAddPackages.setText(SOURCE_ADD); sourceAddPackages.setToolTipText(SOURCE_ADD_TIP); sourceAddPackages.addListener(SWT.Selection, this); sourceAddPackages.setEnabled(false); //Create Remove Button sourceRemovePackages = new Button(group, SWT.PUSH); sourceRemovePackages.setText(SOURCE_REMOVE); sourceRemovePackages.setToolTipText(SOURCE_REMOVE_TIP); sourceRemovePackages.addListener(SWT.Selection, this); sourceRemovePackages.setEnabled(false); //Create Clear Button sourceClearPackages = new Button(group, SWT.PUSH); sourceClearPackages.setText(SOURCE_CLEAR); sourceClearPackages.setToolTipText(SOURCE_CLEAR_TIP); sourceClearPackages.addListener(SWT.Selection, this); sourceClearPackages.setEnabled(false); //Create Qualifiers CheckBox sourceQualifiersButton = new Button(group, SWT.CHECK); sourceQualifiersButton.setText(SOURCE_CHECKB_QUALIFIERS); sourceQualifiersButton.addListener(SWT.Selection, this); sourceQualifiersButton.setSelection(true); layoutSourceGroup(); if(selectedPackages!=null && selectedPackages.length > 0){ handleSelectedPackagesButtonPressed(); sourceSelectedPackagesList.setItems(selectedPackages); } } private void layoutSourceGroup(){ FormData formdata = new FormData(); formdata.top = new FormAttachment(0, 13); formdata.left = new FormAttachment(0, 5); modelLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(0, 11); formdata.left = new FormAttachment(modelLabel, 5); formdata.right = new FormAttachment(sourceBrowseButton, -5); sourcePathField.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(0, 10); formdata.right = new FormAttachment(100, -5); sourceBrowseButton.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourcePathField, 8); formdata.left = new FormAttachment(0, 5); formdata.right = new FormAttachment(100, -5); sourceAllPackagesButton.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourceAllPackagesButton, 5); formdata.left = new FormAttachment(0, 5); formdata.right = new FormAttachment(100, -5); sourceSelectedPackagesButton.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourceSelectedPackagesButton, 10); formdata.left = new FormAttachment(0, 5); sourcePackageLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourcePackageLabel, 5); formdata.left = new FormAttachment(0, 5); formdata.width = 300; formdata.height = 70; sourceSelectedPackagesList.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourcePackageLabel, 5); formdata.left = new FormAttachment(sourceSelectedPackagesList, 5); formdata.right = new FormAttachment(100, -5); sourceAddPackages.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourceAddPackages, 5); formdata.left = new FormAttachment(sourceSelectedPackagesList, 5); formdata.right = new FormAttachment(100, -5); sourceRemovePackages.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourceRemovePackages, 5); formdata.left = new FormAttachment(sourceSelectedPackagesList, 5); formdata.right = new FormAttachment(100, -5); sourceClearPackages.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(sourceSelectedPackagesList, 10); formdata.bottom = new FormAttachment(100, -5); formdata.left = new FormAttachment(0, 5); sourceQualifiersButton.setLayoutData(formdata); } protected void createDestinationGroup(Composite composite) { Group group = new Group(composite, 0); group.setLayoutData(new GridData(768)); group.setText(CMPI_GROUP); group.setLayout(new FormLayout()); pathLabel = new Label(group, 0); pathLabel.setText(CMPI_PATH); destinationPathField = new Text(group, SWT.BORDER); destinationPathField.addListener(SWT.Modify, this); destinationBrowseButton = new Button(group, SWT.PUSH); destinationBrowseButton.setText(CMPI_BROWSE); destinationBrowseButton.addListener(SWT.Selection, this); codeLabel = new Label(group, 0); codeLabel.setText(CMPI_CODE); codeField = new Text(group, SWT.BORDER); codeField.addListener(SWT.Modify, this); repositoryLabel = new Label(group, 0); repositoryLabel.setText(CMPI_REP); repositoryField = new Text(group, SWT.BORDER); repositoryField.addListener(SWT.Modify, this); cimmomLabel = new Label(group, 0); cimmomLabel.setText(CMPI_CIMMOM); cimmomField = new Text(group, SWT.BORDER); cimmomField.addListener(SWT.Modify, this); layoutDestinationGroup(); } private void layoutDestinationGroup(){ FormData formdata = new FormData(); formdata.top = new FormAttachment(0, 13); formdata.left = new FormAttachment(0, 5); pathLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(0, 11); formdata.left = new FormAttachment(repositoryLabel, 5); formdata.right = new FormAttachment(destinationBrowseButton, -5); destinationPathField.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(0, 10); formdata.right = new FormAttachment(100, -5); destinationBrowseButton.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(destinationPathField, 12); formdata.left = new FormAttachment(0, 5); codeLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(destinationPathField, 10); formdata.left = new FormAttachment(repositoryLabel, 5); formdata.right = new FormAttachment(100, -5); codeField.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(codeField, 12); formdata.left = new FormAttachment(0, 5); repositoryLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(codeField, 10); formdata.left = new FormAttachment(repositoryLabel, 5); formdata.right = new FormAttachment(100, -5); repositoryField.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(repositoryField, 12); formdata.left = new FormAttachment(0, 5); cimmomLabel.setLayoutData(formdata); formdata = new FormData(); formdata.top = new FormAttachment(repositoryField, 10); formdata.bottom = new FormAttachment(100, -5); formdata.left = new FormAttachment(repositoryLabel, 5); formdata.right = new FormAttachment(100, -5); cimmomField.setLayoutData(formdata); } private boolean checkPageCompletion() { boolean complete = validateSourceGroup() && validateDestinationGroup(); if (complete) { setErrorMessage(null); setMessage(null); } return complete; } protected boolean validateSourceGroup() { if(!isControlCreated()) return false; boolean sourceVal = true; String errorMsg = ""; if(isValidSourcePath()){ if(sourceSelectedPackagesButton.getSelection()){ if (sourceSelectedPackagesList.getItemCount() == 0) { setMessage(SOURCE_MISSING_PACKAGES); sourceVal = false; } } }else{ setErrorMessage(SOURCE_PATH_ERROR1); sourceVal = false; } if (sourceVal) { setErrorMessage(null); setMessage(null); } return sourceVal; } protected boolean validateDestinationGroup() { if(!isControlCreated()) return false; String s = destinationPathField.getText(); if(s.length() == 0) { setMessage(DESTINATION_PATH_ERROR1); setErrorMessage(null); return false; } String b = codeField.getText(); if(b.length() == 0) { setMessage(DESTINATION_CODE_NS_ERROR); setErrorMessage(null); return false; } b = repositoryField.getText(); if(b.length() == 0) { setMessage(DESTINATION_REPOSITORY_NS_ERROR); setErrorMessage(null); return false; } b = cimmomField.getText(); if(b.length() == 0) { setMessage(DESTINATION_CIMMOM_NS_ERROR); setErrorMessage(null); return false; } File file = new File(s); if(file.isDirectory()) { setErrorMessage(null); setMessage(null); return true; } else { setErrorMessage(DESTINATION_PATH_ERROR2); return false; } } private boolean isValidSourcePath(){ boolean result = false; if(sourcePathField.getText().trim().length() > 0){ IPath modelPath = new Path(sourcePathField.getText().trim()); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot(); IResource resource = workspaceRoot.getFile(modelPath); if (resource != null && resource.exists() && resource.isAccessible()) { result = true; } } return result; } public void handleEvent(Event event) { org.eclipse.swt.widgets.Widget source = event.widget; if(source == sourcePathField){ if(isControlCreated()) handleClearPackagesButtonPressed(); } if (source == sourceBrowseButton) { handleBrowseSourceButtonPressed(); } if(source == sourceAllPackagesButton){ handleAllPackagesButtonPressed(); } if(source == sourceSelectedPackagesButton){ handleSelectedPackagesButtonPressed(); } if(source == sourceAddPackages){ handleAddPackagesButtonPressed(); } if(source == sourceRemovePackages){ handleRemovePackagesButtonPressed(); } if(source == sourceClearPackages){ handleClearPackagesButtonPressed(); } if (source == sourceSelectedPackagesList && event.keyCode == KeyEvent.VK_DELETE) { handleRemovePackagesButtonPressed(); } if (source == destinationBrowseButton) { handleBrowseDestinationButtonPressed(); } setPageComplete(checkPageCompletion()); } private void handleBrowseSourceButtonPressed() { FilteredFileSelectionDialog filteredfileselectiondialog = new FilteredFileSelectionDialog(getShell(), sourceFileExtensions); filteredfileselectiondialog.setTitle(SOURCE_DIALOG_TITLE); filteredfileselectiondialog.setMessage(SOURCE_DIALOG_MESSAGE); filteredfileselectiondialog.setAllowMultiple(false); filteredfileselectiondialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); filteredfileselectiondialog.setBlockOnOpen(true); if(filteredfileselectiondialog.open() != 0) { return; } Object aobj[] = filteredfileselectiondialog.getResult(); if(aobj != null && aobj.length > 0) { IPath ipath = ((IResource)aobj[0]).getFullPath(); String s = ipath.toString(); sourcePathField.setText(s); selectedModel = s; } } private void handleAllPackagesButtonPressed(){ sourceAllPackagesButton.setSelection(true); sourceSelectedPackagesButton.setSelection(false); sourcePackageLabel.setEnabled(false); sourceSelectedPackagesList.setEnabled(false); sourceAddPackages.setEnabled(false); sourceRemovePackages.setEnabled(false); sourceClearPackages.setEnabled(false); } private void handleSelectedPackagesButtonPressed(){ sourceSelectedPackagesButton.setSelection(true); sourceAllPackagesButton.setSelection(false); sourcePackageLabel.setEnabled(true); sourceSelectedPackagesList.setEnabled(true); sourceAddPackages.setEnabled(true); sourceRemovePackages.setEnabled(true); sourceClearPackages.setEnabled(true); } private void handleAddPackagesButtonPressed(){ if(isValidSourcePath()){ Model root = getModel(); ModelLabelProvider labelProvider = new ModelLabelProvider(); ITreeContentProvider contentProvider = new ModelPackageContentProvider(); Object[] elements = null; if(sourceSelectedPackagesList.getItems().length > 0){ elements = new Object[sourceSelectedPackagesList.getItems().length]; for(int i = 0; i<sourceSelectedPackagesList.getItems().length; i++){ elements[i] = packageTable.get(sourceSelectedPackagesList.getItem(i)); } } PackageSelectionDialog packageDialog = new PackageSelectionDialog(getShell(), labelProvider, contentProvider); packageDialog.setInput(root); if(elements != null && elements.length > 0) packageDialog.setInitialSelections(elements); packageDialog.setTitle(SOURCE_PACKAGES_DIALOG_TITLE); packageDialog.setMessage(SOURCE_PACKAGES_DIALOG_MESSAGE); packageDialog.setBlockOnOpen(true); packageDialog.setContainerMode(true); packageDialog.setSorter(new ViewerSorter()); if(packageDialog.open() != 0) { return; } Object[] packages = packageDialog.getResult(); sourceSelectedPackagesList.removeAll(); packageTable.clear(); for(int i=0; i<packages.length; i++){ sourceSelectedPackagesList.add(((Package)packages[i]).getQualifiedName()); packageTable.put(((Package)packages[i]).getQualifiedName(), (Package)packages[i]); } selectedPackages = sourceSelectedPackagesList.getItems(); }else{ MessageDialog.openInformation(getShell(), SOURCE_PACKAGES_INFO_TITLE, SOURCE_PACKAGES_INFO_MESSAGE); } } private void handleRemovePackagesButtonPressed(){ String selected[] = sourceSelectedPackagesList.getSelection(); for (int i = 0; i < selected.length; i++) { sourceSelectedPackagesList.remove(selected[i]); } } private void handleClearPackagesButtonPressed(){ sourceSelectedPackagesList.removeAll(); packageTable.clear(); } private void handleBrowseDestinationButtonPressed() { DirectoryDialog directorydialog = new DirectoryDialog(getShell(), 8192); directorydialog.setMessage(DESTINATION_DIALOG_MESSAGE); directorydialog.setText(DESTINATION_DIALOG_TITLE); directorydialog.setFilterPath(destinationPathField.getText()); String s = directorydialog.open(); if(s != null) { destinationPathField.setText(s); updatePageCompletion(); } } public boolean performFinish() { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); Shell shell = window.getShell(); progressLog = new ProgressLogDialog(shell); //String mofOutpuConfig=""; String cmpiOutputConfig=""; try { cmpiOutputConfig = EcuteEclipsePlugin.getDefault().getConfigFileDestination(Constants.cmpiOutputRSAConfig); } catch (Exception e) { progressLog.updateImage(progressLog.getErrorImage()); progressLog.addLine2Log(e.getMessage()); return false; } writeConfiguration(cmpiOutputConfig); EntryPoint entryPoint = new EntryPoint(cmpiOutputConfig, progressLog); boolean result = entryPoint.returnResult(); if(result){ progressLog.allTasksDone(); }else{ progressLog.updateImage(progressLog.getErrorImage()); progressLog.setTitle("Error"); } return true; } protected boolean allowNewContainerName() { return false; } public String[] getSelectedPackages() { return selectedPackages; } public String getSelectedDestinationPath() { return destinationPathField.getText(); } private Model getModel(){ Model model = null; IPath modelPath = new Path(sourcePathField.getText()); String modelDestination = getFullPath(modelPath); try { model = UMLModeler.openModel(modelDestination); } catch (IOException e) { e.printStackTrace(); } return model; } private String getFullPath(IPath path) { String fullPath = ""; IWorkspace workspace = ResourcesPlugin.getWorkspace(); IFile file = (IFile) workspace.getRoot().getFile(path); if (file != null) { fullPath = file.getLocation().toOSString(); } return fullPath; } private void writeConfiguration(String configFile){ String includeCMPIQualifiers = "false"; if(sourceQualifiersButton.getSelection()) includeCMPIQualifiers = "true"; String sourcePath = getFullPath(new Path(sourcePathField.getText())); String allPackages = "false"; if(sourceAllPackagesButton.getSelection()) allPackages = "true"; String selPackages = ""; if(sourceSelectedPackagesButton.getSelection()){ for (int i = 0; i < selectedPackages.length; i++) { if (selPackages.length() > 0) selPackages += "|"; selPackages += EObjectUtil.getID((Package)packageTable.get(selectedPackages[i])); } } try { String selectionPath = getSelectedDestinationPath(); String osname = System.getProperty("os.name"); //System.out.println(osname); // Windows system if(osname.indexOf("win") > -1 || osname.indexOf("Win") > -1){ if(!selectionPath.endsWith("\\")){ selectionPath = selectionPath.concat("\\"); } System.out.println(selectionPath); } else { // other system if(!selectionPath.endsWith("/")){ selectionPath = selectionPath.concat("/"); } System.out.println(selectionPath); } String codeNameS = codeField.getText(); String repositoryNameS = repositoryField.getText(); String cimmomNameS = cimmomField.getText(); PropertyList propertyList = new PropertyList(configFile, Constants.toolName); //Set configuration propertyList.setProperty(Constants.cmpiProvidersOutputPackageName, "path", selectionPath); propertyList.setProperty(Constants.cmpiProvidersOutputPackageName, "namespaceC", codeNameS); propertyList.setProperty(Constants.cmpiProvidersOutputPackageName, "nameSpaceShadow", repositoryNameS); propertyList.setProperty(Constants.cmpiProvidersOutputPackageName, "namespaceCommon", cimmomNameS); propertyList.setProperty(Constants.rsaInputPackageName, "Model", sourcePath); propertyList.setProperty(Constants.rsaInputPackageName, "AllPackages", allPackages); propertyList.setProperty(Constants.rsaInputPackageName, "SelectedPackages", selPackages); propertyList.setProperty(Constants.rsaInputPackageName, "includeQualifiers", includeCMPIQualifiers); propertyList.close(configFile); } catch (Exception e) { if(e instanceof FileNotFoundException){ //TODO make new config file instead of an exception progressLog.updateImage(progressLog.getErrorImage()); progressLog.addLine2Log(e.getMessage()); e.printStackTrace(); } else if(e instanceof IOException){ progressLog.updateImage(progressLog.getErrorImage()); progressLog.addLine2Log(e.getMessage()); e.printStackTrace(); } } } } Index: WizardsResources.properties =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/ui/internal/wizards/WizardsResources.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- WizardsResources.properties 21 Dec 2004 17:08:32 -0000 1.9 +++ WizardsResources.properties 23 Jun 2005 08:16:59 -0000 1.10 @@ -7,6 +7,9 @@ ExportMOF.title=Export CIM MOF files ExportMOF.description=Select the model and the packages you want to export. Then, specify the output directory. +# --- The Generate CMPI Providers Wizard ---- +GenerateCMPI.title=Generate CMPI Providers +GenerateCMPI.description=Specify the model and the CMPI providers settings @@ -110,4 +113,49 @@ Export.destinationPath.error2=The specified destination directory does not exist. +# --- The Generate CMPI Providers Wizard Page --- +CMPI.model.groupTitle=Model settings +CMPI.model.topLabel=Top packages to export: +CMPI.model.allPackages=All packages of the model +CMPI.model.selectedPackages=Selected packages +CMPI.model.includeLabel=Packages to include in top packages +CMPI.model.subPackages=Sub packages in package tree (standard) +CMPI.model.referencedPackages=Packages referenced in Main view +CMPI.model.includeQualifiers=Include qualifiers + +CMPI.source.groupTitle=Model settings +CMPI.source.label=Model +CMPI.source.browse=Browse... +CMPI.source.browseToolTip=Opens a dialog to select model from the workspace. +CMPI.source.add=Select Packages... +CMPI.source.addToolTip=Opens a dialog to select packages from the model. +CMPI.source.remove=Remove +CMPI.source.removeToolTip=Remove the selected packages from the list. +CMPI.source.clear=Clear List +CMPI.source.clearToolTip=Empty the packages list. +CMPI.source.checkBoxQualifiers=Include Qualifiers +CMPI.sourceDialog.title=Select Model +CMPI.sourceDialog.message=Select model to generate CMPI providers for. +CMPI.source.allPackages=Export all packages from model +CMPI.source.selectedPackages=Export selected packages from model +CMPI.source.missingPackages=Select the model and the packages you want to export. Then, specify the generation settings. +CMPI.source.packages.info.title=Information +CMPI.source.packages.info.message=Please select first a valid model. +CMPI.sourcePackageDialog.title=Select Packages +CMPI.sourcePackageDialog.message=Select packages to generate CMPI providers for: +CMPI.sourcePath.error1=The specified source model must exist. + +CMPI.provider.groupTitle=CMPI providers generation settings +CMPI.provider.pathLabel=Output path +CMPI.provider.browse=Browse... +CMPI.provider.codeNS=C++ code namespace +CMPI.provider.repositoryNS=Repository data namespace +CMPI.provider.cimmomNS=CIMMOM namespace +CMPI.destinationDialog.message=Export to directory +CMPI.destinationDialog.title=Directory to generate to +CMPI.destinationPath.error1=Select the destination directory to generate the model. +CMPI.destinationPath.error2=The specified destination directory does not exist. +CMPI.codeNamespace.error=Missing C++ namespace. +CMPI.repositoryNamespace.error=Missing repository data namespace. +CMPI.cimmomNamespace.error=Missing CIMMOM namespace. |
|
From: Benjamin B. <bg...@us...> - 2005-06-23 08:17:17
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526/Plugin/com/ibm/ecute/utils Modified Files: Constants.java Log Message: Version 2.1 beta 1e: CMPI provider generator support Index: Constants.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils/Constants.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Constants.java 15 Jun 2005 09:41:47 -0000 1.14 +++ Constants.java 23 Jun 2005 08:17:00 -0000 1.15 @@ -22,7 +22,7 @@ public class Constants { - public static final String pluginVersion="2.1 beta 1d"; + public static final String pluginVersion="2.1 beta 1e"; public static final String toolName="ECUTE"; public static final String qualifiersFileName="QualifiersList.txt"; @@ -38,5 +38,6 @@ public static final String mofInputRSAConfig = "mofInput.config"; public static final String mofOutputRSAConfig = "mofOutput.config"; + public static final String cmpiOutputRSAConfig = "cmpiOutput.config"; } |
|
From: Benjamin B. <bg...@us...> - 2005-06-23 08:17:17
|
Update of /cvsroot/sblim/ecute/rsaConfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526/rsaConfig Modified Files: mofOutput.config mofInput.config Added Files: cmpiOutput.config Log Message: Version 2.1 beta 1e: CMPI provider generator support --- NEW FILE: cmpiOutput.config --- #ECUTE #Wed Jun 22 18:56:25 CEST 2005 inputPluginEnableRSA=true CMPIProvidersOutputnameSpaceShadow=2 outputPluginEnableCMPIProvider=true RSAInputAllPackages=false CMPIProvidersOutputnamespaceC=1 RSAInputModel=C\:\\Documents and Settings\\Administrator\\IBM\\rationalsdp6.0\\runtime-workbench-workspace\\cisco\\test1.emx RSAInputSelectedPackages=_8tgiodzmEdmAFMHJ-xtxjA|_8u1_YNzmEdmAFMHJ-xtxjA|_80YmsNzmEdmAFMHJ-xtxjA|_-lpwAdzmEdmAFMHJ-xtxjA|_76H949zmEdmAFMHJ-xtxjA CMPIProvidersOutputnamespaceCommon=3 CMPIProvidersOutputpath=C\:\\Documents and Settings\\Administrator\\My Documents\\CMPI2\\ RSAInputincludeQualifiers=true Index: mofInput.config =================================================================== RCS file: /cvsroot/sblim/ecute/rsaConfig/mofInput.config,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- mofInput.config 8 Apr 2005 09:22:17 -0000 1.13 +++ mofInput.config 23 Jun 2005 08:17:00 -0000 1.14 @@ -1,17 +1,17 @@ #ECUTE -#Thu Feb 10 13:03:30 CET 2005 +#Tue Jun 14 17:13:55 CEST 2005 RSAOutputLayout=true RSAOutputProjectLocation=C\:\\katz\\eclipse\\runtime-workbench-workspace\\test inputPluginEnableRSA=false -RSAOutputModelDestination=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\samku.emx +RSAOutputModelDestination=C\:\\Documents and Settings\\Administrator\\IBM\\rationalsdp6.0\\runtime-workbench-workspace\\cisco\\test1.emx outputPluginEnableCMPIProvider=false RSAOutputQualifiers=true RSAOutputExistingModel=false outputPluginEnableRSA=true -RSAOutputModelName=samku -CIMMOFInputImportedMOFFiles=C\:\\katz\\roseSample\\ws-cim-sample1.mof -inputPluginEnableCIMMOF=true +RSAOutputModelName=test1 inputPluginEnableRoseREI=false -outputPluginEnableRoseREI=false +inputPluginEnableCIMMOF=true +CIMMOFInputImportedMOFFiles=C\:\\Documents and Settings\\Administrator\\My Documents\\MOF\\Core_CoreElements.mof|C\:\\Documents and Settings\\Administrator\\My Documents\\MOF\\Cisco_Job.mof|C\:\\Documents and Settings\\Administrator\\My Documents\\MOF\\Cisco_LogicalElementSubclasses.mof|C\:\\Documents and Settings\\Administrator\\My Documents\\MOF\\Cisco_LogicalPhysicalCore.mof|C\:\\Documents and Settings\\Administrator\\My Documents\\MOF\\Cisco_Qualifiers.mof RSAOutputReplace=false +outputPluginEnableRoseREI=false outputPluginEnableCIMMOF=false Index: mofOutput.config =================================================================== RCS file: /cvsroot/sblim/ecute/rsaConfig/mofOutput.config,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mofOutput.config 8 Apr 2005 09:22:17 -0000 1.6 +++ mofOutput.config 23 Jun 2005 08:17:00 -0000 1.7 @@ -1,16 +1,16 @@ #ECUTE -#Sun Feb 06 12:21:33 CET 2005 -CIMMOFOutputPath=C\:\\CIMMOF +#Wed Jun 22 17:53:39 CEST 2005 +CIMMOFOutputPath=C\:\\Documents and Settings\\Administrator\\My Documents\\testGenMOF\\ inputPluginEnableRSA=true CIMMOFOutputCompleteClasses=false outputPluginEnableCMPIProvider=false RSAInputAllPackages=false -RSAInputModel=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\Linux.emx -RSAInputSelectedPackages=_M3CQoHd-EdmkkafvBnM9QQ +RSAInputModel=C\:\\Documents and Settings\\Administrator\\IBM\\rationalsdp6.0\\runtime-workbench-workspace\\cisco\\test1.emx +RSAInputSelectedPackages=_-lpwAdzmEdmAFMHJ-xtxjA outputPluginEnableRSA=false -inputPluginEnableCIMMOF=false inputPluginEnableRoseREI=false +inputPluginEnableCIMMOF=false CIMMOFOutputOutputcompleteClasses=false outputPluginEnableRoseREI=false +RSAInputincludeQualifiers=true outputPluginEnableCIMMOF=true -RSAInputincludeQualifiers=false |
|
From: Benjamin B. <bg...@us...> - 2005-06-23 08:17:17
|
Update of /cvsroot/sblim/ecute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526 Modified Files: plugin.xml plugin.properties Log Message: Version 2.1 beta 1e: CMPI provider generator support Index: plugin.properties =================================================================== RCS file: /cvsroot/sblim/ecute/plugin.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- plugin.properties 10 May 2005 16:40:54 -0000 1.5 +++ plugin.properties 23 Jun 2005 08:16:59 -0000 1.6 @@ -1,4 +1,4 @@ -Plugin.name=IBM eCute for Eclipse +Plugin.name=IBM ECUTE for Eclipse Plugin.providerName=IBM importCIMMOFWizard=CIM MOF Files @@ -7,6 +7,9 @@ exportCIMMOFWizard=CIM MOF Files exportCIMMOFDescription=Export CIM MOF files. +generateCMPIProvidersWizard=CMPI Providers +generateCMPIProvidersDescription=Generate CMPI Providers. + PropertyTab.label=CIM Qualifiers -ext.ecuteWizardsShortcut=eCute Wizards Perspective Shortcuts \ No newline at end of file +ext.ecuteWizardsShortcut=ECUTE Wizards Perspective Shortcuts \ No newline at end of file Index: plugin.xml =================================================================== RCS file: /cvsroot/sblim/ecute/plugin.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- plugin.xml 8 Apr 2005 09:12:41 -0000 1.10 +++ plugin.xml 23 Jun 2005 08:16:59 -0000 1.11 @@ -92,6 +92,18 @@ class="org.eclipse.core.resources.IResource"> </selection> </wizard> + <wizard + name="%generateCMPIProvidersWizard" + icon="icons/wizards/cimMOF.gif" + class="com.ibm.ecute.rsa.ui.internal.wizards.GenerateCMPIProvidersWizard" + id="com.ibm.ecute.rsa.ui.wizards.GenerateCMPIProvidersWizard"> + <description> + %generateCMPIProvidersDescription + </description> + <selection + class="org.eclipse.core.resources.IResource"> + </selection> + </wizard> </extension> <extension |
|
From: Benjamin B. <bg...@us...> - 2005-06-23 08:17:13
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526/Plugin/com/ibm/ecute Modified Files: EntryPoint.java Log Message: Version 2.1 beta 1e: CMPI provider generator support Index: EntryPoint.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/EntryPoint.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- EntryPoint.java 10 May 2005 09:11:53 -0000 1.16 +++ EntryPoint.java 23 Jun 2005 08:17:00 -0000 1.17 @@ -465,43 +465,6 @@ return false; } -// private boolean selectInputPlugins() { -// //create panel -// if (inputPluginPanel == null) { -// inputPluginBoxes = new JCheckBox[inputPlugindescriptors.length]; -// inputPluginPanel = new JPanel(); -// inputPluginPanel.setLayout(new GridLayout(0, 1)); -// inputPluginPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); -// for (int i = 0; i < inputPlugindescriptors.length; i++) { -// String name = inputPlugindescriptors[i].name; -// boolean activated = inputPlugindescriptors[i].activated; -// String description = inputPlugindescriptors[i].plugin.getDescription(); -// inputPluginBoxes[i] = new javax.swing.JCheckBox(name, activated); -// inputPluginBoxes[i].setToolTipText(description); -// inputPluginPanel.add(inputPluginBoxes[i]); -// } -// } -// //put panel in main frame -// frame.reset(); -// frame.setTitle("Select input plugins"); -// frame.setPanel(inputPluginPanel); -// //wait for user -// int buttonPressed = frame.waitUser(); -// if (buttonPressed == PluginFrame.CANCEL_PRESSED) -// System.exit(0); -// //save current boxes state -// for (int i = 0; i < inputPluginBoxes.length; i++) { -// configuration.setProperty(inputPluginsPackage, inputPlugindescriptors[i].name, inputPluginBoxes[i] -// .isSelected() -// + ""); -// inputPlugindescriptors[i].activated = inputPluginBoxes[i].isSelected(); -// } -// if (buttonPressed == PluginFrame.NEXT_PRESSED) -// return true; -// else -// return false; -// } - private void loadConfiguration4InputPlugins() { numberOfActivatedInputPlugins = 0; for (int i = 0; i < inputPlugindescriptors.length; i++) { @@ -550,45 +513,6 @@ return true; } -// private boolean validateInputPlugins() { -// if (numberOfActivatedInputPlugins == 0) -// return true; -// boolean allValid = true; -// int pluginWithProblems = -1; -// for (int i = 0; i < inputPlugindescriptors.length; i++) { -// if (!inputPlugindescriptors[i].activated) -// continue; -// if (inputPlugindescriptors[i].plugin.isValidCongufiguration()) -// continue; -// pluginWithProblems = i; -// allValid = false; -// } -// if (allValid) { -// if (interactive) { -// JPanel myPanel = new JPanel(); -// JLabel myLabel = new JLabel("Configuration complete"); -// myPanel.add(myLabel); -// frame.reset(); -// frame.setTitle("Ready to load model from sources"); -// frame.setPanel(myPanel); -// frame.setVisible(true); -// int status = frame.waitUser(); -// switch (status) { -// case PluginFrame.CANCEL_PRESSED: -// System.exit(1); -// case PluginFrame.BACK_PRESSED: -// return false; -// case PluginFrame.NEXT_PRESSED: -// return true; -// } -// } -// } else { -// String pluginName = inputPlugindescriptors[pluginWithProblems].name; -// showConfigurationError(pluginName); -// return false; -// } -// return true; -// } private boolean validatePlugins() { if (numberOfActivatedInputPlugins == 0) @@ -710,44 +634,6 @@ } } -// private boolean selectOutputPlugins() { -// //create panel -// if (outputPluginPanel == null) { -// outputPluginBoxes = new JCheckBox[outputPlugindescriptors.length]; -// outputPluginPanel = new JPanel(); -// outputPluginPanel.setLayout(new GridLayout(0, 1)); -// outputPluginPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); -// for (int i = 0; i < outputPlugindescriptors.length; i++) { -// String name = outputPlugindescriptors[i].name; -// boolean activated = outputPlugindescriptors[i].activated; -// String description = outputPlugindescriptors[i].plugin.getDescription(); -// outputPluginBoxes[i] = new javax.swing.JCheckBox(name, activated); -// outputPluginBoxes[i].setToolTipText(description); -// outputPluginPanel.add(outputPluginBoxes[i]); -// } -// } -// //put panel in main frame -// frame.reset(); -// frame.setTitle("Select output plugins"); -// frame.setPanel(outputPluginPanel); -// frame.setVisible(true); -// //wait for user -// int buttonPressed = frame.waitUser(); -// if (buttonPressed == PluginFrame.CANCEL_PRESSED) -// System.exit(0); -// //save current boxes state -// for (int i = 0; i < outputPluginBoxes.length; i++) { -// configuration.setProperty(outputPluginsPackage, outputPlugindescriptors[i].name, outputPluginBoxes[i] -// .isSelected() -// + ""); -// outputPlugindescriptors[i].activated = outputPluginBoxes[i].isSelected(); -// } -// if (buttonPressed == PluginFrame.NEXT_PRESSED) -// return true; -// else -// return false; -// } - private void loadConfiguration4OutputPlugins() { numberOfActivatedOutputPlugins = 0; for (int i = 0; i < outputPlugindescriptors.length; i++) { @@ -796,46 +682,6 @@ return true; } -// private boolean validateOutputPlugins() { -// if (numberOfActivatedOutputPlugins == 0) -// return true; -// boolean allValid = true; -// int pluginWithProblems = -1; -// for (int i = 0; i < outputPlugindescriptors.length; i++) { -// if (!outputPlugindescriptors[i].activated) -// continue; -// if (outputPlugindescriptors[i].plugin.isValidCongufiguration()) -// continue; -// pluginWithProblems = i; -// allValid = false; -// } -// if (allValid) { -// if (interactive) { -// JPanel myPanel = new JPanel(); -// JLabel myLabel = new JLabel("Configuration complete"); -// myPanel.add(myLabel); -// frame.reset(); -// frame.setTitle("Ready to generate output"); -// frame.setPanel(myPanel); -// frame.setVisible(true); -// int status = frame.waitUser(); -// switch (status) { -// case PluginFrame.CANCEL_PRESSED: -// System.exit(1); -// case PluginFrame.BACK_PRESSED: -// return false; -// case PluginFrame.NEXT_PRESSED: -// return true; -// } -// } -// } else { -// String pluginName = outputPlugindescriptors[pluginWithProblems].name; -// showConfigurationError(pluginName); -// return false; -// } -// return true; -// } - private boolean executeOutputPlugins(boolean previousDialogReturn) { if (previousDialogReturn == false) return true; //Execute plugins only when the user clicked next |
|
From: yeechan <ibm...@us...> - 2005-06-21 22:51:01
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24502 Modified Files: instance.c Log Message: Defect#1225173 Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- instance.c 17 May 2005 13:04:21 -0000 1.5 +++ instance.c 21 Jun 2005 22:50:51 -0000 1.6 @@ -221,6 +221,7 @@ data.value.chars = (char *) value->string->hdl; else data.value.chars=NULL; data.type=CMPI_chars; + data.state=CMPI_nullValue; } else if (type == CMPI_sint64 || type == CMPI_uint64 || type == CMPI_real64) data.value = *value; |
|
From: yeechan <ibm...@us...> - 2005-06-21 22:47:37
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22427 Modified Files: installsfcb.sh Log Message: Defect #712784 - removed LD_LIBRARY_PATH Index: installsfcb.sh =================================================================== RCS file: /cvsroot/sblim/sfcb/installsfcb.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- installsfcb.sh 27 May 2005 22:51:56 -0000 1.6 +++ installsfcb.sh 21 Jun 2005 22:47:26 -0000 1.7 @@ -179,7 +179,7 @@ # Add sfcb locations to the search paths export PATH=$_PREFIX/bin:$PATH -export LD_LIBRARY_PATH=$_PREFIX/lib:$LD_LIBRARY_PATH +#(removed for defect#712784)export LD_LIBRARY_PATH=$_PREFIX/lib:$LD_LIBRARY_PATH # Setup sfcb tracing export SFCB_TRACE_FILE=/tmp/sfcb.log @@ -275,7 +275,7 @@ fi # Add SBLIM provider library location to search path -export LD_LIBRARY_PATH=$_PREFIX/lib/cmpi:$LD_LIBRARY_PATH +#(defect 712784)export LD_LIBRARY_PATH=$_PREFIX/lib/cmpi:$LD_LIBRARY_PATH # BUILD PROBLEM WORKAROUND NEEDED FOR SOME PACKAGES WHEN LIBS DONT GET LINKED CORRECTLY echo "Workaround for missing <lib>.0 symbolic links" |