Revision 4dcfe1c4 snf-astakos-app/astakos/im/management/commands/user-set-initial-quota.py

b/snf-astakos-app/astakos/im/management/commands/user-set-initial-quota.py
41 41
from astakos.im.models import AstakosUser
42 42

  
43 43
AddResourceArgs = namedtuple('AddQuotaArgs', ('resource',
44
                                              'quantity',
45 44
                                              'capacity',
45
                                              'quantity',
46 46
                                              'import_limit',
47 47
                                              'export_limit'))
48 48

  
49 49
class Command(BaseCommand):
50
    help = "Import account quota policies"
50
    args = "<exported_quotas>"
51
    help = """Import user quota limits from file
52

  
53
    The file must contain non-empty lines, and each line must
54
    contain a single-space-separated list of values:
55

  
56
    <user> <resource name> <capacity> <quantity> <import_limit> <export_limit>
57

  
58
    For example to grant the following user with 10 private networks
59
    (independent of any he receives from projects):
60

  
61
    6119a50b-cbc7-42c0-bafc-4b6570e3f6ac cyclades.network.private 10 0 1000000 1000000
62

  
63
    The last two values are arbitrarily large to represent no
64
    import/export limit at all.
51 65

  
66
    """
52 67
    def handle(self, *args, **options):
53 68
        if len(args) != 1:
54 69
            raise CommandError('Invalid number of arguments')

Also available in: Unified diff