]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Add JobErrors, JobFiles, SDJobFiles, SDJobErrors, SDJobStatus,
authorKern Sibbald <kern@sibbald.com>
Tue, 12 Sep 2006 19:21:09 +0000 (19:21 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 12 Sep 2006 19:21:09 +0000 (19:21 +0000)
     and FDJobStatus to the Director Python variables.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3460 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/pythondir.c
bacula/technotes-1.39

index 09954f15acf636576bdc486e5607f1c1aa15fc6a..5e37d3c3653ab86e3446bc22c923df5802723fd6 100644 (file)
@@ -29,6 +29,14 @@ Document:
   building the French PDF.
 - Document more DVD stuff -- particularly that recycling doesn't work,
   and all the other things too.
+- Doc
+   { "JobErrors",  "i"},
+   { "JobFiles",   "i"},
+   { "SDJobFiles", "i"},
+   { "SDErrors",   "i"},
+   { "FDJobStatus","s"},
+   { "SDJobStatus","s"},
 
 Priority:
 
index 09c49659f885b94449d7801b7fc8a5c6a22455ca..a4138f2b4a031905898ef1ade02346d9eb7d3efb 100644 (file)
@@ -74,6 +74,12 @@ static struct s_vars getvars[] = {
    { "Priority",   "i"},
    { "VolumeName", "s"},
    { "CatalogRes", "(sssssis)"},
+   { "JobErrors",  "i"},
+   { "JobFiles",   "i"},
+   { "SDJobFiles", "i"},
+   { "SDErrors",   "i"},
+   { "FDJobStatus","s"},
+   { "SDJobStatus","s"},
 
    { NULL,             NULL}
 };
@@ -175,7 +181,22 @@ PyObject *job_getattr(PyObject *self, char *attrname)
          jcr->catalog->db_user, jcr->catalog->db_password,
          jcr->catalog->db_socket, jcr->catalog->db_port,
          db_get_type());
-
+   case 15:                           /* JobErrors */
+      return Py_BuildValue(getvars[i].fmt, jcr->JobErrors);
+   case 16:                           /* JobFiles */
+      return Py_BuildValue(getvars[i].fmt, jcr->JobFiles);
+   case 17:                           /* SDJobFiles */
+      return Py_BuildValue(getvars[i].fmt, jcr->SDJobFiles);
+   case 18:                           /* SDErrors */
+      return Py_BuildValue(getvars[i].fmt, jcr->SDErrors);
+   case 19:                           /* FDJobStatus */
+      buf[1] = 0;
+      buf[0] = jcr->FDJobStatus;
+      return Py_BuildValue(getvars[i].fmt, buf);
+   case 29:                           /* SDJobStatus */
+      buf[1] = 0;
+      buf[0] = jcr->SDJobStatus;
+      return Py_BuildValue(getvars[i].fmt, buf);
    }
    bsnprintf(errmsg, sizeof(errmsg), _("Attribute %s not found."), attrname);
 bail_out:
index 2c334df639d4a342fd797c3acd7f843e4f477e89..95499379b424bc3212532d7eaa6afbfbe2139a1b 100644 (file)
@@ -2,6 +2,8 @@
 
 General:
 12Sep06
+kes  Add JobErrors, JobFiles, SDJobFiles, SDJobErrors, SDJobStatus,
+     and FDJobStatus to the Director Python variables.
 kes  Make sure valid argument passed to str_to_utime() where Arno
      had a seg fault.
 kes  Apply Richard Mortimer's patch for bcopy, bextract, and bscan.