Main Page   Compound List   File List   Compound Members   File Members  

producer.h

Go to the documentation of this file.
00001 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_PRODUCER_H__
00002 #define __EDG_WORKLOAD_LOGGING_CLIENT_PRODUCER_H__
00003 
00009 #ident "$Header: /local/reps/lcgware/workload/logging/client/producer.h.T,v 1.35 2004/01/14 15:47:54 ljocha Exp $"
00010 /*
00011 
00012   !! Automatically generated file
00013   !! Do not edit, your changes will be discarded upon build
00014   !! Change the corresponding template file ./logging/client/producer.h.T
00015 
00016 */
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 #include "edg/workload/logging/client/context.h"
00023 #include "edg/workload/logging/client/events.h"
00024 #include "edg/workload/logging/common/authz.h"
00025 
00026 /* Event sources: */
00027 
00028 #if 0 /* obsolete */
00029 #define EDG_WLL_SOURCE_UI           "UserInterface"
00030 #define EDG_WLL_SOURCE_RB           "ResourceBroker"
00031 #define EDG_WLL_SOURCE_JSS          "JobSubmissionService"  /* aka Condor-G */
00032 #define EDG_WLL_SOURCE_JOBMGR       "GlobusJobmanager"
00033 #define EDG_WLL_SOURCE_LRMS         "LocalResourceManager"
00034 #define EDG_WLL_SOURCE_APP          "Application"
00035 
00036 #define EDG_WLL_SOURCE_NS       "NetworkServer"
00037 #define EDG_WLL_SOURCE_WM       "WorkloadManager"
00038 #define EDG_WLL_SOURCE_BH       "BigHelper"
00039 #define EDG_WLL_SOURCE_LM       "LogMonitor"
00040 
00041 #endif
00042 
00043 /* Event formats: */
00044 
00045 #define EDG_WLL_FORMAT_COMMON   "DATE=%s HOST=\"%|Us\" PROG=edg-wms LVL=%s DG.PRIORITY=%d DG.SOURCE=\"%|Us\" DG.SRC_INSTANCE=\"%|Us\" DG.EVNT=\"%s\" DG.JOBID=\"%s\" DG.SEQCODE=\"%|Us\" "
00046 #define EDG_WLL_FORMAT_USER     "DG.USER=\"%|Us\" "
00047 #define EDG_WLL_FORMAT_TRANSFER "DG.TRANSFER.DESTINATION=\"%s\" DG.TRANSFER.DEST_HOST=\"%|Us\" DG.TRANSFER.DEST_INSTANCE=\"%|Us\" DG.TRANSFER.JOB=\"%|Us\" DG.TRANSFER.RESULT=\"%s\" DG.TRANSFER.REASON=\"%|Us\" DG.TRANSFER.DEST_JOBID=\"%|Us\" "
00048 #define EDG_WLL_FORMAT_ACCEPTED "DG.ACCEPTED.FROM=\"%s\" DG.ACCEPTED.FROM_HOST=\"%|Us\" DG.ACCEPTED.FROM_INSTANCE=\"%|Us\" DG.ACCEPTED.LOCAL_JOBID=\"%|Us\" "
00049 #define EDG_WLL_FORMAT_REFUSED  "DG.REFUSED.FROM=\"%s\" DG.REFUSED.FROM_HOST=\"%|Us\" DG.REFUSED.FROM_INSTANCE=\"%|Us\" DG.REFUSED.REASON=\"%|Us\" "
00050 #define EDG_WLL_FORMAT_ENQUEUED "DG.ENQUEUED.QUEUE=\"%|Us\" DG.ENQUEUED.JOB=\"%|Us\" DG.ENQUEUED.RESULT=\"%s\" DG.ENQUEUED.REASON=\"%|Us\" "
00051 #define EDG_WLL_FORMAT_DEQUEUED "DG.DEQUEUED.QUEUE=\"%|Us\" DG.DEQUEUED.LOCAL_JOBID=\"%|Us\" "
00052 #define EDG_WLL_FORMAT_HELPERCALL       "DG.HELPERCALL.HELPER_NAME=\"%|Us\" DG.HELPERCALL.HELPER_PARAMS=\"%|Us\" DG.HELPERCALL.SRC_ROLE=\"%s\" "
00053 #define EDG_WLL_FORMAT_HELPERRETURN     "DG.HELPERRETURN.HELPER_NAME=\"%|Us\" DG.HELPERRETURN.RETVAL=\"%|Us\" DG.HELPERRETURN.SRC_ROLE=\"%s\" "
00054 #define EDG_WLL_FORMAT_RUNNING  "DG.RUNNING.NODE=\"%|Us\" "
00055 #define EDG_WLL_FORMAT_RESUBMISSION     "DG.RESUBMISSION.RESULT=\"%s\" DG.RESUBMISSION.REASON=\"%|Us\" DG.RESUBMISSION.TAG=\"%|Us\" "
00056 #define EDG_WLL_FORMAT_DONE     "DG.DONE.STATUS_CODE=\"%s\" DG.DONE.REASON=\"%|Us\" DG.DONE.EXIT_CODE=\"%d\" "
00057 #define EDG_WLL_FORMAT_CANCEL   "DG.CANCEL.STATUS_CODE=\"%s\" DG.CANCEL.REASON=\"%|Us\" "
00058 #define EDG_WLL_FORMAT_ABORT    "DG.ABORT.REASON=\"%|Us\" "
00059 #define EDG_WLL_FORMAT_CLEAR    "DG.CLEAR.REASON=\"%s\" "
00060 #define EDG_WLL_FORMAT_PURGE    ""
00061 #define EDG_WLL_FORMAT_MATCH    "DG.MATCH.DEST_ID=\"%|Us\" "
00062 #define EDG_WLL_FORMAT_PENDING  "DG.PENDING.REASON=\"%|Us\" "
00063 #define EDG_WLL_FORMAT_REGJOB   "DG.REGJOB.JDL=\"%|Us\" DG.REGJOB.NS=\"%|Us\" DG.REGJOB.PARENT=\"%s\" DG.REGJOB.JOBTYPE=\"%s\" DG.REGJOB.NSUBJOBS=\"%d\" DG.REGJOB.SEED=\"%|Us\" "
00064 #define EDG_WLL_FORMAT_CHKPT    "DG.CHKPT.TAG=\"%|Us\" DG.CHKPT.CLASSAD=\"%|Us\" "
00065 #define EDG_WLL_FORMAT_LISTENER "DG.LISTENER.SVC_NAME=\"%|Us\" DG.LISTENER.SVC_HOST=\"%|Us\" DG.LISTENER.SVC_PORT=\"%d\" "
00066 #define EDG_WLL_FORMAT_CURDESCR "DG.CURDESCR.DESCR=\"%|Us\" "
00067 #define EDG_WLL_FORMAT_USERTAG  "DG.USERTAG.NAME=\"%|Us\" DG.USERTAG.VALUE=\"%|Us\" "
00068 #define EDG_WLL_FORMAT_CHANGEACL        "DG.CHANGEACL.USER_ID=\"%|Us\" DG.CHANGEACL.USER_ID_TYPE=\"%d\" DG.CHANGEACL.PERMISSION=\"%d\" DG.CHANGEACL.PERMISSION_TYPE=\"%d\" DG.CHANGEACL.OPERATION=\"%d\" "
00069 #define EDG_WLL_FORMAT_SYSCMPSTAT       "DG.SCHED.STATUS=\"%|Us\" "
00070 #define EDG_WLL_FORMAT_SYSCLSTAT        "DG.SCHED.NODE=\"%|Us\" DG.SCHED.STATUS=\"%|Us\" "
00071 
00072 
00073 /* edg_wll_LogEvent shortcuts */
00074 
00089 extern int edg_wll_LogTransfer(edg_wll_Context context, const edg_wll_Source destination, const char * dest_host, const char * dest_instance, const char * job, const char * result, const char * reason, const char * dest_jobid);
00090 
00091 
00105 extern int edg_wll_LogTransferSTART(edg_wll_Context context, const edg_wll_Source destination, const char * dest_host, const char * dest_instance, const char * job, const char * reason, const char * dest_jobid);
00106 
00107 
00121 extern int edg_wll_LogTransferOK(edg_wll_Context context, const edg_wll_Source destination, const char * dest_host, const char * dest_instance, const char * job, const char * reason, const char * dest_jobid);
00122 
00123 
00137 extern int edg_wll_LogTransferREFUSED(edg_wll_Context context, const edg_wll_Source destination, const char * dest_host, const char * dest_instance, const char * job, const char * reason, const char * dest_jobid);
00138 
00139 
00153 extern int edg_wll_LogTransferFAIL(edg_wll_Context context, const edg_wll_Source destination, const char * dest_host, const char * dest_instance, const char * job, const char * reason, const char * dest_jobid);
00154 
00155 
00167 extern int edg_wll_LogAccepted(edg_wll_Context context, const edg_wll_Source from, const char * from_host, const char * from_instance, const char * local_jobid);
00168 
00169 
00181 extern int edg_wll_LogRefused(edg_wll_Context context, const edg_wll_Source from, const char * from_host, const char * from_instance, const char * reason);
00182 
00183 
00195 extern int edg_wll_LogEnQueued(edg_wll_Context context, const char * queue, const char * job, const char * result, const char * reason);
00196 
00197 
00208 extern int edg_wll_LogEnQueuedSTART(edg_wll_Context context, const char * queue, const char * job, const char * reason);
00209 
00210 
00221 extern int edg_wll_LogEnQueuedOK(edg_wll_Context context, const char * queue, const char * job, const char * reason);
00222 
00223 
00234 extern int edg_wll_LogEnQueuedREFUSED(edg_wll_Context context, const char * queue, const char * job, const char * reason);
00235 
00236 
00247 extern int edg_wll_LogEnQueuedFAIL(edg_wll_Context context, const char * queue, const char * job, const char * reason);
00248 
00249 
00259 extern int edg_wll_LogDeQueued(edg_wll_Context context, const char * queue, const char * local_jobid);
00260 
00261 
00272 extern int edg_wll_LogHelperCall(edg_wll_Context context, const char * helper_name, const char * helper_params, const char * src_role);
00273 
00274 
00284 extern int edg_wll_LogHelperCallCALLING(edg_wll_Context context, const char * helper_name, const char * helper_params);
00285 
00286 
00296 extern int edg_wll_LogHelperCallCALLED(edg_wll_Context context, const char * helper_name, const char * helper_params);
00297 
00298 
00309 extern int edg_wll_LogHelperReturn(edg_wll_Context context, const char * helper_name, const char * retval, const char * src_role);
00310 
00311 
00321 extern int edg_wll_LogHelperReturnCALLING(edg_wll_Context context, const char * helper_name, const char * retval);
00322 
00323 
00333 extern int edg_wll_LogHelperReturnCALLED(edg_wll_Context context, const char * helper_name, const char * retval);
00334 
00335 
00344 extern int edg_wll_LogRunning(edg_wll_Context context, const char * node);
00345 
00346 
00357 extern int edg_wll_LogResubmission(edg_wll_Context context, const char * result, const char * reason, const char * tag);
00358 
00359 
00369 extern int edg_wll_LogResubmissionWILLRESUB(edg_wll_Context context, const char * reason, const char * tag);
00370 
00371 
00381 extern int edg_wll_LogResubmissionWONTRESUB(edg_wll_Context context, const char * reason, const char * tag);
00382 
00383 
00394 extern int edg_wll_LogDone(edg_wll_Context context, const char * status_code, const char * reason, const int exit_code);
00395 
00396 
00406 extern int edg_wll_LogDoneOK(edg_wll_Context context, const char * reason, const int exit_code);
00407 
00408 
00418 extern int edg_wll_LogDoneFAILED(edg_wll_Context context, const char * reason, const int exit_code);
00419 
00420 
00430 extern int edg_wll_LogDoneCANCELLED(edg_wll_Context context, const char * reason, const int exit_code);
00431 
00432 
00442 extern int edg_wll_LogCancel(edg_wll_Context context, const char * status_code, const char * reason);
00443 
00444 
00453 extern int edg_wll_LogCancelREQ(edg_wll_Context context, const char * reason);
00454 
00455 
00464 extern int edg_wll_LogCancelREFUSE(edg_wll_Context context, const char * reason);
00465 
00466 
00475 extern int edg_wll_LogCancelDONE(edg_wll_Context context, const char * reason);
00476 
00477 
00486 extern int edg_wll_LogCancelABORT(edg_wll_Context context, const char * reason);
00487 
00488 
00497 extern int edg_wll_LogAbort(edg_wll_Context context, const char * reason);
00498 
00499 
00508 extern int edg_wll_LogClear(edg_wll_Context context, const char * reason);
00509 
00510 
00518 extern int edg_wll_LogClearUSER(edg_wll_Context context);
00519 
00520 
00528 extern int edg_wll_LogClearTIMEOUT(edg_wll_Context context);
00529 
00530 
00538 extern int edg_wll_LogClearNOOUTPUT(edg_wll_Context context);
00539 
00540 
00548 extern int edg_wll_LogPurge(edg_wll_Context context);
00549 
00550 
00559 extern int edg_wll_LogMatch(edg_wll_Context context, const char * dest_id);
00560 
00561 
00570 extern int edg_wll_LogPending(edg_wll_Context context, const char * reason);
00571 
00572 
00586 extern int edg_wll_LogRegJob(edg_wll_Context context, const char * jdl, const char * ns, const edg_wlc_JobId parent, const char * jobtype, const int nsubjobs, const char * seed);
00587 
00588 
00601 extern int edg_wll_LogRegJobSIMPLE(edg_wll_Context context, const char * jdl, const char * ns, const edg_wlc_JobId parent, const int nsubjobs, const char * seed);
00602 
00603 
00616 extern int edg_wll_LogRegJobDAG(edg_wll_Context context, const char * jdl, const char * ns, const edg_wlc_JobId parent, const int nsubjobs, const char * seed);
00617 
00618 
00631 extern int edg_wll_LogRegJobPARTITIONABLE(edg_wll_Context context, const char * jdl, const char * ns, const edg_wlc_JobId parent, const int nsubjobs, const char * seed);
00632 
00633 
00646 extern int edg_wll_LogRegJobPARTITIONED(edg_wll_Context context, const char * jdl, const char * ns, const edg_wlc_JobId parent, const int nsubjobs, const char * seed);
00647 
00648 
00658 extern int edg_wll_LogChkpt(edg_wll_Context context, const char * tag, const char * classad);
00659 
00660 
00671 extern int edg_wll_LogListener(edg_wll_Context context, const char * svc_name, const char * svc_host, const uint16_t svc_port);
00672 
00673 
00682 extern int edg_wll_LogCurDescr(edg_wll_Context context, const char * descr);
00683 
00684 
00694 extern int edg_wll_LogUserTag(edg_wll_Context context, const char * name, const char * value);
00695 
00696 
00709 extern int edg_wll_LogChangeACL(edg_wll_Context context, const char * user_id, const int user_id_type, const int permission, const int permission_type, const int operation);
00710 
00711 
00712 
00728 extern int edg_wll_LogEvent(
00729         edg_wll_Context context,
00730         edg_wll_EventCode event,
00731         char *fmt, ...);
00732 
00733 
00751 extern int edg_wll_LogEventSync(
00752         edg_wll_Context context,
00753         edg_wll_EventCode event,
00754         char *fmt, ...);
00755 
00756 
00768 extern int edg_wll_LogFlush(
00769         edg_wll_Context context,
00770         struct timeval *timeout);
00771 
00772 
00779 extern int edg_wll_LogFlushAll(
00780         edg_wll_Context context,
00781         struct timeval *timeout);
00782 
00791 extern int edg_wll_SetLoggingJob(
00792         edg_wll_Context context,
00793         const edg_wlc_JobId     job,
00794         const char *            code,
00795         int                     flags
00796 );
00797 
00798 
00817 /* backward compatibility */
00818 #define EDG_WLL_JOB_SIMPLE      EDG_WLL_REGJOB_SIMPLE
00819  
00820 extern int edg_wll_RegisterJob(
00821         edg_wll_Context         context,
00822         const edg_wlc_JobId     job,
00823         enum edg_wll_RegJobJobtype      type,
00824         const char *            jdl,
00825         const char *            ns,
00826         int                     num_subjobs,
00827         const char *            seed,
00828         edg_wlc_JobId **        subjobs
00829 );
00830 
00835 extern int edg_wll_RegisterJobSync(
00836         edg_wll_Context         context,
00837         const edg_wlc_JobId     job,
00838         enum edg_wll_RegJobJobtype      type,
00839         const char *            jdl,
00840         const char *            ns,
00841         int                     num_subjobs,
00842         const char *            seed,
00843         edg_wlc_JobId **        subjobs
00844 );
00845 
00854 extern int edg_wll_RegisterSubjobs(
00855         edg_wll_Context         context,
00856         const edg_wlc_JobId     parent,
00857         char const * const *    jdls,
00858         const char *            ns,
00859         edg_wlc_JobId const *   subjobs
00860 );
00861 
00862 
00869 extern int edg_wll_GenerateSubjobIds(
00870         edg_wll_Context         context,
00871         const edg_wlc_JobId     parent,
00872         int                     num_subjobs,
00873         const char *            seed,
00874         edg_wlc_JobId **        subjobs
00875 );
00876 
00877 
00878 enum edg_wll_Permission {
00879         EDG_WLL_PERM_READ  = 1,
00880         EDG_WLL_PERM_WRITE = 4,
00881         EDG_WLL_PERM_ADMIN = 8,
00882 };
00883 
00884 enum edg_wll_PermissionType {
00885         EDG_WLL_PERM_ALLOW,
00886         EDG_WLL_PERM_DENY,
00887 };
00888 
00889 enum edg_wll_ACLOperation {
00890         EDG_WLL_ACL_ADD,
00891         EDG_WLL_ACL_REMOVE,
00892 };
00893 
00894 enum edg_wll_UserIdType {
00895         EDG_WLL_USER_SUBJECT,           /* X.509 subject name */
00896         EDG_WLL_USER_VOMS_GROUP,        /* VOMS group membership */
00897 };
00898 
00910 extern int edg_wll_ChangeACL(
00911         edg_wll_Context         context,
00912         const edg_wlc_JobId     job,
00913         const char *            user_id,
00914         enum edg_wll_UserIdType user_id_type,
00915         enum edg_wll_Permission         permission,
00916         enum edg_wll_PermissionType     permission_type,
00917         enum edg_wll_ACLOperation       operation
00918 );
00919 
00920 
00921 #ifdef __cplusplus
00922 }
00923 #endif
00924 
00925 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_PRODUCER_H__ */

Generated on Fri May 14 14:18:56 2004 for L&B API C by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002