support JDL retrieval in JP plugin
authorAleš Křenek <ljocha@ics.muni.cz>
Mon, 28 Aug 2006 15:48:43 +0000 (15:48 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Mon, 28 Aug 2006 15:48:43 +0000 (15:48 +0000)
org.glite.lb.server/interface/job-attrs.xsd
org.glite.lb.server/src/lb_plugin.c

index c457c25..2d5cf9e 100644 (file)
        <!-- timestamps of the whole state history, including all resubmission cycles -->
        <xs:element name="fullStatusHistory" type="a:statusSequenceType" />
 
+       <xs:element name="JDL" type="xs:string" />
+
 <!-- No idea where to get these from:
 
    ENVIRONMENT
index 1dbbdfd..fb729df 100644 (file)
@@ -459,6 +459,17 @@ static int lb_query(void *fpctx,void *handle,const char *attr,glite_jp_attrval_t
                                i++;
                        }
                }
+       } else if (strcmp(attr, GLITE_JP_LB_JDL) == 0) {
+               for (i=0; h->events[i]; i++) if (h->events[i]->type == EDG_WLL_EVENT_REGJOB 
+                       && h->events[i]->regJob.jdl)
+               {
+                       av = calloc(2, sizeof(glite_jp_attrval_t));
+                       av[0].name = strdup(attr);
+                       av[0].value = check_strdup(h->events[i]->regJob.jdl);
+                       av[0].timestamp = h->events[i]->any.timestamp.tv_sec;
+                       av[0].size = -1;
+                       break;
+               }
        } else {
                *attrval = NULL;
                err.code = EINVAL;