Skip to content
Snippets Groups Projects
Commit d8a1f0e9 authored by Thomas Jürges's avatar Thomas Jürges
Browse files

Add copyright notice

parent 1a846ee4
No related branches found
No related tags found
No related merge requests found
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# This is the Stager API wrapper module for the Lofar LTA staging service. # 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 # It uses an xmlrpc proxy to talk and authenticate to the remote service. Your account credentials will be read from
...@@ -21,7 +19,7 @@ ...@@ -21,7 +19,7 @@
# !! This is to ensure that when we change the remote interface, your scripts don't break and you will only have to # !! 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. # !! upgrade this module.
__version__ = "1.3" __version__ = "1.4"
import datetime import datetime
from os.path import expanduser from os.path import expanduser
...@@ -66,11 +64,11 @@ LtaStager = proxy.LtaStager ...@@ -66,11 +64,11 @@ LtaStager = proxy.LtaStager
# --- # ---
def stage(surls): def stage(surls, send_notifications=True):
""" Stage list of SURLs """ """ Stage list of SURLs, optionally enable/disable email notifications """
if isinstance(surls, str): if isinstance(surls, str):
surls = [surls] surls = [surls]
stageid = proxy.LtaStager .add_getid(surls) stageid = proxy.LtaStager.add_getid(surls, send_notifications)
return stageid return stageid
def get_status(stageid): def get_status(stageid):
...@@ -81,6 +79,18 @@ def abort(stageid): ...@@ -81,6 +79,18 @@ def abort(stageid):
""" Abort running request / release data of a finished request with given ID """ """ Abort running request / release data of a finished request with given ID """
return proxy.LtaStager.abort(stageid) 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): def get_surls_online(stageid):
""" Get a list of all files that are already online for a running request with given ID """ """ Get a list of all files that are already online for a running request with given ID """
return proxy.LtaStager.getstagedurls(stageid) return proxy.LtaStager.getstagedurls(stageid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment