TapeRequest

class nla_control.models.TapeRequest(*args, **kwargs)

Tape file staging requests.

Variables
  • label (models.CharField) -- A user assigned label for the request

  • quota (models.ForeignKey) -- A reference to the user id (and their quota) that made the request

  • retention (models.DateTimeField) -- The date and time when the restored file will be removed from the restore area

  • request_date (models.DateTimeField) -- The time and date the request was made

  • active_request (models.BooleanField) -- Whether a request is currently active or not. Modified by update_requests in process_requests.py

  • storaged_request_start (models.DateTimeField) -- the date and time the retrieval request started on StorageD

  • storaged_request_end (models.DateTimeField) -- the date and time the retrieval request concluded on StorageD

  • first_files_on_disk (models.DateTimeField) -- the date and time the first files arrived on the restore disk

  • last_files_on_disk (models.DateTimeField) -- the date and time the last files arrived on the restore disk

  • files (models.ManyToManyField) -- list of files in the request. Modified by update_requests in process_requests.py

  • request_files (models.TextField) -- A list of files requested by the user

  • request_patterns (models.CharField) -- pattern to match against to retrieve files from tape

  • notify_on_first_file (models.CharField) -- email address to notify when first restored file is available in the restore area

  • notify_on_last_file (models.CharField) -- email address to notify when last file is available in restore area - i.e. the request is complete

exception DoesNotExist
exception MultipleObjectsReturned
set_notify(on_first=None, on_last=None)

Set the email address for where to send the notifications of the first files arriving on disk and the last files arriving on disk.

Parameters
  • on_first (string) -- email address for the first files on disk notification to be sent to

  • on_last (string) -- email address for the last files on disk notification to be sent to

set_retention(retention)

Set the retention date for the request. Files in the request will be maintained on disk until the retention date is passed.

Parameters

retention (DateTime) -- The new retention date for the request

size()

Return the total size of all the files in a request.

Returns

Total size

Returntype

integer