Quota

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

Users quota for tape requests

Variables
  • user (models.CharField) -- identified for the user, the same as their JASMIN login

  • size (FileSizeField) -- The size of the quota in bytes

  • email_address (models.CharField) -- The email address of the user

  • notes (models.TextField) -- Notes about the user, affliation, project, etc.

exception DoesNotExist
exception MultipleObjectsReturned
requests()

Get the requests associated with this quota

Returns

All requests associated with this quota.

Return type

QuerySet[TapeRequest]

used(retention_date)

Get the amount of quota used by this user

Parameters

retention (DateTime) -- the retention date. User's requests with retention dates beyond this will be used in the calculation of the used quota.

Returns

The size of the quota in bytes.

Return type

integer