Commit 1de90e71 authored by Thomas Jürges's avatar Thomas Jürges

Allow en-/disabling of e-mail notifications

parent 8a53d7ea
......@@ -11,7 +11,6 @@
# limitations under the License.
# This is the Stager API wrapper module for the Lofar LTA staging service.
#
# It uses an xmlrpc proxy to talk and authenticate to the remote service. Your account credentials will be read from
......@@ -21,7 +20,7 @@
# !! This is to ensure that when we change the remote interface, your scripts don't break and you will only have to
# !! upgrade this module.
__version__ = "1.3"
__version__ = "1.4"
import datetime
from os.path import expanduser
......@@ -66,11 +65,11 @@ LtaStager = proxy.LtaStager
# ---
def stage(surls):
""" Stage list of SURLs """
def stage(surls, send_notifications=True):
""" Stage list of SURLs, optionally enable/disable email notifications """
if isinstance(surls, str):
surls = [surls]
stageid = proxy.LtaStager .add_getid(surls)
stageid = proxy.LtaStager.add_getid(surls, send_notifications)
return stageid
def get_status(stageid):
......@@ -81,6 +80,18 @@ def abort(stageid):
""" Abort running request / release data of a finished request with given ID """
return proxy.LtaStager.abort(stageid)
def get_surls_requested(stageid):
""" Get a list of all files that are requested via a running request with given ID """
return proxy.LtaStager.getrequestedurls(stageid)
def get_surls_pending(stageid):
""" Get a list of all files that are not yet online for a running request with given ID """
return proxy.LtaStager.getoutstandingurls(stageid)
def get_surls_failed(stageid):
""" Get a list of all files that have failed in a running request with given ID """
return proxy.LtaStager.getfailedurls(stageid)
def get_surls_online(stageid):
""" Get a list of all files that are already online for a running request with given ID """
return proxy.LtaStager.getstagedurls(stageid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment