--- /dev/null
+PREFIX?=/opt/glite
+
+-include Makefile.inc
+
+PM_DEST=${PREFIX}/share/perl/gLite/LB
+T_DEST=${PREFIX}/share/lb/at3
+SBIN=${PREFIX}/sbin
+
+PM=StructField.pm MultiStruct.pm
+T=events.T status.T types.T
+
+default: compile
+
+compile: at3
+
+at3: at3.in
+ sed "s?%PREFIX%?${PREFIX}?" at3.in >$@
+
+install: compile
+ mkdir -p ${PM_DEST} ${T_DEST} ${SBIN}
+ install -m 644 ${PM} ${PM_DEST}
+ install -m 644 ${T} ${T_DEST}
+ install -m 755 at3 ${SBIN}/glite-lb-at3
+
+clean:
+ rm -f at3
+
+check:
--- /dev/null
+package MultiStruct;
+
+use gLite::LB::StructField;
+
+sub new {
+ shift;
+ my $self = {};
+ $self->{comments} = {}; # typ->comment
+ $self->{fields} = {}; # typ->{ name->StructField, ... }
+ $self->{order} = {};
+
+ bless $self;
+}
+
+sub selectType {
+ my $self = shift;
+ my $type = shift;
+ $self->{type} = $type;
+ 1;
+}
+
+sub addType {
+ my $self = shift;
+ my $type = shift;
+ my $comment = shift;
+ $self->selectType($type);
+ $self->{comments}->{$type} = $comment;
+ $self->{fields}->{$type} = {};
+ 1;
+}
+
+sub selectField {
+ my $self = shift;
+ $self->{field} = shift;
+ $self->getField;
+}
+
+sub addField {
+ my $self = shift;
+ my $field = shift;
+
+ die "unselected type" unless $self->{type};
+ $self->{fields}->{$self->{type}}->{$field->{name}} = $field;
+ $self->selectField($field->{name});
+ 1;
+}
+
+sub getField {
+ my $self = shift;
+ my $f = $self->{fields}->{$self->{type}}->{$self->{field}};
+ return $f ? $f : $self->{fields}->{_common_}->{$self->{field}};
+}
+
+sub load {
+ my $self = shift;
+ my $fh = shift;
+ local $_;
+
+ while ($_ = <$fh>) {
+
+ chomp;
+ s/#.*$//;
+ next if /^\s*$/;
+
+ if (/^\@type\s+(\S+)\s*(.*$)$/) {
+ $self->addType($1,$2);
+ $self->{order}->{$1} = $.;
+ next;
+ }
+
+ s/^\s*//;
+ my ($ftype,$fname,$comment) = split /\s+/,$_,3;
+ if ($ftype eq '_code_') {
+ my $f = $self->getField();
+ addCode $f $fname,$comment;
+ }
+ elsif ($ftype eq '_alias_') {
+ my $f = $self->getField();
+ addAlias $f $fname,$comment;
+ }
+ elsif ($ftype eq '_special_') {
+ my $f = $self->getField();
+ addSpecial $f $fname;
+ }
+ elsif ($ftype eq '_null_') {
+ my $f = $self->getField();
+ setNull $f $fname;
+ }
+ elsif ($ftype eq '_optional_') {
+ my $f = $self->getField();
+ $f->{optional} = 1;
+ }
+ elsif ($ftype eq '_index_') {
+ my $f = $self->getField();
+ $f->{index} = 1;
+ }
+ else {
+ my $f = new StructField $fname,$ftype,$comment,$.;
+ $self->addField($f);
+ }
+ }
+}
+
+sub getTypes {
+ my $self = shift;
+ my @out;
+ local $_;
+
+ for (keys %{$self->{fields}}) {
+ push @out,$_ unless $_ eq '_common_';
+ }
+ @out;
+}
+
+sub getTypesOrdered {
+ my $self = shift;
+ my @names = getTypes $self;
+
+ sort {
+ my $oa = $self->{order}->{$a};
+ my $ob = $self->{order}->{$b};
+ $oa <=> $ob;
+ } @names;
+}
+
+sub getTypeComment {
+ my $self = shift;
+ my $type = shift || $self->{type};
+ $self->{comments}->{$type};
+}
+
+sub getFieldComment {
+ my $self = shift;
+ my $fname = shift;
+ $self->{fields}->{$self->{type}}->{$fname}->{comment};
+}
+
+sub getFields {
+ my $self = shift;
+ keys %{$self->{fields}->{$self->{type}}};
+}
+
+sub getFieldsOrdered {
+ my $self = shift;
+ my @names = $self->getFields;
+ sort {
+ my $oa = $self->selectField($a)->{order};
+ my $ob = $self->selectField($b)->{order};
+ $oa <=> $ob;
+ } @names;
+}
+
+sub getFieldOccurence {
+ my $self = shift;
+ my $fname = shift;
+ my @out;
+ local $_;
+
+ for (keys %{$self->{fields}}) {
+ push @out,$_ if $self->{fields}->{$_}->{$fname};
+ }
+ @out;
+}
+
+sub getAllFields {
+ my $self = shift;
+ my %out;
+ local $_;
+
+ for my $t (values %{$self->{fields}}) {
+ $out{$_->{name}} = 1 for (values %$t);
+ }
+ keys %out;
+}
+
+sub getAllFieldsOrdered {
+ my $self = shift;
+ my @names = getAllFields $self;
+
+ sort {
+ my @occ = $self->getFieldOccurence($a);
+ $self->selectType($occ[0]);
+ my $oa = $self->selectField($a)->{order};
+ @occ = $self->getFieldOccurence($b);
+ $self->selectType($occ[0]);
+ my $ob = $self->selectField($b)->{order};
+ $oa <=> $ob;
+ } @names;
+}
+
+1;
--- /dev/null
+package StructField;
+
+$lang = 'C';
+1;
+
+sub new {
+ shift;
+ my $self = {};
+ $self->{name} = shift;
+ $self->{type} = shift;
+ $self->{comment} = shift;
+ $self->{order} = shift;
+ $self->{null} = $main::DefaultNullValue{$self->{type}};
+ bless $self;
+}
+
+sub addCode {
+ my $self = shift;
+ my $code = shift;
+ my $comment = shift;
+ push @{$self->{codes}},{name=>$code,comment=>$comment};
+ 1;
+}
+
+sub addSpecial {
+ my $self = shift;
+ my $special = shift;
+ $self->{special} = $special;
+ 1;
+}
+
+sub addAlias {
+ my $self = shift;
+ my $name = shift;
+ my $lang = shift;
+ $self->{aliases}->{$lang} = $name;
+ 1;
+}
+
+sub hasAlias {
+ my $self = shift;
+ my $lang = shift;
+ return $self->{aliases}->{$lang} ? 1 : 0;
+}
+
+sub getName {
+ my $self = shift;
+ my $lang = shift || $lang;
+ $self->{aliases}->{$lang} || $self->{name};
+# return $self->{aliases}->{$lang} ? $self->{aliases}->{$lang} : $self->{name};
+}
+
+sub getComment {
+ my $self = shift;
+ $self->{comment};
+}
+
+sub getDefaultNullValue {
+ my $self = shift;
+ $self->{null};
+}
+
+sub toString {
+ my $self = shift;
+ my $src = shift;
+ my $dst = shift;
+
+ eval $main::toString{$lang}->{$self->{type}};
+}
+
+sub fromString {
+ my $self = shift;
+ my $src = shift;
+ my $dst = shift;
+
+ eval $main::fromString{$lang}->{$self->{type}};
+}
+
+sub isNULL {
+ my $self = shift;
+ my $a = shift;
+ my $b = $self->{null};
+
+ eval $main::compare{$lang}->{$self->{type}};
+}
+
+sub isnotNULL {
+ my $self = shift;
+ my $src = shift;
+
+ '!('.$self->isNULL($src).')';
+}
+
+sub compare {
+ my $self = shift;
+ my $a = shift;
+ my $b = shift;
+ eval $main::compare{$lang}->{$self->{type}};
+}
+
+sub toFormatString {
+ my $self = shift;
+
+ eval $main::toFormatString{$lang}->{$self->{type}};
+}
+
+sub setNull {
+ my $self = shift;
+ $self->{null} = shift;
+}
+
+sub getType {
+ my $self = shift;
+
+ eval $main::types{$lang}->{$self->{type}};
+}
--- /dev/null
+#!/usr/bin/perl -w
+
+use File::Basename;
+
+my $lines = $ENV{AT3_LINES};
+
+my $prefix;
+BEGIN{ $prefix = '/opt/glite'; }
+
+use lib "$prefix/share/perl";
+use gLite::LB::MultiStruct;
+require "$prefix/share/lb/at3/types.T";
+
+my $eventsn = "$prefix/share/lb/at3/events.T";
+my $statusn = "$prefix/share/lb/at3/status.T";
+
+my $indent = '';
+
+my $event = new MultiStruct;
+my $status = new MultiStruct;
+
+sub gen {
+ local $_ = shift;
+
+ s/^\n!//;
+ s/\n!/\n/g;
+ print $_;
+}
+
+
+open EVENTS,$eventsn or die "$eventsn: $!\n";
+$event->load(\*EVENTS);
+close EVENTS;
+
+open STATUS,$statusn or die "$statusn: $!\n";
+$status->load(\*STATUS);
+close STATUS;
+
+my $code;
+my $startcode;
+while (<>) {
+ chomp;
+ if (/^\@\@\@LANG: (\S+)$/) {
+ $StructField::lang = $1;
+ next;
+ }
+
+ if ($code) {
+ if (/^\@\@\@}$/) {
+ $code .= "1;\n";
+ print "#line $startcode \"$ARGV\"\n/* begin */\n" if $lines;
+ eval $code or warn "eval: $@ at $ARGV:$.\n";
+ my $nxtline = $.+1;
+ print "/* end */\n#line $nxtline \"$ARGV\"\n" if $lines;
+ undef $code;
+ }
+ else { $code .= $_."\n"; }
+ }
+ else {
+ if (/^\@\@\@{$/) {
+ $startcode = $.;
+ $code = "\n";
+ }
+ elsif (/^\@\@\@AUTO$/) {
+ print qq{
+ !! Automatically generated file
+ !! Do not edit, your changes will be discarded upon build
+ !! Change the corresponding template file $ARGV
+
+};
+ print "#line $. \"$ARGV\"\n" if $lines;
+ }
+ else {
+ print "$_\n";
+ }
+ }
+}
+
+# print $event_common{prog}->copy('bla','hu');
--- /dev/null
+#!/usr/bin/perl -w
+
+use File::Basename;
+
+my $lines = $ENV{AT3_LINES};
+
+my $prefix;
+BEGIN{ $prefix = '%PREFIX%'; }
+
+use lib "$prefix/share/perl";
+use gLite::LB::MultiStruct;
+require "$prefix/share/lb/at3/types.T";
+
+my $eventsn = "$prefix/share/lb/at3/events.T";
+my $statusn = "$prefix/share/lb/at3/status.T";
+
+my $indent = '';
+
+my $event = new MultiStruct;
+my $status = new MultiStruct;
+
+sub gen {
+ local $_ = shift;
+
+ s/^\n!//;
+ s/\n!/\n/g;
+ print $_;
+}
+
+
+open EVENTS,$eventsn or die "$eventsn: $!\n";
+$event->load(\*EVENTS);
+close EVENTS;
+
+open STATUS,$statusn or die "$statusn: $!\n";
+$status->load(\*STATUS);
+close STATUS;
+
+my $code;
+my $startcode;
+while (<>) {
+ chomp;
+ if (/^\@\@\@LANG: (\S+)$/) {
+ $StructField::lang = $1;
+ next;
+ }
+
+ if ($code) {
+ if (/^\@\@\@}$/) {
+ $code .= "1;\n";
+ print "#line $startcode \"$ARGV\"\n/* begin */\n" if $lines;
+ eval $code or warn "eval: $@ at $ARGV:$.\n";
+ my $nxtline = $.+1;
+ print "/* end */\n#line $nxtline \"$ARGV\"\n" if $lines;
+ undef $code;
+ }
+ else { $code .= $_."\n"; }
+ }
+ else {
+ if (/^\@\@\@{$/) {
+ $startcode = $.;
+ $code = "\n";
+ }
+ elsif (/^\@\@\@AUTO$/) {
+ print qq{
+ !! Automatically generated file
+ !! Do not edit, your changes will be discarded upon build
+ !! Change the corresponding template file $ARGV
+
+};
+ print "#line $. \"$ARGV\"\n" if $lines;
+ }
+ else {
+ print "$_\n";
+ }
+ }
+}
+
+# print $event_common{prog}->copy('bla','hu');
--- /dev/null
+@type _common_
+ timeval timestamp Time the event was generated.
+ _alias_ date ULM
+ timeval arrived Time the event was stored into the bookkeeping server database.
+ _alias_ arr_date ULM
+ _optional_
+ string host Hostname of the machine where the event was generated.
+ _alias_ host ULM
+ int level Logging level (in the range from DEBUG to EMERGENCY).
+ _alias_ lvl ULM
+ _code_ EMERGENCY emergency
+ _code_ ALERT alert
+ _code_ ERROR error
+ _code_ WARNING warning
+ _code_ AUTH authentication
+ _code_ SECURITY security
+ _code_ USAGE usage
+ _code_ SYSTEM system
+ _code_ IMPORTANT important
+ _code_ DEBUG debug
+ int priority Message priority (yet 0 for asynchronous and 1 for synchronous transfers).
+ _null_ -1
+ jobid jobId Grid job id of the job the event belongs to.
+ string seqcode Sequence code assigned to the event.
+ string user Identity (certificate subject) of the event sender.
+ logsrc source Source (software component) which generated this event.
+# string prog name of program ("EDG WMS" of name of the application).
+ string src_instance Instance of source component (e.g. service communication endpoint).
+ _optional_
+
+@type Transfer Start, success, or failure of job transfer to another component.
+ logsrc destination Destination where the job is being transfered to.
+ string dest_host Hostname of server that takes over control of the job.
+ string dest_instance Service (instance) that takes over control of the job.
+ _optional_
+ string job Job description in receiver's language.
+ int result Result code of the transfer attempt (START, OK, REFUSED or FAIL).
+ _code_ START The sending component has started or is about to start the transfer.
+ _code_ OK The job was sent successfully.
+ _code_ REFUSED The job was refused by the other component.
+ _code_ FAIL The transfer failed for other reason than explicit refusal (eg. network timeout).
+ string reason Detailed description of the transfer, especially reason of failure.
+ _optional_
+ string dest_jobid Job id as assigned by the receiving software component.
+ _optional_
+
+@type Accepted Accepting job (successful counterpart to Transfer).
+ logsrc from The software component the job was received from.
+ string from_host Hostname of the component the job was received from.
+ string from_instance Instance of the component the job was received from.
+ _optional_
+ string local_jobid New job id as assigned by the receiving component.
+
+@type Refused Refusing job (unsuccessful counterpart to Transfer).
+ logsrc from The software component that tried to send the job.
+ string from_host Hostname of the component that tried to send the job.
+ string from_instance Instance of the component that tried to send the job.
+ _optional_
+ string reason Description of the reason why the job was refused.
+
+@type EnQueued The job has been enqueued in an inter-component queue.
+ string queue Queue into which the job has been stored for retrieval by another component.
+ string job Job description in the receiver's language.
+ int result Result code of the attempt to put job into the queue (START, OK, REFUSED or FAIL).
+ _code_ START The sending component has started or is about to start enqueuing the job.
+ _code_ OK The job was enqueued successfully.
+ _code_ REFUSED The job was refused by the other component.
+ _code_ FAIL The transfer failed for other reason than explicit refusal.
+ string reason Detailed description of the attempt to enqueue the job, especially the reason of failure.
+
+@type DeQueued The job has been dequeued from an inter-component queue.
+ string queue Name of the queue the job was obtained from.
+ string local_jobid New job id as assigned by the retreiving component.
+
+@type HelperCall Helper component is called.
+ string helper_name Name of the called helper component.
+ string helper_params Parameters of the call to the helper component.
+ int src_role The role the event sender is playing in the helper call (CALLING or CALLEE).
+ _code_ CALLING The logging component is caller.
+ _code_ CALLED The logging component is callee.
+
+@type HelperReturn Helper component is returning the control.
+ string helper_name Name of the called helper component.
+ string retval Data returned by the call to the helper component.
+ int src_role The role the event sender is playing in the helper call (CALLING or CALLEE).
+ _code_ CALLING The logging component is caller.
+ _code_ CALLED The logging component is callee.
+
+@type Running Job wrapper started.
+ string node Worker node on which the job executable is being run.
+
+@type Resubmission Result of resubmission decision.
+ int result Result code of the resubmission decision (WILLRESUB or WONTRESUB or SHALLOW).
+ _code_ WILLRESUB The job will be resubmitted (deep resubmission).
+ _code_ WONTRESUB The job will not be resubmitted.
+ _code_ SHALLOW Shallow resubmission (user payload has not started yet)
+ string reason Reason why the job will or will not be resubmitted.
+ string tag Value of the attribute on which the decision to resubmit the job was based.
+
+@type Done Execution terminated (normally or abnormally).
+ int status_code Reason code for the termination of the job (OK, FAILED or CANCELLED).
+ _code_ OK The job terminated by itself.
+ _code_ FAILED The job disappeared from LRMS.
+ _code_ CANCELLED The job was cancelled by user request.
+ string reason Detailed description why the job was terminated.
+ int exit_code Exit code of the job's process.
+ _null_ -1
+
+@type Cancel Cancel operation has been attempted on the job.
+ int status_code Classification of the attempt to cancel the job (REQ, REFUSE, DONE or ABORT).
+ _code_ REQ The request was acknowledged.
+ _code_ REFUSE The request was declined by this component.
+ _code_ DONE The request was completed by whole WMS.
+ _code_ ABORT The request was refused by whole WMS.
+ string reason Detailed description of the attempt to cancel the job, especially the reason of failure.
+
+@type Abort Job aborted by system.
+ string reason Reason why the job was aborted by the system.
+
+@type Clear Job cleared, output sandbox removed
+ int reason Description of the reason why the job was cleared and the output sandbox removed (USER, TIMEOUT or NOOUTPUT).
+ _code_ USER User retrieved output sandbox.
+ _code_ TIMEOUT Timed out, resource forced purge of the sandbox.
+ _code_ NOOUTPUT No output was generated.
+
+@type Purge Job is purged from bookkepping server.
+
+@type Match Matching CE found.
+ string dest_id Identification of the queue on the CE that the job could be send to.
+
+@type Pending No matching CE found yet.
+ string reason Description why the matching CE for the job was not found (yet).
+
+@type RegJob New job registration.
+ string jdl Job description of the job being registered.
+ string ns NetworkServer handling the newly registered job.
+ jobid parent Grid job id of the parent job registering this new one.
+ _optional_
+
+ int jobtype Type of the job being registered (SIMPLE, DAG, PARTITIONABLE or PARTITIONED).
+ _code_ SIMPLE The job is simple job.
+ _code_ DAG The job is dag (containing static set of subjobs).
+ _code_ PARTITIONABLE The job is partitionable (may become partitioned).
+ _code_ PARTITIONED The job is partitioned (dynamically created dag).
+ _code_ COLLECTION The job is collection (containing static set of subjobs).
+ _code_ PBS PBS job
+ _code_ CONDOR Condor job
+
+ int nsubjobs Number of subjobs this job plans to spawn.
+ _optional_
+ string seed Seed for subjob id generation.
+ _optional_
+
+@type Chkpt Application-specific checkpoint record.
+ string tag Application specific checkpoint tag.
+ string classad Application specific checkpoint value.
+
+@type Listener Listening network port for interactive control.
+ string svc_name Name of the port instance for interactive job control.
+ string svc_host Hostname of the interactive job controller.
+ port svc_port Port number of the interactive job controller.
+
+@type CurDescr Current state of job processing (optional event).
+ string descr Description of the current job transformation (output of the helper).
+
+@type UserTag User tag -- arbitrary name=value pair.
+ string name Arbitrary user tag name.
+ string value Arbitrary user tag value.
+
+@type ChangeACL Management of ACL stored on bookkepping server.
+ string user_id DN or VOMS parameter (in format VO:group).
+ int user_id_type Type of information given in user_id (DN or VOMS).
+ _null_ -1
+ int permission ACL permission to change (currently only READ).
+ _null_ -1
+ int permission_type Type of permission requested ('allow', 'deny').
+ _null_ -1
+ int operation Operation requested to perform with ACL (add, remove).
+ _null_ -1
+
+@type Notification Management of notification service.
+ notifid notifId Notification id.
+ string owner Identification of the job owner (certificate subject).
+ string dest_host Hostname the notification is sent to.
+ port dest_port Port number the notification is sent to.
+ string jobstat Status of the job (the notification content).
+
+
+@type ResourceUsage Resource (CPU, memory etc.) consumption.
+ string resource Resource's name.
+ double quantity Resources's quantity (how much).
+ string unit Units (sec, kB, etc.).
+
+@type ReallyRunning User payload started.
+ _optional_
+ string wn_seq Sequence code on the worker node.
+
+@type Suspend Job execution (queuing) was suspended.
+ _optional_
+ string reason Reason for the suspend.
+
+@type Resume Job execution (queuing) was resumed.
+ _optional_
+ string reason Reason for the resume.
+
+@type CollectionState State of the collection.
+ string state New collection state.
+ _optional_
+ int done_code In case of (state == Done) contains done code
+ _null_ -1
+ string histogram User readable histogram; useful for debugging.
+ jobid child JobId of subjob, which triggered the state change.
+ string child_event Event which triggered the state change.
+
+
+@type PBSQueued Job enqued
+ string queue Queue name
+ string owner Job owner
+ string name Job name
+
+@type PBSMatch Scheduler created exec_host
+ string dest_host Aka exec_host
+
+@type PBSPending Scheduler is not able to find exec_host, or some error occured
+ string reason Reasons of job pendation or errors
+
+@type PBSRun Job attempted to be run by the logging component
+ string scheduler Scheduler ID
+ _optional_
+ string dest_host Where to run the job
+ _optional_
+ int pid Actual process ID
+ _optional_
+
+@type PBSRerun Job rerun requested
+
+@type PBSDone Job terminated
+ int exit_status Exit status
+ _optional_ Bypass need of 'null value'
+
+@type PBSDequeued Job dequeued
+
+@type PBSResourceUsage Resources requested/consumed
+ int usage Type of record
+ _code_ REQUESTED Requested value
+ _code_ USED Consumed quantity
+ string name Name of resource
+ double quantity The quantity
+ _optional_ Bypass need of 'null value'
+ string unit Units (sec, kB, etc.)
+
+@type PBSError Any error occured
+ string error_desc Error reason
+
+@type CondorMatch Job MATCHed
+ string owner Owner
+ string dest_host Matched host
+ string preempting Preempting
+ _optional_
+
+@type CondorReject Job REJECTed
+ string owner Owner
+ int status_code Reason code for the rejection of the job
+ _code_ NOMATCH No match found
+ _code_ OTHER Other reason
+
+@type CondorShadowStarted Condor Shadow Started
+ string shadow_host Shadow host
+ port shadow_port Shadow port
+ int shadow_pid PID of shadow process
+ string shadow_status Shadow status
+ _optional_
+
+@type CondorShadowExited Condor Shadow Exited
+ int shadow_pid PID of shadow process
+ int shadow_exit_status Exit status of shadow process
+
+@type CondorStarterStarted Condor Starter Started
+ int starter_pid PID of starter process
+ _optional_
+ string universe Condor Universe
+ _optional_
+
+@type CondorStarterExited Condor Starter Exited
+ int starter_pid PID of starter process
+ _optional_
+ int starter_exit_status Exit status of starter process
+ _optional_
+ int job_pid PID of running job
+ _optional_
+ int job_exit_status Job exit status
+ _optional_
+
+@type CondorResourceUsage Resources requested/consumed
+ int usage Type of record
+ _code_ REQUESTED Requested value
+ _code_ USED Consumed quantity
+ string name Name of resource
+ double quantity The quantity
+ _optional_ Bypass need of 'null value'
+ string unit Units (sec, kB, etc.)
+
+@type CondorError Any Error occured
+ string error_desc Error reason
+
--- /dev/null
+@type _common_
+jobid jobId Id of the job
+string owner Job owner
+_index_
+
+int jobtype Type of job
+ _null_ -1
+ _code_ SIMPLE simple job
+ _code_ DAG composite job
+ _code_ COLLECTION parent of collection of jobs
+ _code_ PBS PBS job
+ _code_ CONDOR Condor job
+jobid parent_job parent job of subjob
+
+string seed string used for generation of subjob IDs
+int children_num number of subjobs
+strlist children list of subjob IDs
+ _special_ XMLstructured
+intlist children_hist summary (histogram) of children job states
+ _special_ XMLstructured
+stslist children_states full status information of the children
+ _special_ XMLstructured
+
+string condorId Id within Condor-G
+string globusId Globus allocated Id
+string localId Id within LRMS
+
+string jdl User submitted job description
+string matched_jdl Full job description after matchmaking
+string destination ID of CE where the job is being sent
+_index_
+string condor_jdl ClassAd passed to Condor-G for last job execution
+string rsl Job RSL sent to Globus
+
+string reason Reason of being in this status, if any
+
+string location Where the job is being processed
+_index_
+string ce_node Worker node where the job is executed
+string network_server Network server handling the job
+
+bool subjob_failed Subjob failed (the parent job will fail too)
+int done_code Return code
+ _null_ -1
+ _code_ OK Finished correctly
+ _code_ FAILED Execution failed
+ _code_ CANCELLED Cancelled by user
+int exit_code Unix exit code
+bool resubmitted The job was resubmitted
+
+bool cancelling Cancellation request in progress
+string cancelReason Reason of cancel
+
+int cpuTime Consumed CPU time
+ _null_ -1
+
+taglist user_tags List of pairs (user_tag, user_value)
+ _special_ XMLstructured
+
+timeval stateEnterTime When entered this status
+timeval lastUpdateTime Last known event of the job
+
+intlist stateEnterTimes When all previous states were entered
+ _special_ XMLstructured
+
+bool expectUpdate Some logged information has not arrived yet
+string expectFrom Sources of the missing information
+string acl ACL of the job
+
+bool payload_running User payload started
+strlist possible_destinations Possible job destinations
+ _special_ XMLstructured
+strlist possible_ce_nodes CE nodes matching to possible_destinations
+ _special_ XMLstructured
+
+bool suspended Job is suspended
+string suspend_reason Reason for the suspend
+
+string pbs_state Job state which would probably return PBS qstat (Q/R/C/....)
+string pbs_queue Name of queue in which is job queued
+string pbs_owner Owner of job
+string pbs_name Name of job
+string pbs_reason Glued reasons/errors leading to pending events
+string pbs_scheduler Name of pbs scheduler
+string pbs_dest_host Hostname of node where job is running
+int pbs_pid PID of running job
+string pbs_resource_usage Glued resource usage
+int pbs_exit_status Job exit status
+string pbs_error_desc Glued error descriptions from error events
+
+string condor_status Condor job status
+string condor_universe Condor job Universe (in job ClassAds)
+string condor_owner Job owner
+int condor_shadow_pid PID of Shadow
+int condor_shadow_exit_status Condor shadow exit status (see h/exit.h)
+int condor_starter_pid PID of Starter
+int condor_starter_exit_status Condor starter exit status
+int condor_job_pid PID of running job
+int condor_job_exit_status Job exit status
+string condor_dest_host Hostname of node where job is running
+string condor_reason Glued reasons/errors leading to pending events
+string condor_error_desc Glued error descriptions from error events
+
+
+@type Submitted Entered by the user to the User Interface or registered by Job Partitioner.
+@type Waiting Accepted by WMS, waiting for resource allocation.
+@type Ready Matching resources found.
+@type Scheduled Accepted by LRMS queue.
+@type Running Executable is running.
+@type Done Execution finished, output is available.
+@type Cleared Output transfered back to user and freed.
+@type Aborted Aborted by system (at any stage).
+@type Cancelled Cancelled by user.
+@type Unknown Status cannot be determined.
+@type Purged Job has been purged from bookkeeping server (for LB->RGMA interface).
--- /dev/null
+%types = (
+ C=>{
+ bool=>'"int"',
+ string=>'"char *"',
+ strlist=>'"char **"',
+ intlist=>'"int *"',
+ taglist=>'"edg_wll_TagValue *"',
+ stslist=>'"struct _edg_wll_JobStat *"',
+ timeval=>'"struct timeval"',
+ jobid=>'"edg_wlc_JobId"',
+ notifid=>'"edg_wll_NotifId"',
+ logsrc=>'"edg_wll_Source"',
+ port=>'"uint16_t"',
+# level=>'"enum edg_wll_Level"',
+ int=>'"int"',
+ float=>'"float"',
+ double=>'"double"',
+ },
+ 'C++'=>{
+ string=>'"std::string"',
+ timeval=>'"struct timeval"',
+ jobid=>'"edg::workload::common::jobid::JobId"',
+ bool=>'"int"',
+ intlist=>'"std::vector<int>"',
+ strlist=>'"std::vector<std::string>"',
+ taglist=>'"std::vector<std::pair<std::string>>"',
+ stslist=>'"std::vector<JobStatus>"',
+ logsrc=>'"int"',
+ port=>'"int"',
+ int=>'"int"',
+ float=>'"float"',
+ double=>'"double"',
+ },
+ 'wsdl'=>{
+ bool=>'"xsd:boolean"',
+ string=>'"xsd:string"',
+ int=>'"xsd:int"',
+ jobid=>'"xsd:string"',
+ jobstat=>'"jobStatus"',
+ usertag=>'"tagValue"',
+ timeval=>'"timeval"',
+ logsrc=>'"eventSource"',
+ notifid=>'"xsd:string"',
+ port=>'"xsd:int"',
+ float=>'"xsd:float"',
+ double=>'"xsd:double"',
+ }
+);
+
+%baseTypes = (
+ intlist=>'int',
+ floatlist=>'float',
+ doublelist=>'double',
+ strlist=>'string',
+ stslist=>'jobstat',
+ taglist=>'usertag'
+);
+
+%toString = (
+ C=>{
+ int=>'qq{asprintf(&$dst,"%d",$src);}',
+ float=>'qq{asprintf(&$dst,"%f",$src);}',
+ double=>'qq{asprintf(&$dst,"%f",$src);}',
+ port=>'qq{asprintf(&$dst,"%d",(int) $src);}',
+ bool=>'qq{asprintf(&$dst,"%d",$src);}',
+ string=>'qq{$dst = $src?strdup($src):NULL;}',
+ timeval=>'qq{edg_wll_ULMTimevalToDate(($src).tv_sec,($src).tv_usec,$dst);}',
+ jobid=>'qq{$dst = edg_wlc_JobIdUnparse($src);}',
+ notifid=>'qq{$dst = edg_wll_NotifIdUnparse($src);}',
+# level=>'qq{$dst = edg_wll_LevelToString($src);}',
+ logsrc=>'qq{$dst = edg_wll_SourceToString($src);}',
+# strlist, intlist, stslist are used only in consumer API, they don't need toString method
+ }
+);
+
+%ULMasString = (
+ logsrc=>1
+);
+
+%fromString = (
+ C=>{
+ int=>'qq{$dst = atoi($src);}',
+ float=>'qq{$dst = strtof($src,NULL);}',
+ double=>'qq{$dst = strtod($src,NULL);}',
+ port=>'qq{$dst = (uint16_t) atoi($src);}',
+ bool=>'qq{$dst = atoi($src);}',
+ string=>'qq{$dst = strdup($src);}',
+ timeval=>'qq{edg_wll_ULMDateToTimeval($src,&$dst);}',
+ jobid=>'qq{edg_wlc_JobIdParse($src,&$dst);}',
+ notifid=>'qq{edg_wll_NotifIdParse($src,&$dst);}',
+# level=>'qq{$dst = edg_wll_StringToLevel($src);}',
+ logsrc=>'qq{$dst = edg_wll_StringToSource($src);}',
+# strlist, intlist, stslist are used only in consumer API, they don't need fromString method
+ }
+);
+
+%DefaultNullValue = (
+ int=>0,
+ float=>0.0,
+ double=>0.0,
+ port=>0,
+# level=>'EDG_WLL_LEVEL_UNDEFINED',
+ bool=>0,
+ string=>'NULL',
+ jobid=>'NULL',
+ notifid=>'NULL',
+ logsrc=>'EDG_WLL_SOURCE_NONE',
+ timeval=>'null_timeval',
+ strlist=>'NULL',
+ intlist=>'NULL',
+ taglist=>'NULL',
+ stslist=>'NULL',
+);
+
+%compare = (
+ C=>{
+ int=>'"($a == $b)"',
+ float=>'"($a == $b)"',
+ double=>'"($a == $b)"',
+ port=>'"($a == $b)"',
+# level=>'"($a == $b)"',
+ bool=>'"(($a || !$b) && ($b || !$a))"',
+# string=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))"',
+ string=>'if ($b =~ m/^NULL/) { qq{(($a) == NULL) || (($a)&& !strcmp($a,""))}; }
+ else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp($a,$b))}; } ',
+# jobid=>'"(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))"',
+ jobid=>'if ($b =~ m/^NULL/) { qq{(($a) == NULL) || (($a)&& !strcmp(edg_wlc_JobIdUnparse($a),""))}; }
+ else { qq{(($a) == NULL && ($b) == NULL) || (($a)&&($b)&& !strcmp(edg_wlc_JobIdUnparse($a),edg_wlc_JobIdUnparse($b)))}; }',
+ notifid=>'"($a) == ($b)"',
+ logsrc=>'"($a) == ($b)"',
+ timeval=>'"($a).tv_sec == ($b).tv_sec && ($a).tv_usec == ($b).tv_usec"',
+ }
+);
+
+%toFormatString = (
+ C=>{
+ int=>'"%d"',
+ float=>'"%f"',
+ double=>'"%f"',
+ port=>'"%d"',
+ bool=>'"%d"',
+# level=>'"%s"',
+ string=>'"%|Us"',
+ jobid=>'"%s"',
+ notifid=>'"%s"',
+ logsrc=>'"%s"',
+ timeval=>'"%s"',
+ }
+);