quota Package

quota Package

Galaxy Quotas

class galaxy.quota.NoQuotaAgent(model)[source]

Bases: object

Base quota agent, always returns no quota

default_quota
get_percent(trans=None, user=False, history=False, usage=False, quota=False)[source]
get_quota(user, nice_size=False)[source]
get_usage(trans=None, user=False, history=False)[source]
get_user_quotas(user)[source]
class galaxy.quota.QuotaAgent(model)[source]

Bases: galaxy.quota.NoQuotaAgent

Class that handles galaxy quotas

default_registered_quota
default_unregistered_quota
get_percent(trans=None, user=False, history=False, usage=False, quota=False)[source]

Return the percentage of any storage quota applicable to the user/transaction.

get_quota(user, nice_size=False)[source]

Calculated like so:

  1. Anonymous users get the default quota.
  2. Logged in users start with the highest of their associated ‘=’ quotas or the default quota, if there are no associated ‘=’ quotas. If an ‘=’ unlimited (-1 in the database) quota is found during this process, the user has no quota (aka unlimited).
  3. Quota is increased or decreased by any corresponding ‘+’ or ‘-‘ quotas.
get_user_quotas(user)[source]
set_default_quota(default_type, quota)[source]
set_entity_quota_associations(quotas=[], users=[], groups=[], delete_existing_assocs=True)[source]