]> git.sur5r.net Git - bacula/bacula/commitdiff
- Make Version a tuple (version, build-date)
authorKern Sibbald <kern@sibbald.com>
Wed, 22 Jun 2005 19:59:33 +0000 (19:59 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 22 Jun 2005 19:59:33 +0000 (19:59 +0000)
- Add CatalogRes tuple (DbName, Address, User, Password,
    Socket, Port)

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

bacula/kes-1.37
bacula/src/dird/pythondir.c

index 00364c6c7de32f6b6e6db17b113d2c30b85554ec..a1354e431d8aa6b034f4858bfd7b09a2e5f72340 100644 (file)
@@ -5,6 +5,9 @@ General:
 
 Changes to 1.37.26:
 22Jun05:
+- Make Version a tuple (version, build-date)
+- Add CatalogRes tuple (DbName, Address, User, Password,
+    Socket, Port)
 - Add Version, ConfigDir, and WorkingDir as Python attributes
   in the Director.
 - Implement code (principally for Win32) that on failure to
index f192f90b97d93932c995ec099e94b67c2c31e984..749d4b922bdc79156b53586f4db352cdddb03326 100644 (file)
@@ -70,9 +70,10 @@ static struct s_vars getvars[] = {
    { N_("JobName"),    "s"},
    { N_("JobStatus"),  "s"},
    { N_("Priority"),   "i"},
-   { N_("Version"),    "s"},
+   { N_("Version"),    "(ss)"},
    { N_("ConfigFile"), "s"},
    { N_("WorkingDir"), "s"},
+   { N_("CatalogRes"), "(sssssi)"},
 
    { NULL,             NULL}
 };
@@ -147,11 +148,17 @@ PyObject *job_getattr(PyObject *self, char *attrname)
    case 13:                           /* Priority */
       return Py_BuildValue(getvars[i].fmt, jcr->JobPriority);
    case 14:                           /* Version */
-      return Py_BuildValue(getvars[i].fmt, VERSION);
+      return Py_BuildValue(getvars[i].fmt, VERSION, BDATE);
    case 15:                           /* Config Dir */
       return Py_BuildValue(getvars[i].fmt, configfile);
    case 16:                           /* Working Dir */
       return Py_BuildValue(getvars[i].fmt, director->working_directory);
+   case 17:                           /* CatalogRes */
+      return Py_BuildValue(getvars[i].fmt,
+         jcr->catalog->db_name, jcr->catalog->db_address, 
+         jcr->catalog->db_user, jcr->catalog->db_password,
+         jcr->catalog->db_socket, jcr->catalog->db_port);
+
    }
    bsnprintf(errmsg, sizeof(errmsg), "Attribute %s not found.", attrname);
 bail_out: