Add the updating of the xvm-contacts description with last updated date.
[invirt/scripts/update-contacts.git] / update-contacts
index 03087a2..22edcc4 100755 (executable)
@@ -9,6 +9,7 @@ removing as necessary.
 
 import socket
 import subprocess
+import datetime
 
 from invirt import database
 from invirt import remctl
@@ -31,7 +32,8 @@ def stripDomain(c):
         return c
 
 def updateContacts(contacts):
-    p = subprocess.Popen(['blanche', '-f', '-', 'xvm-contacts'],
+    now = datetime.datetime.now()
+    p = subprocess.Popen(['blanche', '-f', '-', '-D', "\"All contacts for XVM Machines (%02d/%2d/%2d)\"" % (now.month, now.day, now.year), 'xvm-contacts'],
                          stdin=subprocess.PIPE,
                          )