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: Adrian S. <a3s...@us...> - 2005-04-11 23:13:51
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1474 Modified Files: Makefile.am cimXmlParser.c cimXmlParser.h cimXmlRequest.c cimXmlRequest.h classProvider.c cmpidt.h constClass.c control.c instance.c interopProvider.c providerDrv.c providerMgr.c providerMgr.h trace.h Added Files: mrwlock.c mrwlock.h Log Message: Added mrwlock.c and mrwlock.h files Added first stage of support for createClass operation Changed all occurrences of principle to principal Added extra message indicatin which sfcb.cfg file in use Updated broker.sh to use sfcbd instead of sfcBroker --- NEW FILE: mrwlock.h --- /* * $Id: mrwlock.h,v 1.1 2005/04/11 23:13:42 a3schuur Exp $ * * (C) Copyright IBM Corp. 2003 * * 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: Viktor Mihajlovski <mih...@de...m> * Contributors: * * Description: Multiple Reader/Single Writer Lock * This module facilitates scalable multiple reader single writer * processing paradigms. * */ #ifndef MRWLOCK_H #define MRWLOCK_H #ifdef __cplusplus extern "C" { #endif #include <pthread.h> typedef struct _MRWLOCK { pthread_mutex_t mrw_mutex; pthread_cond_t mrw_cond; unsigned mrw_rnum; } MRWLOCK; /* Macro for stativ MRW Lock Definition */ #define MRWLOCK_DEFINE(n) MRWLOCK n={PTHREAD_MUTEX_INITIALIZER, \ PTHREAD_COND_INITIALIZER, \ 0} extern int MRWInit(MRWLOCK *mrwl); extern int MRWTerm(MRWLOCK *mrwl); extern int MReadLock(MRWLOCK *mrwl); extern int MReadUnlock(MRWLOCK *mrwl); extern int MWriteLock(MRWLOCK *mrwl); extern int MWriteUnlock(MRWLOCK *mrwl); #ifdef __cplusplus } #endif #endif Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- control.c 12 Mar 2005 00:43:00 -0000 1.4 +++ control.c 11 Apr 2005 23:13:41 -0000 1.5 @@ -87,12 +87,14 @@ if (fn) { strcpy(fin,fn); - } else { - strcpy(fin, SFCB_CONFDIR); - - strcat(fin, "/sfcb.cfg"); + } + else { + strcpy(fin, SFCB_CONFDIR); + strcat(fin, "/sfcb.cfg"); } + if (fin[0]=='/') printf("--- Using %s\n",fin); + else printf("--- Using ./%s\n",fin); in = fopen(fin, "r"); if (in == NULL) { fprintf(stderr, "--- %s not found\n", fin); Index: providerMgr.h =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- providerMgr.h 12 Mar 2005 00:43:00 -0000 1.2 +++ providerMgr.h 11 Apr 2005 23:13:42 -0000 1.3 @@ -143,7 +143,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment properties[1]; }; @@ -157,7 +157,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; }; } EnumClassNamesReq; @@ -170,7 +170,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; }; } EnumClassesReq; @@ -183,7 +183,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; }; } EnumInstanceNamesReq; @@ -196,7 +196,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment properties[1]; }; @@ -210,7 +210,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment query; MsgSegment queryLang; @@ -225,7 +225,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; @@ -243,7 +243,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; @@ -259,7 +259,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; @@ -276,7 +276,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; @@ -291,12 +291,26 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment properties[1]; }; } GetInstanceReq; +typedef union createClassReq { + BinRequestHdr hdr; + struct { + unsigned short operation; + unsigned short options; + void *provId; + unsigned int flags; + unsigned long count; // maps to MsgList + MsgSegment principal; + MsgSegment path; + MsgSegment cls; + }; +} CreateClassReq; + typedef union createInstanceReq { BinRequestHdr hdr; struct { @@ -305,7 +319,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment path; MsgSegment instance; }; @@ -319,7 +333,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment path; MsgSegment instance; MsgSegment properties[1]; @@ -334,7 +348,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; }; } DeleteInstanceReq; @@ -347,7 +361,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment method; MsgSegment in; @@ -389,7 +403,7 @@ void *provId; unsigned int flags; unsigned long count; // maps to MsgList - MsgSegment principle; + MsgSegment principal; MsgSegment objectPath; MsgSegment query; MsgSegment language; Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- providerDrv.c 30 Mar 2005 12:30:51 -0000 1.4 +++ providerDrv.c 11 Apr 2005 23:13:42 -0000 1.5 @@ -58,6 +58,7 @@ extern void getSerializedArgs(CMPIArgs * cl, void *area); extern CMPIConstClass *relocateSerializedConstClass(void *area); extern CMPIInstance *relocateSerializedInstance(void *area); +extern CMPIConstClass *relocateSerializedConstClass(void *area); extern void getSerializedInstance(CMPIInstance * ci, void *area); extern CMPIArgs *relocateSerializedArgs(void *area); extern MsgSegment setArgsMsgSegment(CMPIArgs * args); @@ -652,12 +653,11 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; if (req->flags & FL_includeClassOrigin) flgs|=CMPI_FLAG_IncludeClassOrigin; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>2) props=makePropertyList(req->count-2,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); -// rci = info->instanceMI->ft->getInstance(info->instanceMI, ctx, result, path,props); rci = info->classMI->ft->getClass(info->classMI, ctx, result, path,props); _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); @@ -678,6 +678,42 @@ _SFCB_RETURN(resp); } +static BinResponseHdr *createClass(BinRequestHdr * hdr, ProviderInfo * info, + int requestor) +{ + _SFCB_ENTER(TRACE_PROVIDERDRV, "createClass"); + CreateClassReq *req = (CreateClassReq *) hdr; + CMPIObjectPath *path = relocateSerializedObjectPath(req->path.data); + CMPIConstClass *cls = relocateSerializedConstClass(req->cls.data); + CMPIStatus rci = { CMPI_RC_OK, NULL }; + CMPIResult *result = native_new_CMPIResult(0,1,NULL); + CMPIContext *ctx = native_new_CMPIContext(TOOL_MM_ADD,info); + CMPIArray *r; + CMPICount count; + BinResponseHdr *resp; + CMPIFlags flgs=0; + int i; + + ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); + + printf("--- Calling provider %s\n",info->providerName); + + _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); + rci = info->classMI->ft->createClass(info->classMI, ctx, result, path, cls); + _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + + if (rci.rc == CMPI_RC_OK) { + resp = (BinResponseHdr *) calloc(1,sizeof(BinResponseHdr)); + resp->count = 0; + resp->moreChunks=0; + resp->rc = 1; + } + else resp = errorResp(&rci); + + _SFCB_RETURN(resp); +} + static BinResponseHdr *enumClassNames(BinRequestHdr * hdr, ProviderInfo * info, int requestor) { @@ -696,7 +732,7 @@ _SFCB_ENTER(TRACE_PROVIDERDRV, "enumClassNames"); ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); @@ -738,7 +774,7 @@ CMPIFlags flgs=req->flags; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); @@ -774,7 +810,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>5) { int i,s,n; @@ -838,7 +874,7 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; if (req->flags & FL_includeClassOrigin) flgs|=CMPI_FLAG_IncludeClassOrigin; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>2) props=makePropertyList(req->count-2,req->properties); @@ -877,7 +913,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->instanceMI->ft->deleteInstance(info->instanceMI, ctx, result, @@ -912,7 +948,7 @@ int i; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->instanceMI->ft->createInstance(info->instanceMI, ctx, result, @@ -953,7 +989,7 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>3) props=makePropertyList(req->count-3,req->properties); @@ -993,7 +1029,7 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; if (req->flags & FL_includeClassOrigin) flgs|=CMPI_FLAG_IncludeClassOrigin; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>2) props=makePropertyList(req->count-2,req->properties); @@ -1024,7 +1060,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->instanceMI->ft->enumInstanceNames(info->instanceMI, ctx, result, @@ -1109,7 +1145,7 @@ int irc; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->instanceMI->ft->execQuery(info->instanceMI, ctx, result, path, @@ -1182,7 +1218,7 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; if (req->flags & FL_includeClassOrigin) flgs|=CMPI_FLAG_IncludeClassOrigin; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>6) props=makePropertyList(req->count-6,req->properties); @@ -1221,7 +1257,7 @@ if (req->flags & FL_includeQualifiers) flgs|=CMPI_FLAG_IncludeQualifiers; if (req->flags & FL_includeClassOrigin) flgs|=CMPI_FLAG_IncludeClassOrigin; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); if (req->count>4) props=makePropertyList(req->count-4,req->properties); @@ -1255,7 +1291,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->associationMI->ft->associatorNames(info->associationMI, ctx, @@ -1288,7 +1324,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); rci = info->associationMI->ft->referenceNames(info->associationMI, ctx, @@ -1328,7 +1364,7 @@ char *type; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); _SFCB_TRACE(1,("--- pid: %d activFilters %p %s",currentProc,activFilters,processName)); for (se = activFilters; se; se = se->next) { @@ -1360,7 +1396,7 @@ _SFCB_TRACE(1, ("--- Calling authorizeFilter %s",info->providerName)); rci = info->indicationMI->ft->authorizeFilter(info->indicationMI, ctx, result, (CMPISelectExp*)se, type, path, - PROVCHARS(req->principle.data)); + PROVCHARS(req->principal.data)); _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); if (rci.rc==CMPI_RC_OK) { @@ -1415,7 +1451,7 @@ CMPIFlags flgs=0; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)&req->principle.data,CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)&req->principal.data,CMPI_chars); resp = (BinResponseHdr *) calloc(1,sizeof(BinResponseHdr)); resp->rc=1; @@ -1499,7 +1535,7 @@ info->initialized=1; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); - ctx->ft->addEntry(ctx,CMPIPrinciple,(CMPIValue*)"$$",CMPI_chars); + ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)"$$",CMPI_chars); if (info->type & INSTANCE_PROVIDER) { rc |= (getInstanceMI(info, &mi, ctx) != 1); @@ -1601,7 +1637,7 @@ {getInstance}, //OPS_GetInstance 2 {opNotSupported}, //OPS_DeleteClass 3 {deleteInstance}, //OPS_DeleteInstance 4 - {opNotSupported}, //OPS_CreateClass 5 + {createClass}, //OPS_CreateClass 5 {createInstance}, //OPS_CreateInstance 6 {opNotSupported}, //OPS_ModifyClass 7 {modifyInstance}, //OPS_ModifyInstance 8 Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- instance.c 12 Mar 2005 00:43:00 -0000 1.2 +++ instance.c 11 Apr 2005 23:13:41 -0000 1.3 @@ -453,7 +453,7 @@ else { j=0; asm("int $3"); - ns = "'NoNameSpace*"; + ns = "*NoNameSpace*"; cn = "*NoClassName*"; tmp1.rc=tmp2.rc=tmp3.rc=CMPI_RC_OK; } --- NEW FILE: mrwlock.c --- /* * $Id: mrwlock.c,v 1.1 2005/04/11 23:13:42 a3schuur Exp $ * * (C) Copyright IBM Corp. 2003 * * 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: Viktor Mihajlovski <mih...@de...m> * Contributors: * * Description: Multiple Reader/Single Writer Locks */ #include "mrwlock.h" int MReadLock(MRWLOCK *mrwl) { if (mrwl && pthread_mutex_lock(&mrwl->mrw_mutex) == 0) { mrwl->mrw_rnum += 1; return pthread_mutex_unlock(&mrwl->mrw_mutex); } else { return -1; } } int MReadUnlock(MRWLOCK *mrwl) { if (mrwl && pthread_mutex_lock(&mrwl->mrw_mutex) == 0) { mrwl->mrw_rnum -= 1; if (mrwl->mrw_rnum == 0) pthread_cond_broadcast(&mrwl->mrw_cond); return pthread_mutex_unlock(&mrwl->mrw_mutex); } else { return -1; } } int MWriteLock(MRWLOCK *mrwl) { if (mrwl && pthread_mutex_lock(&mrwl->mrw_mutex) == 0) { while (mrwl->mrw_rnum) pthread_cond_wait(&mrwl->mrw_cond,&mrwl->mrw_mutex); return 0; } else { return -1; } } int MWriteUnlock(MRWLOCK *mrwl) { if (mrwl && pthread_mutex_unlock(&mrwl->mrw_mutex) == 0) { return 0; } else { return -1; } } int MRWInit(MRWLOCK *mrwl) { static pthread_mutex_t mi=PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t ci=PTHREAD_COND_INITIALIZER; mrwl->mrw_mutex=mi; mrwl->mrw_cond=ci; mrwl->mrw_rnum=0; return 0; } Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- interopProvider.c 13 Mar 2005 15:41:39 -0000 1.4 +++ interopProvider.c 11 Apr 2005 23:13:41 -0000 1.5 @@ -275,7 +275,7 @@ BinResponseHdr *resp=NULL; BinRequestContext binCtx; OperationHdr req = {OPS_IndicationLookup, 2}; - char *principle=ctx->ft->getEntry(ctx,CMPIPrinciple,NULL).value.string->hdl;; + char *principal=ctx->ft->getEntry(ctx,CMPIPrincipal,NULL).value.string->hdl;; int irc; _SFCB_ENTER(TRACE_INDPROVIDER, "deactivateFilter"); @@ -283,7 +283,7 @@ path = TrackedCMPIObjectPath(ns, cn, &st); - sreq.principle = setCharsMsgSegment(principle); + sreq.principal = setCharsMsgSegment(principal); sreq.objectPath = setObjectPathMsgSegment(path); sreq.query = setCharsMsgSegment(fi->query); sreq.language = setCharsMsgSegment(fi->lang); @@ -337,7 +337,7 @@ extern CMPISelectExp *TempCMPISelectExp(QLStatement *qs); -CMPIStatus activateSubscription(char *principle, const char *cn, const char *type, +CMPIStatus activateSubscription(char *principal, const char *cn, const char *type, Filter *fi, int *rrc) { CMPIObjectPath *path; @@ -353,7 +353,7 @@ if (rrc) *rrc=0; path = TrackedCMPIObjectPath(fi->sns, cn, &rc); - sreq.principle = setCharsMsgSegment(principle); + sreq.principal = setCharsMsgSegment(principal); sreq.objectPath = setObjectPathMsgSegment(path); sreq.query = setCharsMsgSegment(fi->query); sreq.language = setCharsMsgSegment(fi->lang); @@ -401,7 +401,7 @@ _SFCB_RETURN(st); } -CMPIStatus activateLifeCycleSubscription(char *principle, const char *cn, +CMPIStatus activateLifeCycleSubscription(char *principal, const char *cn, Filter *fi, int type) { CMPIStatus st={CMPI_RC_OK,NULL}; @@ -431,7 +431,7 @@ ok=1; _SFCB_TRACE(1,("lhs: %s",(char*)lhs->hdl)); _SFCB_TRACE(1,("rhs: %s\n",(char*)rhs->hdl)); - st=activateSubscription(principle,(char*)rhs->hdl,cn,fi,&irc); + st=activateSubscription(principal,(char*)rhs->hdl,cn,fi,&irc); if (irc==MSG_X_INVALID_CLASS) st.rc=CMPI_RC_ERR_INVALID_CLASS; if (st.rc!=CMPI_RC_OK) break; @@ -457,28 +457,28 @@ int fowardSubscription(CMPIContext * ctx, Filter *fi, CMPIStatus *st) { CMPIStatus rc; - char *principle=NULL; + char *principal=NULL; char **fClasses=fi->qs->ft->getFromClassList(fi->qs); - CMPIData principleP=ctx->ft->getEntry(ctx,CMPIPrinciple,&rc); + CMPIData principalP=ctx->ft->getEntry(ctx,CMPIPrincipal,&rc); int irc; _SFCB_ENTER(TRACE_INDPROVIDER, "fowardSubscription"); if (rc.rc==CMPI_RC_OK) - principle=(char*)principleP.value.string->hdl; + principal=(char*)principalP.value.string->hdl; for ( ; *fClasses; fClasses++) { if (isa(fi->sns,*fClasses,"cim_processindication")) { - *st=activateSubscription(principle, *fClasses, *fClasses, fi, &irc); + *st=activateSubscription(principal, *fClasses, *fClasses, fi, &irc); } else if (isa("root/interop",*fClasses,"CIM_InstCreation")) { - *st=activateLifeCycleSubscription(principle, *fClasses, fi,CREATE_INST); + *st=activateLifeCycleSubscription(principal, *fClasses, fi,CREATE_INST); } else if (isa("root/interop",*fClasses,"CIM_InstDeletion")) { - *st=activateLifeCycleSubscription(principle, *fClasses, fi,DELETE_INST); + *st=activateLifeCycleSubscription(principal, *fClasses, fi,DELETE_INST); } else if (isa("root/interop",*fClasses,"CIM_InstModification")) { - *st=activateLifeCycleSubscription(principle, *fClasses, fi,MODIFY_INST); + *st=activateLifeCycleSubscription(principal, *fClasses, fi,MODIFY_INST); } else { setStatus(st,CMPI_RC_ERR_NOT_SUPPORTED,"Lifecycle indications not supported"); Index: classProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/classProvider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- classProvider.c 30 Mar 2005 12:47:18 -0000 1.6 +++ classProvider.c 11 Apr 2005 23:13:41 -0000 1.7 @@ -43,6 +43,7 @@ #include "cmpimacs.h" #include "cmpimacsx.h" #include "objectImpl.h" +#include "mrwlock.h" #define LOCALCLASSNAME "ClassProvider" @@ -62,6 +63,7 @@ char *fn; UtilHashTable *ht; UtilHashTable *it; + MRWLOCK mrwLock; } ClassBase; struct _Class_Register_FT { @@ -71,11 +73,36 @@ CMPIConstClass *(*getClass) (ClassRegister * br, const char *clsName); int (*putClass) (ClassRegister * br, CMPIConstClass * cls); UtilList *(*getChildren) (ClassRegister * br, const char *className); + void (*rLock)(ClassRegister * cr); + void (*wLock)(ClassRegister * cr); + void (*rUnLock)(ClassRegister * cr); + void (*wUnLock)(ClassRegister * cr); }; extern Class_Register_FT *ClassRegisterFT; -//static ClassRegister *cReg = NULL; + +static CMPIConstClass *getClass(ClassRegister * cr, const char *clsName); +extern ClClass *ClClassNew(const char *cn, const char *pa); +extern int ClClassAddQualifier(ClObjectHdr * hdr, ClSection * qlfs, + const char *id, CMPIData d); +extern int ClClassAddProperty(ClClass * cls, const char *id, CMPIData d); +extern void *ClObjectGetClSection(ClObjectHdr * hdr, ClSection * s); +extern int ClClassAddPropertyQualifier(ClObjectHdr * hdr, ClProperty * p, + const char *id, CMPIData d); +extern ClClass *ClClassRebuildClass(ClClass * cls, void *area); +extern void ClClassFreeClass(ClClass * cls); +extern char *ClClassToString(ClClass * cls); +extern CMPIConstClass initConstClass(ClClass *cl); +extern int ClClassGetQualifierAt(ClClass * cls, int id, CMPIData * data, char **name); +extern int ClClassGetQualifierCount(ClClass * cls); +extern int ClClassGetPropertyCount(ClClass * cls); +extern int ClClassGetPropertyAt(ClClass * cls, int id, CMPIData * data, char **name, + unsigned long *quals); +extern int ClClassGetPropQualifierCount(ClClass * cls, int id); +extern int ClClassGetPropQualifierAt(ClClass * cls, int id, int qid, CMPIData * data, + char **name); + int assocs = 0, topAssocs = 0; typedef struct nameSpaces { @@ -120,11 +147,31 @@ free(cr); } -static ClassRegister *clone(ClassRegister * cr) +static ClassRegister *regClone(ClassRegister * cr) { return NULL; } +void rLock(ClassRegister * cr) { + ClassBase *cb = (ClassBase *) cr->hdl; + MReadLock(&cb->mrwLock); +} + +void wLock(ClassRegister * cr) { + ClassBase *cb = (ClassBase *) cr->hdl; + MWriteLock(&cb->mrwLock); +} + +void rUnLock(ClassRegister * cr) { + ClassBase *cb = (ClassBase *) cr->hdl; + MReadUnlock(&cb->mrwLock); +} + +void wUnLock(ClassRegister * cr) { + ClassBase *cb = (ClassBase *) cr->hdl; + MWriteUnlock(&cb->mrwLock); +} + static UtilList *getChildren(ClassRegister * cr, const char *className) { ClassBase *cb = (ClassBase *) (cr + 1); @@ -154,12 +201,14 @@ UtilHashTable_charKey | UtilHashTable_ignoreKeyCase); cb->it = UtilFactory->newHashTable(61, UtilHashTable_charKey | UtilHashTable_ignoreKeyCase); + MRWInit(&cb->mrwLock); return cr; } cb->fn = strdup(fin); cb->ht = UtilFactory->newHashTable(61, UtilHashTable_charKey | UtilHashTable_ignoreKeyCase); + MRWInit(&cb->mrwLock); while ((s = fread(&hdr, 1, sizeof(hdr), in)) == sizeof(hdr)) { // while ((s = fread(&size, 1, 4, in)) == 4) { @@ -198,14 +247,90 @@ return NULL; } } -// printf("--- %d Association classes\n", assocs); -// printf("--- %d Top level Association classes\n", topAssocs); + printf("--- ClassProvider for %s using %ld bytes\n", fname, total); buildInheritanceTable(cr); + return cr; } +int cpyClass(ClClass *cl, CMPIConstClass *cc) +{ + ClClass *ccl=(ClClass*)cc->hdl; + CMPIData d; + char *name; + int i,m,iq,mq,propId; + unsigned long quals; + ClProperty *prop; + + cl->quals |= ccl->quals; + for (i=0,m=ClClassGetQualifierCount(ccl); i<m; i++) { + ClClassGetQualifierAt(ccl,i,&d,&name); + ClClassAddQualifier(&cl->hdr, &cl->qualifiers, name, d); + } + + for (i=0,m=ClClassGetPropertyCount(ccl); i<m; i++) { + ClClassGetPropertyAt(ccl,i,&d,&name,&quals); + propId=ClClassAddProperty(cl, name, d); + prop=((ClProperty*)ClObjectGetClSection(&cl->hdr,&cl->properties))+propId-1; + + for (iq=0,mq=ClClassGetPropQualifierCount(ccl,propId-1); i<m; i++) { + ClClassGetPropQualifierAt(ccl,iq, propId-1, &d, &name); + ClClassAddPropertyQualifier(&cl->hdr, prop, name, d); + } + } + return 0; +} + +CMPIStatus mergeParents(ClassRegister * cr, ClClass *cl, char *p, CMPIConstClass *cc) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + CMPIConstClass *pcc=getClass(cr,p); + + if (p) { + char* np=(char*)cc->ft->getCharSuperClassName(pcc); + st=mergeParents(cr,cl,np,NULL); + } + + if (cc) cpyClass(cl,cc); + else cpyClass(cl,pcc); + + return st; +} + +static int addClass(ClassRegister * cr,CMPIConstClass *ccp, char *cn, char *p) +{ + ClassBase *cb = (ClassBase *) (cr + 1); + UtilHashTable *it=cb->it; + UtilList *ul; + char *pn=p; + ClClass *mc; + CMPIConstClass *cc=ccp; + + if (p) { + mc=ClClassNew(cn,p); + mergeParents(cr,mc,pn,cc); + } + + cb->ht->ft->put(cb->ht, cn, cc); + if (cc->ft->isAssociation(cc)) assocs++; + if (p == NULL) topAssocs++; + + + + else { + ul = it->ft->get(it, p); + if (ul == NULL) { + ul = UtilFactory->newList(); + it->ft->put(it, p, ul); + } + ul->ft->prepend(ul, cn); + } + + return 0; +} + static UtilHashTable *gatherNameSpaces(char *dn, UtilHashTable *ns) { DIR *dir; @@ -300,10 +425,14 @@ static Class_Register_FT ift = { 1, release, - clone, + regClone, getClass, putClass, - getChildren + getChildren, + rLock, + wLock, + rUnLock, + wUnLock }; Class_Register_FT *ClassRegisterFT = &ift; @@ -385,7 +514,9 @@ cni=ref->ft->getClassName(ref,NULL); if (cni) cn=(char*)cni->hdl; cb = (ClassBase *) cReg->hdl; - + + cReg->ft->rLock(cReg); + if (cn && strcasecmp(cn,"$ClassProvider$")==0) cn=NULL; if (cn==NULL) { @@ -416,6 +547,8 @@ loopOnChildNames(cReg, cn, rslt); } + cReg->ft->rUnLock(cReg); + _SFCB_RETURN(st); } @@ -456,6 +589,8 @@ _SFCB_RETURN(st); } + cReg->ft->rLock(cReg); + flgs=ctx->ft->getEntry(ctx,CMPIInvocationFlags,NULL).value.uint32; cni=ref->ft->getClassName(ref,NULL); if (cni) { @@ -486,6 +621,8 @@ loopOnChildren(cReg, cn, rslt); } + cReg->ft->rUnLock(cReg); + _SFCB_RETURN(st); } @@ -510,21 +647,57 @@ return st; } + cReg->ft->rLock(cReg); + cl = getClass(cReg, (char *) cn->hdl); if (cl) CMReturnInstance(rslt, (CMPIInstance *) cl); else { st.rc = CMPI_RC_ERR_NOT_FOUND; } + + cReg->ft->rUnLock(cReg); + _SFCB_RETURN(st); } CMPIStatus ClassProviderCreateClass(CMPIClassMI * mi, CMPIContext * ctx, CMPIResult * rslt, - CMPIObjectPath * cop, CMPIConstClass * ci) + CMPIObjectPath * ref, CMPIConstClass * cc) { - CMPIStatus st = { CMPI_RC_ERR_NOT_SUPPORTED, NULL }; - return st; + ClassRegister *cReg; + CMPIConstClass * cl; + int rc; + + CMPIStatus st = { CMPI_RC_OK, NULL }; + + _SFCB_ENTER(TRACE_PROVIDERS, "ClassProviderCreateClass"); + + cReg=getNsReg(ref, &rc); + if (cReg==NULL) { + CMPIStatus st = { CMPI_RC_ERR_INVALID_NAMESPACE, NULL }; + _SFCB_RETURN(st); + } + + char *pn = (char*)cc->ft->getCharSuperClassName(cc); + char *cn = (char*)cc->ft->getCharClassName(cc); + + cl = getClass(cReg,cn); + if (cl) { + st.rc = CMPI_RC_ERR_ALREADY_EXISTS; + _SFCB_RETURN(st); + } + if (pn && (cl=getClass(cReg,cn))==NULL) { + st.rc = CMPI_RC_ERR_INVALID_SUPERCLASS; + _SFCB_RETURN(st); + } + + cReg->ft->wLock(cReg); + addClass(cReg,cc,cn,pn); + + cReg->ft->wUnLock(cReg); + + _SFCB_RETURN(st); } CMPIStatus ClassProviderSetClass(CMPIClassMI * mi, @@ -627,8 +800,6 @@ _SFCB_ENTER(TRACE_PROVIDERS, "ClassProviderInvokeMethod"); - CMPIString *nsi=CMGetNameSpace(ref,NULL); - cReg=getNsReg(ref, &rc); if (cReg==NULL) { CMPIStatus st = { CMPI_RC_ERR_INVALID_NAMESPACE, NULL }; @@ -638,6 +809,9 @@ if (strcasecmp(methodName, "getchildren") == 0) { CMPIData cn = CMGetArg(in, "class", NULL); _SFCB_TRACE(1,("--- getchildren %s",(char*)cn.value.string->hdl)); + + cReg->ft->rLock(cReg); + if (cn.type == CMPI_string && cn.value.string && cn.value.string->hdl) { char *child; int l=0, i=0; @@ -652,12 +826,18 @@ } else { } + + cReg->ft->rUnLock(cReg); + } else if (strcasecmp(methodName, "getallchildren") == 0) { int ignprov=0; CMPIStatus st; CMPIData cn = CMGetArg(in, "class", &st); + + cReg->ft->rLock(cReg); + if (st.rc!=CMPI_RC_OK) { cn = CMGetArg(in, "classignoreprov", NULL); ignprov=1; @@ -676,6 +856,8 @@ } else { } + + cReg->ft->rUnLock(cReg); } else if (strcasecmp(methodName, "getassocs") == 0) { @@ -687,13 +869,17 @@ CMPIConstClass *cc; int n; - for (n = 0, i = ct->ft->getFirst(ct, (void **) &cn, (void **) &cc); i; + cReg->ft->rUnLock(cReg); + + for (n = 0, i = ct->ft->getFirst(ct, (void **) &cn, (void **) &cc); i; i = ct->ft->getNext(ct, i, (void **) &cn, (void **) &cc)) { if (cc->ft->getCharSuperClassName(cc) == NULL) { CMSetArrayElementAt(ar, n++, cn, CMPI_chars); } } CMAddArg(out, "assocs", &ar, CMPI_stringA); + + cReg->ft->rUnLock(cReg); } else if (strcasecmp(methodName, "ischild") == 0) { @@ -702,6 +888,8 @@ char *chldn=(char*)CMGetArg(in, "child", NULL).value.string->hdl; char *child; + cReg->ft->rLock(cReg); + st.rc = CMPI_RC_ERR_FAILED; if (ul) for (child=(char*)ul->ft->getFirst(ul); child; child=(char*)ul->ft->getNext(ul)) { @@ -710,6 +898,8 @@ break; } } + + cReg->ft->rUnLock(cReg); } else if (strcasecmp(methodName, "_startup") == 0) { Index: cimXmlRequest.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- cimXmlRequest.h 9 Mar 2005 12:25:10 -0000 1.1.1.1 +++ cimXmlRequest.h 11 Apr 2005 23:13:41 -0000 1.2 @@ -49,7 +49,7 @@ typedef struct cimXmlRequestContext { char *cimXmlDoc; - char *principle; + char *principal; char *host; unsigned long cimXmlDocLength; struct commHndl *commHndl; Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- providerMgr.c 30 Mar 2005 12:30:51 -0000 1.3 +++ providerMgr.c 11 Apr 2005 23:13:42 -0000 1.4 @@ -996,7 +996,7 @@ _SFCB_ENTER(TRACE_PROVIDERMGR, "getConstClass"); path = TrackedCMPIObjectPath(ns, cn, &rc); - sreq.principle = setCharsMsgSegment("$$"); + sreq.principal = setCharsMsgSegment("$$"); sreq.objectPath = setObjectPathMsgSegment(path); req.nameSpace = setCharsMsgSegment((char *) ns); @@ -1048,7 +1048,7 @@ path = NewCMPIObjectPath(ns, cn, st); sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment("$$"); + sreq.principal = setCharsMsgSegment("$$"); req.nameSpace = setCharsMsgSegment((char *) ns); req.className = setCharsMsgSegment((char *) cn); @@ -1101,7 +1101,7 @@ sreq.out = setArgsMsgSegment(NULL); sreq.objectPath = setObjectPathMsgSegment(path); sreq.method = setCharsMsgSegment(method); - sreq.principle = setCharsMsgSegment("$$"); + sreq.principal = setCharsMsgSegment("$$"); binCtx->oHdr = &req; binCtx->bHdr = &sreq.hdr; Index: cimXmlParser.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlParser.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cimXmlParser.h 30 Mar 2005 12:30:51 -0000 1.2 +++ cimXmlParser.h 11 Apr 2005 23:13:41 -0000 1.3 @@ -241,6 +241,7 @@ XtokValueArray list; } XtokPropertyList; + typedef struct xtokParamValue { struct xtokParamValue *next; char *name; @@ -257,6 +258,56 @@ } XtokParamValues; +typedef struct xtokParam { + struct xtokParam *next; + XtokQualifiers qualifiers; + XtokQualifier qualifier; + int qPart; + int pType; + char *name; + char *refClass; + char *arraySize; + CMPIType type; +} XtokParam; + +typedef struct xtokParams { + XtokParam *last, *first; // must be free'd +} XtokParams; + + +typedef struct xtokMethod { + struct xtokMethod *next; + XtokParams params; + char *name; + char *classOrigin; + int propagated; + CMPIType type; +} XtokMethod; + +typedef struct xtokMethodPart { + XtokParam param; + int qPart; + XtokQualifier qualifier; +} XtokMethodPart; + +typedef struct xtokMethodPartList { + XtokQualifiers qualifiers; + XtokParams params; +} XtokMethodPartList; + +typedef struct xtokMethods { + XtokMethod *last, *first; // must be free'd +} XtokMethods; + + +typedef struct xtokClass { + char *className; + char *superClass; + XtokProperties properties; + XtokQualifiers qualifiers; + XtokMethods methods; +} XtokClass; + /* * methodCall @@ -384,6 +435,22 @@ /* + * createClass +*/ + +typedef struct xtokCreateClassParm { + XtokClass cls; +} XtokCreateClassParm; + +typedef struct xtokCreateClass { + OperationHdr op; + XtokClass cls; + char *className; + char *superClass; +} XtokCreateClass; + + +/* * createInstance */ @@ -622,6 +689,7 @@ RequestHdr reqHdr; XtokProperties properties; XtokQualifiers qualifiers; + XtokMethods methods; XtokParamValues paramValues; jmp_buf env; } ParserControl; Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 1 Apr 2005 15:19:28 -0000 1.8 +++ Makefile.am 11 Apr 2005 23:13:34 -0000 1.9 @@ -84,7 +84,8 @@ queryLexer.l \ queryOperation.c \ queryStatement.c \ - cimXmlGen.c + cimXmlGen.c \ + mrwlock.c libsfcBrokerCore_la_CFLAGS = @SFCB_CMPI_OS@ @SFCB_CMPI_PLATFORM@ @@ -150,7 +151,8 @@ hashtable.h utilft.h \ cmpidt.h cmpift.h cmpiftx.h cmpimacs.h cmpimacsx.h cmpios.h fileRepository.h \ selectexp.h queryOperation.h authorizationUtil.h authorizationEnum.c \ - sfcVersion.h + sfcVersion.h mrwlock.h + EXTRA_DIST=sfcb.cfg.pre.in sfcb.spec sfcbrepos.sh.in sfcbstage.sh.in \ sfcb.init-redhat sfcb.init-suse sfcb.init-none regressionTests doc Index: trace.h =================================================================== RCS file: /cvsroot/sblim/sfcb/trace.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- trace.h 9 Mar 2005 12:25:14 -0000 1.1.1.1 +++ trace.h 11 Apr 2005 23:13:42 -0000 1.2 @@ -111,6 +111,7 @@ #define TRACE_SOCKETS 4096 #define TRACE_MEMORYMGR 8192 #define TRACE_MSGQUEUE 16384 +#define TRACE_XMLPARSING 32768 typedef void sigHandler(int); Index: cmpidt.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cmpidt.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- cmpidt.h 9 Mar 2005 12:25:10 -0000 1.1.1.1 +++ cmpidt.h 11 Apr 2005 23:13:41 -0000 1.2 @@ -370,7 +370,7 @@ #define CMPI_FLAG_IncludeClassOrigin 8 #define CMPIInvocationFlags "CMPIInvocationFlags" - #define CMPIPrinciple "CMPIPrinciple" + #define CMPIPrincipal "CMPIPrincipal" typedef enum _CMPIrc { CMPI_RC_OK =0, Index: cimXmlParser.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlParser.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- cimXmlParser.c 9 Mar 2005 12:25:09 -0000 1.1.1.1 +++ cimXmlParser.c 11 Apr 2005 23:13:41 -0000 1.2 @@ -27,6 +27,7 @@ #include "cimXmlParser.h" #include "cimXmlOps.h" #include "cimXmlRequest.h" +#include "trace.h" static int attrsOk(XmlBuffer * xb, const XmlElement * e, XmlAttr * r, @@ -469,6 +470,9 @@ if (strcasecmp(attr[0].attr, "execQuery") == 0) return XTOK_EXECQUERY; + if (strcasecmp(attr[0].attr, "createClass") == 0) + return XTOK_CREATECLASS; + if (strcasecmp(attr[0].attr, "deleteClass") == 0) return unsupported(parm); if (strcasecmp(attr[0].attr, "getProperty") == 0) @@ -609,6 +613,7 @@ {"propertylist", XTOK_IP_PROPERTYLIST}, {"querylanguage", XTOK_IP_QUERYLANG}, {"query", XTOK_IP_QUERY}, + {"newclass", XTOK_IP_CLASS}, }; static int procIParamValue(YYSTYPE * lvalp, ParserControl * parm) @@ -705,6 +710,26 @@ return 0; } +static int procClass(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = { + {"NAME"}, + {"SUPERCLASS"}, + {NULL} + }; + XmlAttr attr[2]; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "CLASS")) { + if (attrsOk(parm->xmb, elm, attr, "CLASS", ZTOK_CLASS)) { + lvalp->xtokClass.className = attr[0].attr; + lvalp->xtokClass.superClass = attr[1].attr; + return XTOK_CLASS; + } + } + return 0; +} + static int procKeyValue(YYSTYPE * lvalp, ParserControl * parm) { static XmlElement elm[] = { @@ -966,7 +991,6 @@ {NULL} }; XmlAttr attr[4]; - int i, m; memset(attr, 0, sizeof(attr)); if (tagEquals(parm->xmb, "PROPERTY.REFERENCE")) { @@ -985,6 +1009,151 @@ return 0; } +static int procMethod(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = { {"NAME"}, + {"TYPE"}, + {"CLASSORIGIN"}, + {"PROPAGATED"}, + {NULL} + }; + XmlAttr attr[4]; + int i, m; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "METHOD")) { + attr[1].attr = NULL; + if (attrsOk(parm->xmb, elm, attr, "METHOD", ZTOK_METHODDEF)) { + memset(&lvalp->xtokMethod, 0, sizeof(XtokMethod)); + lvalp->xtokMethod.name = attr[0].attr; + lvalp->xtokMethod.type = (CMPIType) - 1; + if (attr[1].attr) + for (i = 0, m = sizeof(types) / sizeof(Types); i < m; i++) { + if (strcasecmp(attr[1].attr, types[i].str) == 0) { + lvalp->xtokMethod.type = types[i].type; + break; + } + } + lvalp->xtokMethod.classOrigin = attr[2].attr; + if (attr[3].attr) + lvalp->xtokMethod.propagated = !strcasecmp(attr[3].attr, "true"); + return XTOK_METHODDEF; + } + } + return 0; +} + +static int procParam(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = + { {"NAME"}, + {"TYPE"}, + {NULL} + }; + XmlAttr attr[2]; + int i,m; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "PARAMETER")) { + attr[1].attr = NULL; + if (attrsOk(parm->xmb, elm, attr, "PARAMETER", ZTOK_PARAM)) { + memset(&lvalp->xtokParam, 0, sizeof(XtokParam)); + lvalp->xtokParam.pType = ZTOK_PARAM; + lvalp->xtokParam.name = attr[0].attr; + lvalp->xtokParam.type = (CMPIType) - 1; + if (attr[1].attr) + for (i = 0, m = sizeof(types) / sizeof(Types); i < m; i++) { + if (strcasecmp(attr[1].attr, types[i].str) == 0) { + lvalp->xtokParam.type = types[i].type; + break; + } + } + return XTOK_PARAM; + } + } + return 0; +} + +static int procParamArray(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = + { {"NAME"}, + {"TYPE"}, + {"ARRAYSIZE"}, + {NULL} + }; + XmlAttr attr[3]; + int i,m; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "PARAMETER.ARRAY")) { + attr[1].attr = NULL; + if (attrsOk(parm->xmb, elm, attr, "PARAMETER.ARRAY", ZTOK_PARAM)) { + memset(&lvalp->xtokParam, 0, sizeof(XtokParam)); + lvalp->xtokParam.pType = ZTOK_PARAMARRAY; + lvalp->xtokParam.name = attr[0].attr; + lvalp->xtokParam.type = (CMPIType) - 1; + if (attr[1].attr) + for (i = 0, m = sizeof(types) / sizeof(Types); i < m; i++) { + if (strcasecmp(attr[1].attr, types[i].str) == 0) { + lvalp->xtokParam.type = types[i].type; + break; + } + } + lvalp->xtokParam.arraySize = attr[2].attr; + return XTOK_PARAM; + } + } + return 0; +} + +static int procParamRef(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = + { {"NAME"}, + {"REFERENCECLASS"}, + {NULL} + }; + XmlAttr attr[2]; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "PARAMETER.REFERENCE")) { + attr[1].attr = NULL; + if (attrsOk(parm->xmb, elm, attr, "PARAMETER.REFERENCE", ZTOK_PARAM)) { + memset(&lvalp->xtokParam, 0, sizeof(XtokParam)); + lvalp->xtokParam.pType = ZTOK_PARAMREF; + lvalp->xtokParam.name = attr[0].attr; + lvalp->xtokParam.refClass = attr[1].attr; + return XTOK_PARAM; + } + } + return 0; +} + +static int procParamRefArray(YYSTYPE * lvalp, ParserControl * parm) +{ + static XmlElement elm[] = + { {"NAME"}, + {"REFERENCECLASS"}, + {"ARRAYSIZE"}, + {NULL} + }; + XmlAttr attr[3]; + + memset(attr, 0, sizeof(attr)); + if (tagEquals(parm->xmb, "PARAMETER.REFARRAY")) { + attr[1].attr = NULL; + if (attrsOk(parm->xmb, elm, attr, "PARAMETER.REFARRAY", ZTOK_PARAM)) { + memset(&lvalp->xtokParam, 0, sizeof(XtokParam)); + lvalp->xtokParam.pType = ZTOK_PARAMREFARRAY; + lvalp->xtokParam.name = attr[0].attr; + lvalp->xtokParam.refClass = attr[1].attr; + lvalp->xtokParam.arraySize = attr[2].attr; + return XTOK_PARAM; + } + } + return 0; +} static Tags tags[] = { @@ -1015,29 +1184,38 @@ {"PROPERTY.ARRAY", procPropertyArray, ZTOK_PROPERTYARRAY}, {"PROPERTY", procProperty, ZTOK_PROPERTY}, {"QUALIFIER", procQualifier, ZTOK_QUALIFIER}, + {"PARAMETER.ARRAY", procParamArray, ZTOK_PARAMARRAY}, + {"PARAMETER.REFERENCE", procParamRef, ZTOK_PARAMREF}, + {"PARAMETER.REFARRAY", procParamRefArray, ZTOK_PARAMREFARRAY}, + {"PARAMETER", procParam, ZTOK_PARAM}, + {"METHOD", procMethod, ZTOK_METHODDEF}, + {"CLASS", procClass, ZTOK_CLASS}, {"?xml", procXml, ZTOK_XML}, }; int yylex(YYSTYPE * lvalp, ParserControl * parm) { - int i, m; + int i, m, rc; char *next; + _SFCB_ENTER(TRACE_XMLPARSING, "yylex"); + for (;;) { next = nextTag(parm->xmb); - if (next == NULL) - return 0; - //printf(">> %.32s\n",next); + if (next == NULL) { + _SFCB_RETURN(0); + } + _SFCB_TRACE(1, ("--- token: %.32s\n",next)); if (parm->xmb->eTagFound) { parm->xmb->eTagFound = 0; - return parm->xmb->etag; + _SFCB_RETURN(parm->xmb->etag); } if (*next == '/') { for (i = 0, m = sizeof(tags); i < m; i++) { if (nextEquals(next + 1, tags[i].tag) == 1) { skipTag(parm->xmb); - return tags[i].etag; + _SFCB_RETURN(tags[i].etag); } } } @@ -1050,13 +1228,14 @@ for (i = 0, m = sizeof(tags); i < m; i++) { if (nextEquals(next, tags[i].tag) == 1) { //printf("+++ %d\n",i); - return tags[i].process(lvalp, parm); + rc=tags[i].process(lvalp, parm); + _SFCB_RETURN(rc); } } } break; } - return 0; + _SFCB_RETURN(0); } int yyerror(char *s) Index: constClass.c =================================================================== RCS file: /cvsroot/sblim/sfcb/constClass.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- constClass.c 21 Mar 2005 14:22:38 -0000 1.2 +++ constClass.c 11 Apr 2005 23:13:41 -0000 1.3 @@ -330,4 +330,12 @@ if (rc.rc==0) count++; } return count; +} + +CMPIConstClass initConstClass(ClClass *cl) +{ + CMPIConstClass c; + c.hdl=cl; + c.ft=&ift; + return c; } \ No newline at end of file Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cimXmlRequest.c 11 Apr 2005 22:50:27 -0000 1.4 +++ cimXmlRequest.c 11 Apr 2005 23:13:41 -0000 1.5 @@ -75,6 +75,7 @@ extern MsgSegment setInstanceMsgSegment(CMPIInstance * ci); extern MsgSegment setCharsMsgSegment(char *str); extern MsgSegment setArgsMsgSegment(CMPIArgs * args); +extern MsgSegment setConstClassMsgSegment(CMPIConstClass * cl); extern void closeProviderContext(BinRequestContext * ctx); extern CMPIStatus arraySetElementNotTrackedAt(CMPIArray * array, CMPICount index, CMPIValue * val, CMPIType type); @@ -526,7 +527,7 @@ path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq->objectPath = setObjectPathMsgSegment(path); - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); for (i=0; i<req->properties; i++) sreq->properties[i]=setCharsMsgSegment(req->propertyList[i]); @@ -563,6 +564,104 @@ _SFCB_RETURN(ctxErrResponse(hdr, &binCtx,0)); } +extern int ClClassAddQualifier(ClObjectHdr * hdr, ClSection * qlfs, + const char *id, CMPIData d); +extern int ClClassAddProperty(ClClass * cls, const char *id, CMPIData d); +extern void *ClObjectGetClSection(ClObjectHdr * hdr, ClSection * s); +extern int ClClassAddPropertyQualifier(ClObjectHdr * hdr, ClProperty * p, + const char *id, CMPIData d); +extern ClClass *ClClassNew(const char *cn, const char *pa); +extern ClClass *ClClassRebuildClass(ClClass * cls, void *area); +extern void ClClassFreeClass(ClClass * cls); +extern char *ClClassToString(ClClass * cls); +extern CMPIConstClass initConstClass(ClClass *cl); + +static RespSegments createClass(CimXmlRequestContext * ctx, RequestHdr * hdr) +{ + _SFCB_ENTER(TRACE_CIMXMLPROC, "createClass"); + CMPIObjectPath *path; + CMPIConstClass cls; + ClClass *cl; + int irc; + BinRequestContext binCtx; + BinResponseHdr *resp; + CreateClassReq sreq = BINREQ(OPS_CreateClass, 3); + + XtokProperty *p = NULL; + XtokProperties *ps = NULL; + XtokQualifiers *qs = NULL; + XtokQualifier *q = NULL; + XtokClass *c; + CMPIData d; + + printf("--- createClass request\n"); + + memset(&binCtx,0,sizeof(BinRequestContext)); + XtokCreateClass *req = (XtokCreateClass *) hdr->cimRequest; + + path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); + + cl = ClClassNew(req->op.className.data, req->superClass ? req->superClass : NULL); + cls=initConstClass(cl); + c=&req->cls; + + qs=&c->qualifiers; + for (q=qs->first; q; q=q->next) { + d.state=CMPI_goodValue; + d.value=str2CMPIValue(q->type,q->value,NULL); + d.type=q->type; + ClClassAddQualifier(&cl->hdr, &cl->qualifiers, q->name, d); + } + + ps=&c->properties; + for (p=ps->first; p; p=p->next) { + ClProperty *prop; + int propId; + d.state=CMPI_goodValue; + d.value=str2CMPIValue(p->valueType,p->value,NULL); + d.type=p->valueType; + propId=ClClassAddProperty(cl, p->name, d); + + qs=&p->qualifiers; + prop=((ClProperty*)ClObjectGetClSection(&cl->hdr,&cl->properties))+propId-1; + for (q=qs->first; q; q=q->next) { + d.state=CMPI_goodValue; + d.value=str2CMPIValue(q->type,q->value,NULL); + d.type=q->type; + ClClassAddPropertyQualifier(&cl->hdr, prop, q->name, d); + } + } + + sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.path = setObjectPathMsgSegment(path); + sreq.cls = setConstClassMsgSegment(&cls); + + binCtx.oHdr = (OperationHdr *) req; + binCtx.bHdr = &sreq.hdr; + binCtx.rHdr = hdr; + binCtx.bHdrSize = sizeof(sreq); + binCtx.chunkedMode=binCtx.xmlAs=binCtx.noResp=0; + binCtx.pAs=NULL; + + _SFCB_TRACE(1, ("--- Getting Provider context")); + irc = getProviderContext(&binCtx, (OperationHdr *) req); + printf("--- Getting Provider context %d\n",irc); + + _SFCB_TRACE(1, ("--- Provider context gotten")); + if (irc == MSG_X_PROVIDER) { + resp = invokeProvider(&binCtx); + closeProviderContext(&binCtx); + resp->rc--; + if (resp->rc == CMPI_RC_OK) { + _SFCB_RETURN(iMethodResponse(hdr, NULL)); + } + _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp->rc, + (char*)resp->object[0].data))); + } + closeProviderContext(&binCtx); + _SFCB_RETURN(ctxErrResponse(hdr, &binCtx,0)); +} + static RespSegments enumClassNames(CimXmlRequestContext * ctx, RequestHdr * hdr) { @@ -579,7 +678,7 @@ path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); sreq.flags = req->flags; binCtx.oHdr = (OperationHdr *) req; @@ -630,7 +729,7 @@ path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); sreq.flags = req->flags; binCtx.oHdr = (OperationHdr *) req; @@ -708,7 +807,7 @@ CMAddKey(path, req->instanceName.bindings.keyBindings[i].name, valp, type); } sreq->objectPath = setObjectPathMsgSegment(path); - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); for (i=0; i<req->properties; i++) sreq->properties[i]=setCharsMsgSegment(req->propertyList[i]); @@ -770,7 +869,7 @@ type); } sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); binCtx.oHdr = (OperationHdr *) req; binCtx.bHdr = &sreq.hdr; @@ -822,7 +921,7 @@ } sreq.instance = setInstanceMsgSegment(inst); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); path = inst->ft->getObjectPath(inst,NULL); sreq.path = setObjectPathMsgSegment(path); @@ -900,7 +999,7 @@ } sreq->instance = setInstanceMsgSegment(inst); sreq->path = setObjectPathMsgSegment(path); - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); binCtx.oHdr = (OperationHdr *) req; binCtx.bHdr = &sreq->hdr; @@ -945,7 +1044,7 @@ path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); binCtx.oHdr = (OperationHdr *) req; binCtx.bHdr = &sreq.hdr; @@ -997,7 +1096,7 @@ sreq->count=req->properties+2; path = NewCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); sreq->objectPath = setObjectPathMsgSegment(path); for (i=0; i<req->properties; i++) { @@ -1077,7 +1176,7 @@ path = NewCMPIObjectPath(req->op.nameSpace.data, *fCls, NULL); sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); sreq.query = setCharsMsgSegment((char*)req->op.query.data); sreq.queryLang = setCharsMsgSegment((char*)req->op.queryLang.data); @@ -1163,7 +1262,7 @@ sreq.role = req->op.role; sreq.assocClass = req->op.assocClass; sreq.resultRole = req->op.resultRole; - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); req->op.className = req->op.assocClass; @@ -1239,7 +1338,7 @@ sreq->assocClass = req->op.assocClass; sreq->resultRole = req->op.resultRole; sreq->flags = req->flags; - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); for (i=0; i<req->properties; i++) sreq->properties[i]=setCharsMsgSegment(req->propertyList[i]); @@ -1325,7 +1424,7 @@ sreq.resultClass = req->op.resultClass; sreq.role = req->op.role; - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); req->op.className = req->op.resultClass; @@ -1400,7 +1499,7 @@ sreq->resultClass = req->op.resultClass; sreq->role = req->op.role; sreq->flags = req->flags; - sreq->principle = setCharsMsgSegment(ctx->principle); + sreq->principal = setCharsMsgSegment(ctx->principal); for (i=0; i<req->properties; i++) sreq->properties[i]=setCharsMsgSegment(req->propertyList[i]); @@ -1481,7 +1580,7 @@ CMAddKey(path, req->instanceName.bindings.keyBindings[i].name, valp, type); } sreq.objectPath = setObjectPathMsgSegment(path); - sreq.principle = setCharsMsgSegment(ctx->principle); + sreq.principal = setCharsMsgSegment(ctx->principal); for (p = req->paramValues.first; p; p = p->next) { CMPIValue val = str2CMPIValue(p->type, p->value.value, &p->valueRef); @@ -1539,7 +1638,7 @@ {getInstance}, //OPS_GetInstance 2 {notSupported}, //OPS_DeleteClass 3 {deleteInstance}, //OPS_DeleteInstance 4 - {notSupported}, //OPS_CreateClass 5 + {createClass}, //OPS_CreateClass 5 {createInstance}, //OPS_CreateInstance 6 {notSupported}, //OPS_ModifyClass 7 {modifyInstance}, ... [truncated message content] |
From: Adrian S. <a3s...@us...> - 2005-04-11 23:13:50
|
Update of /cvsroot/sblim/sfcb/regressionTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1474/regressionTests Modified Files: broker.sh Log Message: Added mrwlock.c and mrwlock.h files Added first stage of support for createClass operation Changed all occurrences of principle to principal Added extra message indicatin which sfcb.cfg file in use Updated broker.sh to use sfcbd instead of sfcBroker Index: broker.sh =================================================================== RCS file: /cvsroot/sblim/sfcb/regressionTests/broker.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- broker.sh 15 Mar 2005 02:39:26 -0000 1.3 +++ broker.sh 11 Apr 2005 23:13:42 -0000 1.4 @@ -1 +1 @@ -sfcBroker -I -c sfcb.cfg $1 $2 $3 $4 +sfcbd -I -c sfcb.cfg $1 $2 $3 $4 |
From: Adrian S. <a3s...@us...> - 2005-04-11 22:50:35
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20951 Modified Files: cimXmlRequest.c Log Message: Problem 1181005 An instanceName without keyBindings means either a singleton or a class specification is involved. Both cases are not supported for the moment by sfcBroker for the associators, associatorNames, references and referenceNames operations. Both cases are very rare in CIM processing, when deemed absolutely needed, please generate a formal request. cimXmlRequest.c is updated to generate a CMPI_RC_ERR_NOT_SUPPORTED rc accompanied with the followiing message: "<operation> operation for classes not supported". Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cimXmlRequest.c 21 Mar 2005 14:22:38 -0000 1.3 +++ cimXmlRequest.c 11 Apr 2005 22:50:27 -0000 1.4 @@ -1151,6 +1151,12 @@ &val, &type); CMAddKey(path, req->objectName.bindings.keyBindings[i].name, valp, type); } + + if (req->objectName.bindings.next==0) { + _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(CMPI_RC_ERR_NOT_SUPPORTED, + "AssociatorNames operation for classes not supported"))); + } + sreq.objectPath = setObjectPathMsgSegment(path); sreq.resultClass = req->op.resultClass; @@ -1220,6 +1226,12 @@ &val, &type); CMAddKey(path, req->objectName.bindings.keyBindings[i].name, valp, type); } + + if (req->objectName.bindings.next==0) { + _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(CMPI_RC_ERR_NOT_SUPPORTED, + "Associator operation for classes not supported"))); + } + sreq->objectPath = setObjectPathMsgSegment(path); sreq->resultClass = req->op.resultClass; @@ -1303,6 +1315,12 @@ &val, &type); CMAddKey(path, req->objectName.bindings.keyBindings[i].name, valp, type); } + + if (req->objectName.bindings.next==0) { + _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(CMPI_RC_ERR_NOT_SUPPORTED, + "ReferenceNames operation for classes not supported"))); + } + sreq.objectPath = setObjectPathMsgSegment(path); sreq.resultClass = req->op.resultClass; @@ -1371,6 +1389,12 @@ &val, &type); CMAddKey(path, req->objectName.bindings.keyBindings[i].name, valp, type); } + + if (req->objectName.bindings.next==0) { + _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(CMPI_RC_ERR_NOT_SUPPORTED, + "References operation for classes not supported"))); + } + sreq->objectPath = setObjectPathMsgSegment(path); sreq->resultClass = req->op.resultClass; |
From: Adrian S. <a3s...@us...> - 2005-04-11 22:07:01
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27983 Modified Files: cimXmlOps.y Log Message: Partial fix for 1181005. Updated xml parser grammar to accept instanceName withou keyBindings. Now getting "provider not found" Index: cimXmlOps.y =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlOps.y,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cimXmlOps.y 30 Mar 2005 12:30:51 -0000 1.2 +++ cimXmlOps.y 11 Apr 2005 22:04:46 -0000 1.3 @@ -15,7 +15,6 @@ * Author: Adrian Schuur <sc...@de...> * * Description: - * CMPI broker encapsulated functionality. * * CIM XML grammar for sfcb. * @@ -103,6 +102,33 @@ else qs->first=nq; qs->last=nq; } + +static void addMethod(XtokMethods *ms, XtokMethod *m) +{ + XtokMethod *nm; + nm=(XtokMethod*)malloc(sizeof(XtokMethod)); + memcpy(nm,m,sizeof(XtokMethod)); + nm->next=NULL; + if (ms->last) { + ms->last->next=nm; + } + else ms->first=nm; + ms->last=nm; +} + +static void addParam(XtokParams *ps, XtokParam *p) +{ + XtokParam *np; + np=(XtokParam*)malloc(sizeof(XtokParam)); + memcpy(np,p,sizeof(XtokParam)); + np->next=NULL; + if (ps->last) { + ps->last->next=np; + } + else ps->first=np; + ps->last=np; +} + %} %pure_parser @@ -141,6 +167,7 @@ XtokKeyBindings xtokKeyBindings; XtokKeyValue xtokKeyValue; + XtokClass xtokClass; XtokInstance xtokInstance; XtokNamedInstance xtokNamedInstance; @@ -148,10 +175,17 @@ XtokPropertyPart xtokPropertyPart; XtokPropertyPartList xtokPropertyPartList; + XtokMethod xtokMethod; + XtokMethodPart xtokMethodPart; + XtokMethodPartList xtokMethodPartList; + XtokQualifier xtokQualifier; - XtokParamValue xtokParamValue; - + XtokParamValue xtokParamValue; + XtokParam xtokParam; +/* XtokParamPart xtokParamPart; + XtokParamPartList xtokParamPartList; +*/ XtokMethodCall xtokMethodCall; XtokGetClassParmsList xtokGetClassParmsList; @@ -176,6 +210,9 @@ XtokDeleteInstance xtokDeleteInstance; XtokDeleteInstanceParm xtokDeleteInstanceParm; + XtokCreateClass xtokCreateClass; + XtokCreateClassParm xtokCreateClassParm; + XtokCreateInstance xtokCreateInstance; XtokCreateInstanceParm xtokCreateInstanceParm; @@ -236,6 +273,10 @@ %type <xtokEnumClassesParmsList> enumClassesParmsList %type <xtokEnumClassesParms> enumClassesParms +%token <xtokCreateClass> XTOK_CREATECLASS +%type <xtokCreateClass> createClass +%type <xtokCreateClassParm> createClassParm + %token <xtokCreateInstance> XTOK_CREATEINSTANCE %type <xtokCreateInstance> createInstance %type <xtokCreateInstanceParm> createInstanceParm @@ -358,6 +399,7 @@ %token <className> XTOK_IP_RESULTROLE %token <className> XTOK_IP_QUERY %token <className> XTOK_IP_QUERYLANG +%token <clasz> XTOK_IP_CLASS %token <xtokPropertyList> XTOK_IP_PROPERTYLIST %type <boolValue> boolValue @@ -383,6 +425,33 @@ %type <xtokPropertyPartList> propertyPartList %type <xtokPropertyPartList> propertyReferencePartList +%token <xtokParam> XTOK_PARAM +%type <xtokParam> param +%token <intValue> ZTOK_PARAM +%token <xtokParam> XTOK_PARAMARRAY +%token <intValue> ZTOK_PARAMARRAY +%token <xtokParam> XTOK_PARAMREF +%token <intValue> ZTOK_PARAMREF +%token <xtokParam> XTOK_PARAMREFARRAY +%token <intValue> ZTOK_PARAMREFARRAY + +%token <xtokMethodPart> XTOK_METHODPART +%type <xtokMethodPart> methodPart +%token <intValue> ZTOK_METHODPART + +%token <xtokMethodPartList> XTOK_METHODPARTLIST +%type <xtokMethodPartList> methodPartList +%token <intValue> ZTOK_METHODPARTLIST + +%token <xtokMethod> XTOK_METHODDEF +//%type <xtokMethod> methodDef +%token <intValue> ZTOK_METHODDEF + +%token <xtokClass> XTOK_CLASS +%token <intValue> ZTOK_CLASS +%type <xtokClass> clasz +%type <xtokClassParts> classParts + %token <xtokInstance> XTOK_INSTANCE %token <intValue> ZTOK_INSTANCE %type <xtokInstance> instance @@ -442,9 +511,6 @@ : XTOK_GETCLASS getClass ZTOK_IMETHODCALL { } - | XTOK_DELETECLASS deleteClass ZTOK_IMETHODCALL - { - } | XTOK_ENUMCLASSNAMES enumClassNames ZTOK_IMETHODCALL { } @@ -487,6 +553,12 @@ | XTOK_METHODCALL methodCall ZTOK_METHODCALL { } + | XTOK_DELETECLASS deleteClass ZTOK_IMETHODCALL + { + } + | XTOK_CREATECLASS createClass ZTOK_IMETHODCALL + { + } ; /* @@ -889,6 +961,43 @@ /* + * createClass +*/ + + +createClass + : localNameSpacePath + { + $$.op.count = 3; + $$.op.type = OPS_CreateClass; + $$.op.nameSpace=setCharsMsgSegment($1); + $$.op.className=setCharsMsgSegment(NULL); + $$.superClass=NULL; + + setRequest(parm,&$$,sizeof(XtokCreateClass),OPS_CreateClass); + } + | localNameSpacePath createClassParm + { + $$.op.count = 3; + $$.op.type = OPS_CreateClass; + $$.op.nameSpace=setCharsMsgSegment($1); + $$.op.className=setCharsMsgSegment($2.cls.className); + $$.superClass=$2.cls.superClass; + $$.cls = $2.cls; + + setRequest(parm,&$$,sizeof(XtokCreateClass),OPS_CreateClass); + } +; + +createClassParm + : XTOK_IP_CLASS clasz ZTOK_IPARAMVALUE + { + $$.cls = $2; + } +; + + +/* * createInstance */ @@ -1690,6 +1799,117 @@ /* + * class +*/ + + +clasz + : XTOK_CLASS ZTOK_CLASS + { + memset(&$$.properties,0,sizeof($$.properties)); + memset(&$$.qualifiers,0,sizeof($$.qualifiers)); + memset(&$$.methods,0,sizeof($$.methods)); + } + | XTOK_CLASS classPartsList ZTOK_CLASS + { + $$.properties=((ParserControl*)parm)->properties; + $$.qualifiers=((ParserControl*)parm)->qualifiers; + $$.methods=((ParserControl*)parm)->methods; + } +; + +classPartsList + : classParts + { + printf("classPartsList: \n"); + } + | classPartsList classParts + { + printf("classPartsList classParts: \n"); + } +; + + +classParts + : qualifier + { + printf("classParts qualifier: \n"); + addQualifier(&(((ParserControl*)parm)->qualifiers),&$1); + } + | XTOK_PROPERTY propertyPartList ZTOK_PROPERTY + { + $1.value=$2.value; + $1.propType=typeProperty_Value; + addProperty(&(((ParserControl*)parm)->properties),&$1); + } + | XTOK_PROPERTYREFERENCE propertyReferencePartList ZTOK_PROPERTYREFERENCE + { + $1.ref=$2.ref; + $1.propType=typeProperty_Reference; + addProperty(&(((ParserControl*)parm)->properties),&$1); + } + | XTOK_METHODDEF methodPartList + { + printf("classParts: method ?\n"); + addMethod(&(((ParserControl*)parm)->methods),&$1); + } +; + +methodPartList + : methodPart + { + printf("methodPartList: \n"); + if ($1.qPart==1) + addQualifier(&($$.qualifiers),&$1.qualifier); + else addParam(&($$.params), &$1.param); + } + | methodPartList methodPart + { + printf("methodPartList methodPart: \n"); + if ($2.qPart==1) + addQualifier(&($$.qualifiers),&$2.qualifier); + else addParam(&($$.params), &$2.param); + } +; + +methodPart + : ZTOK_METHODDEF + { + printf("methodPart: ZTOK_METHODDEF\n"); + $$.qPart=-1; + } + | qualifier + { + printf("methodPart: qualifier\n"); + $$.qPart=1; + $$.qualifier=$1; + } + | XTOK_PARAM param + { + $$.qPart=0; + $$.param=$1; + } +; + +param + : ZTOK_PARAM + { + printf("param: ZTOK_PARAM\n"); + } + | qualifier + { + printf("param: qualifier\n"); + addQualifier(&($$.qualifiers),&$1); + } + | param qualifier + { + printf("param qualifier: \n"); + addQualifier(&($$.qualifiers),&$2); + } +; + + +/* * instance */ @@ -1753,7 +1973,7 @@ addQualifier(&($$.qualifiers),&$2.qualifier); } else { - $$.value=$1.value; + $$.value=$1.value; // should this be $$.value=$2.value; } } ; @@ -1788,7 +2008,7 @@ addQualifier(&($$.qualifiers),&$2.qualifier); } else { - $$.ref=$1.ref; + $$.ref=$1.ref; // should this be $$.ref=$2.ref; ? } } ; @@ -1825,6 +2045,7 @@ qualifier : XTOK_QUALIFIER value ZTOK_QUALIFIER { + $$.value=$2.value; } ; @@ -1969,7 +2190,13 @@ instanceName - : XTOK_INSTANCENAME keyBindings ZTOK_INSTANCENAME + : XTOK_INSTANCENAME ZTOK_INSTANCENAME + { + $$.className=$1.className; + $$.bindings.next=0; + $$.bindings.keyBindings=NULL; + } + | XTOK_INSTANCENAME keyBindings ZTOK_INSTANCENAME { $$.className=$1.className; $$.bindings=$2; |
From: Adrian S. <a3s...@us...> - 2005-04-11 21:19:12
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv484 Modified Files: internalProvider.c Log Message: Fixing 1180671. InternalProvider.c returning bad status when no instances found for enumerateInstance(Name)s Index: internalProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/internalProvider.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- internalProvider.c 9 Mar 2005 12:25:12 -0000 1.1.1.1 +++ internalProvider.c 11 Apr 2005 21:19:00 -0000 1.2 @@ -235,6 +235,7 @@ CMPIObjectPath * ref) { CMPIStatus st = { CMPI_RC_OK, NULL }; + CMPIStatus sti = { CMPI_RC_OK, NULL }; BlobIndex *bi; CMPIString *cn = CMGetClassName(ref, NULL); CMPIString *ns = CMGetNameSpace(ref, NULL); @@ -256,8 +257,8 @@ in=CMNewArgs(Broker,NULL); out=CMNewArgs(Broker,NULL); CMAddArg(in,"class",cns,CMPI_chars); - op=CMNewObjectPath(Broker,nss,"$ClassProvider$",&st); - rv=CBInvokeMethod(Broker,ctx,op,"getallchildren",in,out,&st); + op=CMNewObjectPath(Broker,nss,"$ClassProvider$",&sti); + rv=CBInvokeMethod(Broker,ctx,op,"getallchildren",in,out,&sti); ar=CMGetArg(out,"children",NULL).value.array; if (ar) ac=CMGetArrayCount(ar,NULL); @@ -296,6 +297,7 @@ void(*retFnc)(void*,CMPIInstance*), int ignprov) { CMPIStatus st = { CMPI_RC_OK, NULL }; + CMPIStatus sti = { CMPI_RC_OK, NULL }; BlobIndex *bi; CMPIString *cn = CMGetClassName(ref, NULL); CMPIString *ns = CMGetNameSpace(ref, NULL); @@ -316,10 +318,12 @@ out=CMNewArgs(Broker,NULL); if (ignprov) CMAddArg(in,"classignoreprov",cns,CMPI_chars); else CMAddArg(in,"class",cns,CMPI_chars); - op=CMNewObjectPath(Broker,nss,"$ClassProvider$",&st); + + op=CMNewObjectPath(Broker,nss,"$ClassProvider$",&sti); _SFCB_TRACE(1,("--- getallchildren")); - rv=CBInvokeMethod(Broker,ctx,op,"getallchildren",in,out,&st); - _SFCB_TRACE(1,("--- getallchildren rc: %d",st.rc)); + rv=CBInvokeMethod(Broker,ctx,op,"getallchildren",in,out,&sti); + _SFCB_TRACE(1,("--- getallchildren rc: %d",sti.rc)); + ar=CMGetArg(out,"children",NULL).value.array; if (ar) ac=CMGetArrayCount(ar,NULL); _SFCB_TRACE(1,("--- getallchildren ar: %p count: %d",ar,ac)); @@ -337,6 +341,7 @@ if (i<ac) cns=(char*)CMGetArrayElementAt(ar,i,NULL).value.string->hdl; else cns=NULL; } + _SFCB_RETURN(st); } |
From: Viktor M. <mih...@us...> - 2005-04-11 15:49:11
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30268 Modified Files: acinclude.m4 Log Message: Bug 1179453: CPPFLAGS can be overwritten in certain cases. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/acinclude.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- acinclude.m4 11 Apr 2005 14:28:46 -0000 1.2 +++ acinclude.m4 11 Apr 2005 15:49:02 -0000 1.3 @@ -94,13 +94,13 @@ AC_DEFUN([CHECK_CMPI], [ AC_MSG_CHECKING(for CMPI headers) + CMPI_CPP_FLAGS="$CPPFLAGS" dnl Check just with the standard include paths _CHECK_CMPI(standard) if test "$have_CMPI" == "yes"; then dnl The standard include paths worked. AC_MSG_RESULT(yes) else - CMPI_CPP_FLAGS="$CPPFLAGS" _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ |
From: Viktor M. <mih...@us...> - 2005-04-11 15:45:37
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28384 Modified Files: acinclude.m4 Log Message: Bug 1179453: CPPFLAGS was overwritten, if indication helper in standard place. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-base/acinclude.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- acinclude.m4 11 Apr 2005 14:24:02 -0000 1.3 +++ acinclude.m4 11 Apr 2005 15:45:29 -0000 1.4 @@ -118,12 +118,12 @@ [ 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 - CMPI_CPP_FLAGS="$CPPFLAGS" _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -162,6 +162,7 @@ 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) @@ -169,7 +170,6 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else - INDHELP_CPP_FLAGS="$CPPFLAGS" _DIRS_="/usr/include/sblim \ /usr/local/include/sblim" for _DIR_ in $_DIRS_ |
From: Viktor M. <mih...@us...> - 2005-04-11 14:28:55
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18393 Modified Files: acinclude.m4 Log Message: Bug 1174684: replace sfcBroker with sfcbd. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/acinclude.m4,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- acinclude.m4 5 Apr 2005 13:20:53 -0000 1.1.1.1 +++ acinclude.m4 11 Apr 2005 14:28:46 -0000 1.2 @@ -177,7 +177,7 @@ AC_MSG_RESULT(yes) if test x"$CIMSERVER" == x ; then case $_name in - sfcBroker) CIMSERVER=sfcb;; + sfcbd) CIMSERVER=sfcb;; cimserver) CIMSERVER=pegasus;; owcimomd) CIMSERVER=openwbem;; esac |
From: Viktor M. <mih...@us...> - 2005-04-11 14:24:15
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15637 Modified Files: Makefile.am acinclude.m4 Log Message: Bug 1174684: Replaced sfcBroker by sfcbd. Further, added cmpiOSBase_Common to the list of exported headers. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-base/acinclude.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- acinclude.m4 8 Apr 2005 11:37:12 -0000 1.2 +++ acinclude.m4 11 Apr 2005 14:24:02 -0000 1.3 @@ -241,7 +241,7 @@ AC_MSG_RESULT(yes) if test x"$CIMSERVER" == x ; then case $_name in - sfcBroker) CIMSERVER=sfcb;; + sfcbd) CIMSERVER=sfcb;; cimserver) CIMSERVER=pegasus;; owcimomd) CIMSERVER=openwbem;; esac Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-base/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 6 Apr 2005 16:29:47 -0000 1.1 +++ Makefile.am 11 Apr 2005 14:24:00 -0000 1.2 @@ -115,7 +115,7 @@ dmitest_LDADD = -ldmiinfo # Installable Header Files -sbliminc_HEADERS = OSBase_Common.h +sbliminc_HEADERS = OSBase_Common.h cmpiOSBase_Common.h # Non-Installable Header Files noinst_HEADERS = OSBase_ComputerSystem.h \ @@ -124,7 +124,6 @@ OSBase_Processor.h \ OSBase_BaseBoard.h \ cmpiOSBase_Util.h \ - cmpiOSBase_Common.h \ cmpiOSBase_ComputerSystem.h \ cmpiOSBase_OperatingSystem.h \ cmpiOSBase_UnixProcess.h \ |
From: Viktor M. <mih...@us...> - 2005-04-08 11:49:10
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20022 Modified Files: configure.ac Log Message: Version 1.4.3. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-base/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 8 Apr 2005 11:37:12 -0000 1.2 +++ configure.ac 8 Apr 2005 11:48:47 -0000 1.3 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Providers Base, 1.4.2am, hei...@de...,sblim-cmpi-base) +AC_INIT(SBLIM BaseOS Providers Base, 1.4.3, sbl...@li...,sblim-cmpi-base) AC_CONFIG_SRCDIR([OSBase_Common.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE |
From: Viktor M. <mih...@us...> - 2005-04-08 11:40:49
|
Update of /cvsroot/sblim/indication_helper In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16035 Modified Files: configure.ac Log Message: Version 0.3.1. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/indication_helper/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 7 Apr 2005 14:55:34 -0000 1.3 +++ configure.ac 8 Apr 2005 11:40:39 -0000 1.4 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) -AC_INIT(SBLIM Indication Helper, 0.3, sbl...@ww...,sblim-indication_helper) +AC_INIT(SBLIM Indication Helper, 0.3.1, sbl...@li...,sblim-indication_helper) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([ind_helper.c]) AM_CONFIG_HEADER(config.h) |
From: Viktor M. <mih...@us...> - 2005-04-08 11:37:38
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13926 Modified Files: acinclude.m4 configure.ac Log Message: Bug 1177872: addendum, now search in includedir/sblim for the indication helper header. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-base/acinclude.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- acinclude.m4 6 Apr 2005 16:29:47 -0000 1.1 +++ acinclude.m4 8 Apr 2005 11:37:12 -0000 1.2 @@ -85,6 +85,29 @@ ]) +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 @@ -132,6 +155,47 @@ ) 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], + [ + 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 + INDHELP_CPP_FLAGS="$CPPFLAGS" + _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 Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-base/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.ac 6 Apr 2005 16:29:47 -0000 1.1 +++ configure.ac 8 Apr 2005 11:37:12 -0000 1.2 @@ -28,7 +28,6 @@ # Checks for libraries. AC_CHECK_LIB([ind_helper], [ind_start], [LINDHELP=-lind_helper], [LINDHELP=]) -AC_SUBST(LINDHELP) # Check for required CMPI header files (defined in acinclude.m4) CHECK_CMPI @@ -44,7 +43,19 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([fcntl.h langinfo.h limits.h malloc.h stdlib.h string.h sys/time.h unistd.h]) -AC_CHECK_HEADER([ind_helper.h],[EVENTFLAGS=],[EVENTFLAGS=-DNOEVENTS],[]) + +# Test for indication support +EVENTFLAGS=-DNOEVENTS +if test x$LINDHELP != x; then +# Indication lib is there, what about headers + CHECK_INDHELP_HEADER + if test "$have_INDHELP" == "yes"; then + EVENTFLAGS= + else + LINDHELP= + fi +fi +AC_SUBST(LINDHELP) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST |
From: Viktor M. <mih...@us...> - 2005-04-08 11:35:44
|
Update of /cvsroot/sblim/indication_helper In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12787 Modified Files: Makefile.am Log Message: Bug 1177177: addendum: now install header to $includedir/sblim. Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/indication_helper/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 7 Apr 2005 14:55:33 -0000 1.2 +++ Makefile.am 8 Apr 2005 11:35:36 -0000 1.3 @@ -1,3 +1,5 @@ +sblimincdir = $(includedir)/sblim + INCLUDES = -I$(top_srcdir) RPMREL = @RPMREL@ @@ -16,7 +18,7 @@ SUBDIRS = test libind_helper_la_SOURCES = ind_helper.c libind_helper_la_LDFLAGS = @LIBPTHREAD@ -include_HEADERS = $(top_srcdir)/ind_helper.h +sbliminc_HEADERS = $(top_srcdir)/ind_helper.h EXTRA_DIST = sblim-indication_helper.spec |
From: Viktor M. <mih...@us...> - 2005-04-08 10:30:13
|
Update of /cvsroot/sblim/sfcb/regressionTests/sblim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9672/regressionTests/sblim Modified Files: makefile Log Message: Changed mofc name to sfcbmof. Index: makefile =================================================================== RCS file: /cvsroot/sblim/sfcb/regressionTests/sblim/makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- makefile 30 Mar 2005 12:30:51 -0000 1.3 +++ makefile 8 Apr 2005 10:29:59 -0000 1.4 @@ -4,6 +4,6 @@ rm schema/Linux_BaseRegistration.mof mv schema/Linux_Base.mof schema/Linux_Base.cimv2mof mkdir -p ../repository/root/cimv2 - mofc -I $(CIMDIR) -i CIM_Schema.mof -o ../repository/root/cimv2/classSchemas schema/Linux_Base.cimv2mof + sfcbmof -I $(CIMDIR) -i CIM_Schema.mof -o ../repository/root/cimv2/classSchemas schema/Linux_Base.cimv2mof make -C sblim-wbemcli install HOME=`pwd`/.. make -C sblim-cmpi-base/test install |
From: Viktor M. <mih...@us...> - 2005-04-08 10:30:13
|
Update of /cvsroot/sblim/sfcb/regressionTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9672/regressionTests Modified Files: build.sh Log Message: Changed mofc name to sfcbmof. Index: build.sh =================================================================== RCS file: /cvsroot/sblim/sfcb/regressionTests/build.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- build.sh 15 Mar 2005 23:48:10 -0000 1.6 +++ build.sh 8 Apr 2005 10:29:59 -0000 1.7 @@ -50,8 +50,8 @@ make -C $x install done -echo mofc -I $CIMDIR -i CIM_Schema.mof -o repository/root/interop/classSchemas schema/interop.mof -mofc -I $CIMDIR -i CIM_Schema.mof -o repository/root/interop/classSchemas schema/interop.mof +echo sfcbmof -I $CIMDIR -i CIM_Schema.mof -o repository/root/interop/classSchemas schema/interop.mof +sfcbmof -I $CIMDIR -i CIM_Schema.mof -o repository/root/interop/classSchemas schema/interop.mof mofs='' for x in $dirs @@ -59,8 +59,8 @@ mofs=$mofs' '$x'/schema/*.mof' done -echo mofc -I $CIMDIR -i CIM_Schema.mof -o repository/root/tests/classSchemas $mofs -mofc -I $CIMDIR -i CIM_Schema.mof -o repository/root/tests/classSchemas $mofs +echo sfcbmof -I $CIMDIR -i CIM_Schema.mof -o repository/root/tests/classSchemas $mofs +sfcbmof -I $CIMDIR -i CIM_Schema.mof -o repository/root/tests/classSchemas $mofs regs='schema/baseProvider.reg' for x in $dirs |
From: Robert K. <kie...@us...> - 2005-04-08 09:22:26
|
Update of /cvsroot/sblim/ecute/rsaConfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6942/rsaConfig Modified Files: mofOutput.config mofInput.config Log Message: No need to have these files as binaries Index: mofInput.config =================================================================== RCS file: /cvsroot/sblim/ecute/rsaConfig/mofInput.config,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mofInput.config 14 Feb 2005 11:41:03 -0000 1.12 +++ mofInput.config 8 Apr 2005 09:22:17 -0000 1.13 @@ -1,17 +1,17 @@ -#ECUTE -#Thu Feb 10 13:03:30 CET 2005 -RSAOutputLayout=true -RSAOutputProjectLocation=C\:\\katz\\eclipse\\runtime-workbench-workspace\\test -inputPluginEnableRSA=false -RSAOutputModelDestination=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\samku.emx -outputPluginEnableCMPIProvider=false -RSAOutputQualifiers=true -RSAOutputExistingModel=false -outputPluginEnableRSA=true -RSAOutputModelName=samku -CIMMOFInputImportedMOFFiles=C\:\\katz\\roseSample\\ws-cim-sample1.mof -inputPluginEnableCIMMOF=true -inputPluginEnableRoseREI=false -outputPluginEnableRoseREI=false -RSAOutputReplace=false -outputPluginEnableCIMMOF=false +#ECUTE +#Thu Feb 10 13:03:30 CET 2005 +RSAOutputLayout=true +RSAOutputProjectLocation=C\:\\katz\\eclipse\\runtime-workbench-workspace\\test +inputPluginEnableRSA=false +RSAOutputModelDestination=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\samku.emx +outputPluginEnableCMPIProvider=false +RSAOutputQualifiers=true +RSAOutputExistingModel=false +outputPluginEnableRSA=true +RSAOutputModelName=samku +CIMMOFInputImportedMOFFiles=C\:\\katz\\roseSample\\ws-cim-sample1.mof +inputPluginEnableCIMMOF=true +inputPluginEnableRoseREI=false +outputPluginEnableRoseREI=false +RSAOutputReplace=false +outputPluginEnableCIMMOF=false Index: mofOutput.config =================================================================== RCS file: /cvsroot/sblim/ecute/rsaConfig/mofOutput.config,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mofOutput.config 14 Feb 2005 11:41:03 -0000 1.5 +++ mofOutput.config 8 Apr 2005 09:22:17 -0000 1.6 @@ -1,16 +1,16 @@ -#ECUTE -#Sun Feb 06 12:21:33 CET 2005 -CIMMOFOutputPath=C\:\\CIMMOF -inputPluginEnableRSA=true -CIMMOFOutputCompleteClasses=false -outputPluginEnableCMPIProvider=false -RSAInputAllPackages=false -RSAInputModel=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\Linux.emx -RSAInputSelectedPackages=_M3CQoHd-EdmkkafvBnM9QQ -outputPluginEnableRSA=false -inputPluginEnableCIMMOF=false -inputPluginEnableRoseREI=false -CIMMOFOutputOutputcompleteClasses=false -outputPluginEnableRoseREI=false -outputPluginEnableCIMMOF=true -RSAInputincludeQualifiers=false +#ECUTE +#Sun Feb 06 12:21:33 CET 2005 +CIMMOFOutputPath=C\:\\CIMMOF +inputPluginEnableRSA=true +CIMMOFOutputCompleteClasses=false +outputPluginEnableCMPIProvider=false +RSAInputAllPackages=false +RSAInputModel=C\:\\katz\\eclipse\\runtime-workbench-workspace\\CIM_Models\\Linux.emx +RSAInputSelectedPackages=_M3CQoHd-EdmkkafvBnM9QQ +outputPluginEnableRSA=false +inputPluginEnableCIMMOF=false +inputPluginEnableRoseREI=false +CIMMOFOutputOutputcompleteClasses=false +outputPluginEnableRoseREI=false +outputPluginEnableCIMMOF=true +RSAInputincludeQualifiers=false |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:13:04
|
Update of /cvsroot/sblim/ecute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv964 Modified Files: plugin.xml Log Message: [ 1179045 ] Various issues in eCute4RSA Index: plugin.xml =================================================================== RCS file: /cvsroot/sblim/ecute/plugin.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- plugin.xml 14 Feb 2005 11:41:03 -0000 1.9 +++ plugin.xml 8 Apr 2005 09:12:41 -0000 1.10 @@ -113,7 +113,7 @@ tab="ecute.property.tab.QualifiersPropertySection" id="ecute.property.section.QualifiersPropertySection"> <input type="org.eclipse.uml2.Package"/> - <input type="org.eclipse.uml2.Class"/> + <input type="org.eclipse.uml2.Class"/> <input type="org.eclipse.uml2.AssociationClass"/> <input type="org.eclipse.uml2.Property"/> <input type="org.eclipse.uml2.Operation"/> @@ -121,6 +121,11 @@ <input type="com.ibm.xtools.uml.diagrams.clazz.internal.views.PackageView"/> <input type="com.ibm.xtools.uml.diagrams.clazz.internal.views.ClassView"/> <input type="com.ibm.xtools.uml.diagrams.clazz.internal.views.AssociationClassView"/> + <input type="com.ibm.xtools.uml.diagram.internal.views.UMLTextCompartmentView"/> + <input type="com.ibm.xtools.uml.diagram.internal.views.SourceRoleLabelView"/> + <input type="com.ibm.xtools.uml.diagram.internal.views.SourceMultiplicityLabelView"/> + <input type="com.ibm.xtools.uml.diagram.internal.views.TargetRoleLabelView"/> + <input type="com.ibm.xtools.uml.diagram.internal.views.TargetMultiplicityLabelView"/> </propertySection> </propertySections> </extension> |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:12:03
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/plugins/output/funcionality Modified Files: CMPIProviderGenerator.java RoseREI.java RSAModelCreator.java mofCreator.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: RSAModelCreator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/RSAModelCreator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- RSAModelCreator.java 30 Mar 2005 07:37:33 -0000 1.9 +++ RSAModelCreator.java 8 Apr 2005 09:11:16 -0000 1.10 @@ -17,10 +17,12 @@ import org.eclipse.uml2.Class; import org.eclipse.uml2.Classifier; import org.eclipse.uml2.Comment; +//import org.eclipse.uml2.Constraint; import org.eclipse.uml2.Element; import org.eclipse.uml2.Generalization; import org.eclipse.uml2.Model; import org.eclipse.uml2.MultiplicityElement; +//import org.eclipse.uml2.OpaqueExpression; import org.eclipse.uml2.Operation; import org.eclipse.uml2.Package; import org.eclipse.uml2.PackageableElement; @@ -311,8 +313,8 @@ return OK; } - public void AddAtribute(String dataType, String name, String defaultValue){ - //System.out.println("AddAtribute: " + name); + public void AddAttribute(String dataType, String name, String defaultValue){ + //System.out.println("AddAttribute: " + name); if (defaultValue == null) defaultValue = ""; @@ -549,8 +551,8 @@ while (it.hasNext()){ Diagram diagram = (Diagram) it.next(); if(layout){ - if(!diagram.getChildren().isEmpty()) - diagramHelper.layoutNodes(diagram.getChildren(), ILayoutNodesProvider.DEFAULT_LAYOUT); + if(!diagram.getChildren().isEmpty()) + diagramHelper.layoutNodes(diagram.getChildren(), ILayoutNodesProvider.DEFAULT_LAYOUT); } if(diagram.getName().equalsIgnoreCase("main")){ diagramHelper.setMainDiagram(package_, diagram); @@ -597,6 +599,7 @@ } Generalization generalization = specificClassifier.createGeneralization(generalClassifier); + generalization.setIsSubstitutable(true); //System.out.println("Generalization " + specificClassifier.getQualifiedName() + " ->> " // + generalClassifier.getQualifiedName() + " created."); @@ -630,10 +633,118 @@ if(type == TCLASS){ if(name.equalsIgnoreCase("Composition")&& !value.equalsIgnoreCase("false")){ - lastClassComposition = true; + lastClassComposition = true; + } + /* + // create OCL class constraint + if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ + Package package_ = lastCategory; + Constraint constraint = (Constraint)package_.createOwnedMember(UML2Package.eINSTANCE.getConstraint()); + // constraint.setName(name); + + // create specification + constraint.createSpecification(UML2Package.eINSTANCE.getOpaqueExpression()); + String tempBody, body = ""; + // prepare constraint body content + if(value.startsWith("{")){ + int length = value.length(); + tempBody = value.substring(2, length - 2); + } else { + tempBody = value; + } + int index = tempBody.indexOf(","); + boolean multiple = false; + if (index != -1) + multiple = true; + while (index != -1){ + int length = tempBody.length(); + body = body.concat(tempBody.substring(0, index - 2)); + body = body.concat("\n"); + tempBody = tempBody.substring(index + 2); + index = tempBody.indexOf(","); + } + if (multiple){ + body = body.concat(tempBody.substring(index + 1)); + } + if (!multiple) + body = tempBody; + + //set constraint body and language + ((OpaqueExpression)constraint.getSpecification()).setBody(body); + ((OpaqueExpression)constraint.getSpecification()).setLanguage("OCL"); + + // get the connection line between the constraint and the class + constraint.getConstrainedElements().add(lastClass); + + // add constraint to diagram + ArrayList list = new ArrayList(); + list.add(constraint); + List diagrams = diagramHelper.getDiagrams(package_, UMLDiagramKind.CLASS_LITERAL); + Iterator it = diagrams.iterator(); + Diagram thisDiagram = null; + while(it.hasNext()){ + Diagram diagram = (Diagram)it.next(); + if(diagram.getName().equalsIgnoreCase("Main")) + thisDiagram = diagram; + } + if (thisDiagram != null){ + diagramHelper.createViews(thisDiagram, list); + } + }*/ + } +/* + if(type == TMETHOD){ + + if(name.equalsIgnoreCase("OCL")&& !value.equalsIgnoreCase("null")){ + System.out.println("class: " + lastClass.getName()); + System.out.println("name: " + name + " value: "+ value); + Package package_ = lastCategory; + Constraint constraint = (Constraint)package_.createOwnedMember(UML2Package.eINSTANCE.getConstraint()); + constraint.setName(name); + constraint.createSpecification(UML2Package.eINSTANCE.getOpaqueExpression()); + String tempBody, body = ""; + if(value.startsWith("{")){ + int length = value.length(); + tempBody = value.substring(2, length - 2); + } else { + tempBody = value; + } + int index = tempBody.indexOf(","); + boolean multiple = false; + if (index != -1) + multiple = true; + while (index != -1){ + int length = tempBody.length(); + body = body.concat(tempBody.substring(0, index - 2)); + body = body.concat("\n"); + tempBody = tempBody.substring(index + 2); + index = tempBody.indexOf(","); + } + if (multiple){ + body = body.concat(tempBody.substring(index + 1)); + } + if (!multiple) + body = tempBody; + ((OpaqueExpression)constraint.getSpecification()).setBody(body); + ((OpaqueExpression)constraint.getSpecification()).setLanguage("OCL"); + // TODO add connection line between constraint and class + ArrayList list = new ArrayList(); + list.add(constraint); + List diagrams = diagramHelper.getDiagrams(package_, UMLDiagramKind.CLASS_LITERAL); + Iterator it = diagrams.iterator(); + Diagram thisDiagram = null; + while(it.hasNext()){ + Diagram diagram = (Diagram)it.next(); + if(diagram.getName().equalsIgnoreCase("Main")) + thisDiagram = diagram; + } + if (thisDiagram != null){ + diagramHelper.createViews(thisDiagram, list); + } } } + */ // because of the different role order in RSA theElement is // lastAssocProp2 if type TLINK1 if (type == TLINK1) { @@ -790,7 +901,20 @@ ((Operation)theElement).setIsStatic(true); } } - + + }else if(name.equalsIgnoreCase("ArrayType")){ + if(value.equalsIgnoreCase("Ordered") || + value.equalsIgnoreCase("Indexed") ){ + if(theElement instanceof Property){ + ((Property)theElement).setIsOrdered(true); + }else if(theElement instanceof Parameter){ + ((Parameter)theElement).setIsOrdered(true); + } + } + int stereotypePropertyIndex = ((List) theElement.getValue(cimStereotype, "QualifierName")).size(); + theElement.setValue(cimStereotype, "QualifierName["+stereotypePropertyIndex+"]", name); + theElement.setValue(cimStereotype, "QualifierValue["+stereotypePropertyIndex+"]", value); + }else{ if (value.length() == 0) Index: RoseREI.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/RoseREI.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- RoseREI.java 18 Mar 2005 08:02:49 -0000 1.6 +++ RoseREI.java 8 Apr 2005 09:11:16 -0000 1.7 @@ -533,7 +533,7 @@ lastObject = Parameter; } - public void AddAtribute( + public void AddAttribute( String dataType, String name, String defaultValue) { Index: CMPIProviderGenerator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/CMPIProviderGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CMPIProviderGenerator.java 16 Nov 2004 11:32:22 -0000 1.4 +++ CMPIProviderGenerator.java 8 Apr 2005 09:10:57 -0000 1.5 @@ -1972,7 +1972,7 @@ boolean addQualifiers) { for (int i = 0; i < list.size(); i++) { UMLAttribute at = (UMLAttribute) list.get(i); - MOFGen.AddAtribute(at.dataType, at.name, at.value); + MOFGen.AddAttribute(at.dataType, at.name, at.value); //I use addQualifiers as parameter of "localOnly" //to ensure I get the key qualifier for the repository //mof, since it defines a class without inheritance Index: mofCreator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/mofCreator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mofCreator.java 21 Dec 2004 17:08:31 -0000 1.3 +++ mofCreator.java 8 Apr 2005 09:11:16 -0000 1.4 @@ -335,7 +335,7 @@ files.set(lastFile, file); } - public void AddAtribute( + public void AddAttribute( String dataType, String name, String defaultValue) { @@ -383,12 +383,12 @@ String name2, Object diagram) { if (Assoc1 != null) { - AddAtribute(Assoc1, name1, null); + AddAttribute(Assoc1, name1, null); if (Assoc2 != null) { int temp = posQualifier1; - AddAtribute(Assoc2, name2, null); + AddAttribute(Assoc2, name2, null); posQualifier2 = posQualifier1; posQualifier1 = temp; |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:12:02
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/input/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/plugins/input/funcionality Modified Files: MOFParser.java RSAParser.java RoseParser.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: RoseParser.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/input/funcionality/RoseParser.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- RoseParser.java 10 Dec 2004 10:43:50 -0000 1.10 +++ RoseParser.java 8 Apr 2005 09:11:17 -0000 1.11 @@ -462,7 +462,7 @@ String value = Dispatch.get(attribute, "InitValue").toString(); if (value.length() == 0) value = null; - UMLProgram.AddAtribute(dataType, name, value); + UMLProgram.AddAttribute(dataType, name, value); CreateQualifiers(UMLInterface.TATTRIBUTE, attribute); } } Index: RSAParser.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/input/funcionality/RSAParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- RSAParser.java 11 Jan 2005 08:28:22 -0000 1.4 +++ RSAParser.java 8 Apr 2005 09:11:17 -0000 1.5 @@ -387,7 +387,7 @@ } - umlProgram.AddAtribute(dataType, name, value); + umlProgram.AddAttribute(dataType, name, value); createQualifiers(UMLInterface.TATTRIBUTE, attribute); } } Index: MOFParser.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/input/funcionality/MOFParser.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- MOFParser.java 21 Dec 2004 17:08:32 -0000 1.5 +++ MOFParser.java 8 Apr 2005 09:11:17 -0000 1.6 @@ -907,7 +907,7 @@ "Only two references per association are allowed"); } else { - UMLProgram.AddAtribute(dataType, name, defaultValue); + UMLProgram.AddAttribute(dataType, name, defaultValue); SaveQualifiers(UMLInterface.TATTRIBUTE, methodQualifiers); } |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:59
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/plugins/output Modified Files: UMLInterface.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: UMLInterface.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/UMLInterface.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UMLInterface.java 6 Jul 2004 13:16:01 -0000 1.1 +++ UMLInterface.java 8 Apr 2005 09:11:17 -0000 1.2 @@ -69,7 +69,7 @@ public void AddParameter(String dataType,String name, String defaultValue); - public void AddAtribute(String dataType,String name, + public void AddAttribute(String dataType,String name, String defaultValue); public int AddAssociation(String Assoc1,String name1, |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:59
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/UMLBuffer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/UMLBuffer Modified Files: UMLBuffer.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: UMLBuffer.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/UMLBuffer/UMLBuffer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- UMLBuffer.java 24 Mar 2005 09:10:44 -0000 1.6 +++ UMLBuffer.java 8 Apr 2005 09:11:16 -0000 1.7 @@ -109,7 +109,7 @@ lastMethod.AddParameter(theParameter); lastAddedElement = theParameter; } - public void AddAtribute(String dataType, String name, String defaultValue) { + public void AddAttribute(String dataType, String name, String defaultValue) { UMLAttribute theAttribute = new UMLAttribute(dataType, name, defaultValue); lastClass.addAttribute(theAttribute); @@ -542,7 +542,7 @@ void createAttributes(ArrayList attributes) throws Exception { for (int i = 0; i < attributes.size(); i++) { UMLAttribute theAtribute = (UMLAttribute) attributes.get(i); - UMLProgram.AddAtribute(theAtribute.dataType, theAtribute.name, + UMLProgram.AddAttribute(theAtribute.dataType, theAtribute.name, theAtribute.value); CreateQualifiers(theAtribute); if (Thread.currentThread().isInterrupted()) |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:37
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/ui/internal/wizards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/rsa/ui/internal/wizards Modified Files: ImportCIMMOFWizardPage.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: ImportCIMMOFWizardPage.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/ui/internal/wizards/ImportCIMMOFWizardPage.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ImportCIMMOFWizardPage.java 14 Feb 2005 17:38:06 -0000 1.16 +++ ImportCIMMOFWizardPage.java 8 Apr 2005 09:11:20 -0000 1.17 @@ -212,6 +212,7 @@ composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData()); composite.setSize(composite.computeSize(-1, -1)); + createSourceGroup(composite); createDestinationsGroup(composite); createOptionsGroup(composite); |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:37
|
Update of /cvsroot/sblim/ecute/Plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin Modified Files: Download jacobBin_17.zip.url Log Message: [ 1179045 ] Various issues in eCute4RSA Index: Download jacobBin_17.zip.url =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/Download jacobBin_17.zip.url,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Download jacobBin_17.zip.url 6 Jul 2004 13:16:00 -0000 1.1 +++ Download jacobBin_17.zip.url 8 Apr 2005 09:11:19 -0000 1.2 @@ -1,3 +1,3 @@ [InternetShortcut] -URL=http://danadler.com/jacob/jacobBin_17.zip -Modified=803A9DD33FF8C20124 +URL=http://easynews.dl.sourceforge.net/sourceforge/jacob-project/jacob_18.zip +Modified=60E5D0FE513BC50165 |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:28
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/utils Modified Files: Constants.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: Constants.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils/Constants.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Constants.java 30 Mar 2005 07:37:35 -0000 1.7 +++ Constants.java 8 Apr 2005 09:11:19 -0000 1.8 @@ -22,7 +22,7 @@ public class Constants { - public static final String pluginVersion="2.1 alpha 5"; + public static final String pluginVersion="2.1 alpha 6"; public static final String toolName="ECUTE"; public static final String qualifiersFileName="QualifiersList.txt"; |
From: Benjamin B. <bg...@us...> - 2005-04-08 09:11:28
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32031/Plugin/com/ibm/ecute/rsa/core/internal/properties Modified Files: QualifiersPropertySection.java Log Message: [ 1179045 ] Various issues in eCute4RSA Index: QualifiersPropertySection.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/QualifiersPropertySection.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- QualifiersPropertySection.java 30 Mar 2005 10:57:09 -0000 1.10 +++ QualifiersPropertySection.java 8 Apr 2005 09:11:18 -0000 1.11 @@ -83,7 +83,7 @@ private Table qualifiersTable; private ArrayList defaultValueQualifiers; //private Font boldFont; - + public QualifiersPropertySection() { @@ -365,22 +365,32 @@ //Qualifiers with Parameter Scope if(element instanceof Parameter){ //Qualifiers: In, Out - ParameterDirectionKind kind = ((Parameter)element).getDirection(); + boolean exists = false; + ParameterDirectionKind kind = ((Parameter)element).getDirection(); if(kind.getValue() == ParameterDirectionKind.IN || kind.getValue() == ParameterDirectionKind.INOUT){ qualifierName = "In"; Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); - addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); + exists = existsQualifierInTable(qualifierName); + if(!exists){ + addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); + } allAvailableQualifers.remove(qualifierObject); }else{ qualifierName = "In"; Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); - addQualiferToTable(qualifierName, "false", definedIn, qualifierObject, -1, false); + exists = existsQualifierInTable(qualifierName); + if(!exists){ + addQualiferToTable(qualifierName, "false", definedIn, qualifierObject, -1, false); + } allAvailableQualifers.remove(qualifierObject); } if(kind.getValue() == ParameterDirectionKind.OUT || kind.getValue() == ParameterDirectionKind.INOUT){ qualifierName = "Out"; Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); - addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); + exists = existsQualifierInTable(qualifierName); + if(!exists){ + addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); + } allAvailableQualifers.remove(qualifierObject); } @@ -403,39 +413,41 @@ Property prop = (Property)element; Property oppositeProp = null; // get the property of the other association end - AssociationClass parentClass = (AssociationClass)prop.getOwner(); - List ends = parentClass.getOwnedEnds(); - if ((Property)ends.get(0) == prop){ - oppositeProp = (Property)ends.get(1); - } - if ((Property)ends.get(1) == prop){ - oppositeProp = (Property)ends.get(0); - } + if (prop.getOwner() instanceof AssociationClass){ + AssociationClass parentClass = (AssociationClass)prop.getOwner(); + List ends = parentClass.getOwnedEnds(); + if ((Property)ends.get(0) == prop){ + oppositeProp = (Property)ends.get(1); + } + if ((Property)ends.get(1) == prop){ + oppositeProp = (Property)ends.get(0); + } - //Qualifier: Aggregate - qualifierName = "Aggregate"; - // to get an aggregation or composition in RSA - // the association property with the diamond has to have the aggregation type NONE - // the opposite side (the side without the diamond) has to have aggregation type - // SHARED or COMPOSITE - // so the aggregation kind of the opposite side has to be checked to set the aggregation - // qualifier of the aggregation property correct - boolean exists = false; - if(oppositeProp.getAggregation().getValue()== AggregationKind.SHARED - || oppositeProp.getAggregation().getValue()== AggregationKind.COMPOSITE){ - Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); - exists = existsQualifierInTable(qualifierName); - if (!exists){ - addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); - } - allAvailableQualifers.remove(qualifierObject); - } else { - Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); - exists = existsQualifierInTable(qualifierName); - if (!exists){ - addQualiferToTable(qualifierName, "false", definedIn, qualifierObject, -1, false); + //Qualifier: Aggregate + qualifierName = "Aggregate"; + // to get an aggregation or composition in RSA + // the association property with the diamond has to have the aggregation type NONE + // the opposite side (the side without the diamond) has to have aggregation type + // SHARED or COMPOSITE + // so the aggregation kind of the opposite side has to be checked to set the aggregation + // qualifier of the aggregation property correct + boolean exists = false; + if(oppositeProp.getAggregation().getValue()== AggregationKind.SHARED + || oppositeProp.getAggregation().getValue()== AggregationKind.COMPOSITE){ + Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); + exists = existsQualifierInTable(qualifierName); + if (!exists){ + addQualiferToTable(qualifierName, "true", definedIn, qualifierObject, -1, false); + } + allAvailableQualifers.remove(qualifierObject); + } else { + Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); + exists = existsQualifierInTable(qualifierName); + if (!exists){ + addQualiferToTable(qualifierName, "false", definedIn, qualifierObject, -1, false); + } + allAvailableQualifers.remove(qualifierObject); } - allAvailableQualifers.remove(qualifierObject); } //Qualifier: Key qualifierName = "Key"; @@ -499,7 +511,10 @@ String octetstring = "octetstring"; String octetstring_array = "octetstring[]"; Operation op = (Operation)element; - Type type = op.getReturnResult("ReturnType").getType(); + Type type = null; + if(op.getReturnResult("ReturnType") != null){ + op.getReturnResult("ReturnType").getType(); + } if(type != null){ if(type.getName().equalsIgnoreCase(octetstring) || type.getName().equalsIgnoreCase(octetstring_array)){ Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); @@ -545,13 +560,13 @@ if(qualifier.referenceScope) addQualiferToTable(qualifier.name, qualifier.defaultValue, definedIn, qualifier, -1, true); //applicableQualifiers.add(qualifier); - }else{ - if(qualifier.propertyScope) + } else { + if(qualifier.propertyScope) addQualiferToTable(qualifier.name, qualifier.defaultValue, definedIn, qualifier, -1, true); //applicableQualifiers.add(qualifier); } }else if(element instanceof Parameter){ - if(qualifier.parameterScope || qualifier.referenceScope) + if(qualifier.parameterScope /*|| qualifier.referenceScope*/) addQualiferToTable(qualifier.name, qualifier.defaultValue, definedIn, qualifier, -1, true); //applicableQualifiers.add(qualifier); } @@ -634,7 +649,9 @@ protected void editValue(int ai, boolean setDefaultValue) { - final QualifierValueObject qualifier = (QualifierValueObject)qualifiersTable.getItem(ai).getData(); + //new EditQualifiers(); + + final QualifierValueObject qualifier = (QualifierValueObject)qualifiersTable.getItem(ai).getData(); if(qualifier == null) { return; |