Recognize summary and terminal flags
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 1 Jul 2011 12:36:55 +0000 (12:36 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 1 Jul 2011 12:36:55 +0000 (12:36 +0000)
org.glite.lb.common/interface/jobstat.h.T
org.glite.lb.common/src/xml_conversions.c

index c870a84..760b6a0 100644 (file)
@@ -170,6 +170,8 @@ typedef struct _edg_wll_JobStat {
 #define EDG_WLL_STAT_CHILDSTAT 4       /**< apply the flags recursively to subjobs */
 #define EDG_WLL_STAT_CHILDHIST_FAST 8          /**< partially complete histogram of child job states */
 #define EDG_WLL_STAT_CHILDHIST_THOROUGH 16     /**< full and up-to date histogram of child job states */
+#define EDG_WLL_NOTIF_TERMINAL_STATES 64       /**< Generate notifications on terminal states */
+#define EDG_WLL_NOTIF_EVENT_SUMMARY 128        /**< Attach all job's events to the notification */
 #define EDG_WLL_NOTIF_BOOTSTRAP 256    /**< send the state of the all already existing jobs too */
 #define EDG_WLL_NOTIF_VOLATILE 512     /**< (not used yet) send the notifications directly, without reliability and persistency */
 /* starting from bit 10 private flags begins - do not add 1024 and more! */
index f734bf5..adb88d4 100644 (file)
@@ -773,6 +773,8 @@ char *edg_wll_stat_flags_to_string(int flags)
         if (flags & EDG_WLL_STAT_NO_STATES)      append_flag(&cflags, "no_states");
         if (flags & EDG_WLL_STAT_CHILDHIST_FAST) append_flag(&cflags, "childhist_fast");
         if (flags & EDG_WLL_STAT_CHILDHIST_THOROUGH) append_flag(&cflags, "childhist_thorough");
+        if (flags & EDG_WLL_NOTIF_TERMINAL_STATES)     append_flag(&cflags, "terminal_states");
+        if (flags & EDG_WLL_NOTIF_EVENT_SUMMARY)     append_flag(&cflags, "event_summary");
         if (flags & EDG_WLL_NOTIF_BOOTSTRAP)     append_flag(&cflags, "bootstrap");
         if (flags & EDG_WLL_NOTIF_VOLATILE)      append_flag(&cflags, "volatile");
         if (!cflags) cflags = strdup("");
@@ -797,6 +799,8 @@ int edg_wll_string_to_stat_flags(char *cflags)
                if (!strcmp(sflag,"no_states")) flags = flags | EDG_WLL_STAT_NO_STATES;
                 if (!strcmp(sflag,"childhist_fast")) flags = flags | EDG_WLL_STAT_CHILDHIST_FAST;
                 if (!strcmp(sflag,"childhist_thorough")) flags = flags | EDG_WLL_STAT_CHILDHIST_THOROUGH;
+               if (!strcmp(sflag,"terminal_states")) flags = flags | EDG_WLL_NOTIF_TERMINAL_STATES;
+               if (!strcmp(sflag,"event_summary")) flags = flags | EDG_WLL_NOTIF_EVENT_SUMMARY;
                if (!strcmp(sflag,"bootstrap")) flags = flags | EDG_WLL_NOTIF_BOOTSTRAP;
                if (!strcmp(sflag,"volatile")) flags = flags | EDG_WLL_NOTIF_VOLATILE;
                sflag = strtok_r(NULL, "+", &last);