'This method should only be called for a Quota that has previously been deleted.
Purging a deleted Quota deletes all of the following from the database:
- UserQuotaAssociations where quota_id == Quota.id
- GroupQuotaAssociations where quota_id == Quota.id'

def _purge_quota(self, quota, params):

    quotas = util.listify(quota)
    names = []
    for q in quotas:
        if (not q.deleted):
            names.append(q.name)
    if (len(names) == 1):
        raise ActionInputError(("Quota    '%s'    has    not    been    deleted,    so    it    cannot    be    purged." % names[0]))
    elif (len(names) > 1):
        raise ActionInputError(('Quotas    have    not    been    deleted    so    they    cannot    be    undeleted:    ' + ',    '.join(names)))
    message = ('Purged    %d    quotas:    ' % len(quotas))
    for q in quotas:
        for uqa in q.users:
            self.sa_session.delete(uqa)
        for gqa in q.groups:
            self.sa_session.delete(gqa)
        names.append(q.name)
    self.sa_session.flush()
    message += ',    '.join(names)
    return message
