implemented LBserver attribute
authorAleš Křenek <ljocha@ics.muni.cz>
Tue, 14 Aug 2007 15:32:30 +0000 (15:32 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Tue, 14 Aug 2007 15:32:30 +0000 (15:32 +0000)
org.glite.lb.server/interface/job-attrs.xsd
org.glite.lb.server/src/lb_plugin.c

index 341a003..a2a68bb 100644 (file)
@@ -66,6 +66,7 @@
 
 
        <xs:element name="jobId" type="xs:string" />
+       <xs:element name="LBserver" type="xs:string" />
 
        <xs:element name="user" type="xs:string">
                <xs:annotation> <xs:documentation>Job owner according to LB</xs:documentation> </xs:annotation>
index 6630fa6..0dbe1ba 100644 (file)
@@ -377,6 +377,12 @@ static int lb_query(void *fpctx,void *handle, const char *attr,glite_jp_attrval_
                        av[0].size = -1;
                        av[0].timestamp = h->status.lastUpdateTime.tv_sec;
                }
+       } else if (strcmp(attr, GLITE_JP_LB_LBserver) == 0) {
+               av = calloc(2, sizeof(glite_jp_attrval_t));
+               av[0].name = strdup(attr);
+               av[0].value = edg_wlc_JobIdGetServer(h->status.jobId);
+               av[0].size = -1;
+               av[0].timestamp = h->status.lastUpdateTime.tv_sec;
        } else if (strcmp(attr, GLITE_JP_LB_parent) == 0) {
                if (h->status.parent_job) {
                        av = calloc(2, sizeof(glite_jp_attrval_t));