Index: /trunk/ippToPsps/jython/datastore.py
===================================================================
--- /trunk/ippToPsps/jython/datastore.py	(revision 31230)
+++ /trunk/ippToPsps/jython/datastore.py	(revision 31231)
@@ -4,4 +4,5 @@
 import tempfile
 import logging
+import sys
 from xml.etree.ElementTree import ElementTree, Element, tostring
 
@@ -27,6 +28,5 @@
         self.type = doc.find("datastore/type").text
 
-        self.logger.debug("Publishing to '" + self.product + "' product")
-
+        self.logger.debug("Using product: '" + self.product + "' and type: '" + self.type + "'")
 
     '''
@@ -35,4 +35,5 @@
     def publish(self, name, path, file, fileType):
 
+        self.logger.info("Attempting to publish '" + path +"/" + file + "' to datastore product: '" + self.product + "', type: '" + self.type + "'")
         tempFile = tempfile.NamedTemporaryFile(mode='w+b')
         tempFile.write(file + "|||" + fileType)
@@ -48,6 +49,37 @@
         p = Popen(command, shell=True, stdout=PIPE)
         p.wait()
-       
-        #TODO check success print "Return from dsreg: " + p.stdout.read()
+
+        if p.returncode != 0:
+            self.logger.error("Datastore publish failed")
+            ret = False
+        else:
+            self.logger.info("Datastore publish successful")
+            ret = True
+            
 
         tempFile.close()
+        return ret
+
+
+    '''
+    Removes an item to the datastore
+    '''
+    def remove(self, name):
+
+        command = "dsreg \
+                   --del " + name + " \
+                   --rm \
+                   --product " + self.product
+
+        p = Popen(command, shell=True, stdout=PIPE)
+        p.wait()
+
+        if p.returncode != 0:
+            self.logger.error("Datastore removal of " + name + " failed")
+            ret = False
+        else:
+            ret = True
+            self.logger.info("Datastore removal of " + name + " successful")
+            
+        return ret
+
