Revision d61d6007
b/docs/admin-guide.rst | ||
---|---|---|
306 | 306 |
and customize the ``'uplimit'`` values. |
307 | 307 |
These are the default base quota for all users. |
308 | 308 |
|
309 |
To apply your configuration run::
|
|
309 |
You can modify the default base quota limit for all future users with::
|
|
310 | 310 |
|
311 |
# snf-manage astakos-init --load-service-resources |
|
312 |
# snf-manage quota --sync |
|
311 |
# snf-manage resource-modify <resource_name> --default-quota <value> |
|
313 | 312 |
|
314 | 313 |
Set base quota for individual users |
315 | 314 |
``````````````````````````````````` |
... | ... | |
336 | 335 |
You can change the maximum allowed number of pending project applications |
337 | 336 |
per user with:: |
338 | 337 |
|
339 |
# snf-manage resource-modify astakos.pending_app --limit <number>
|
|
338 |
# snf-manage resource-modify astakos.pending_app --default-quota <number>
|
|
340 | 339 |
|
341 | 340 |
You can also set a user-specific limit with:: |
342 | 341 |
|
b/docs/quick-install-admin-guide.rst | ||
---|---|---|
914 | 914 |
|
915 | 915 |
.. code-block:: console |
916 | 916 |
|
917 |
# snf-manage resource-modify --limit-interactive
|
|
917 |
# snf-manage resource-modify --default-quota-interactive
|
|
918 | 918 |
|
919 | 919 |
|
920 | 920 |
Servers Initialization |
b/snf-astakos-app/astakos/im/management/commands/resource-list.py | ||
---|---|---|
53 | 53 |
"name": ("name", "Resource Name"), |
54 | 54 |
"service type": ("service_type", "Service type"), |
55 | 55 |
"service origin": ("service_origin", "Service"), |
56 |
"limit": ("limit_with_unit", "Base Quota"),
|
|
56 |
"default_quota": ("limit_with_unit", "Default Quota"),
|
|
57 | 57 |
"description": ("desc", "Description"), |
58 | 58 |
"allow_in_projects": ("allow_in_projects", |
59 | 59 |
"Make resource available in projects"), |
60 | 60 |
} |
61 | 61 |
|
62 |
fields = ["id", "name", "service origin", "limit",
|
|
62 |
fields = ["id", "name", "service origin", "default_quota",
|
|
63 | 63 |
"description"] |
64 | 64 |
|
65 | 65 |
def show_limit(self, resource): |
b/snf-astakos-app/astakos/im/management/commands/resource-modify.py | ||
---|---|---|
46 | 46 |
help = "Modify a resource's default base quota and boolean flags." |
47 | 47 |
|
48 | 48 |
option_list = BaseCommand.option_list + ( |
49 |
make_option('--limit', |
|
49 |
make_option('--default-quota', |
|
50 |
metavar='<limit>', |
|
50 | 51 |
help="Specify default base quota"), |
51 |
make_option('--limit-interactive',
|
|
52 |
make_option('--default-quota-interactive',
|
|
52 | 53 |
action='store_true', |
53 | 54 |
default=None, |
54 | 55 |
help=("Prompt user to change default base quota. " |
55 | 56 |
"If no resource is given, prompts for all " |
56 | 57 |
"resources.")), |
57 |
make_option('--limit-from-file',
|
|
58 |
make_option('--default-quota-from-file',
|
|
58 | 59 |
metavar='<limits_file.json>', |
59 | 60 |
help=("Read default base quota from a file. " |
60 | 61 |
"File should contain a json dict mapping resource " |
... | ... | |
73 | 74 |
resource_name = args[0] if len(args) > 0 else None |
74 | 75 |
|
75 | 76 |
actions = { |
76 |
'limit': self.change_limit,
|
|
77 |
'limit_interactive': self.change_interactive,
|
|
78 |
'limit_from_file': self.change_from_file,
|
|
77 |
'default_quota': self.change_limit,
|
|
78 |
'default_quota_interactive': self.change_interactive,
|
|
79 |
'default_quota_from_file': self.change_from_file,
|
|
79 | 80 |
'allow_in_projects': self.set_allow_in_projects, |
80 | 81 |
} |
81 | 82 |
|
... | ... | |
85 | 86 |
|
86 | 87 |
if len(opts) != 1: |
87 | 88 |
raise CommandError("Please provide exactly one of the options: " |
88 |
"--limit, --limit-interactive, " |
|
89 |
"--limit-from-file, --allow-in-projects.") |
|
89 |
"--default-quota, --default-quota-interactive, " |
|
90 |
"--default-quota-from-file, " |
|
91 |
"--allow-in-projects.") |
|
90 | 92 |
|
91 | 93 |
self.unit_style = options['unit_style'] |
92 | 94 |
check_style(self.unit_style) |
b/snf-deploy/snfdeploy/fabfile.py | ||
---|---|---|
1256 | 1256 |
|
1257 | 1257 |
debug(env.host, " * Setting default quota...") |
1258 | 1258 |
cmd = """ |
1259 |
snf-manage resource-modify --limit 40G pithos.diskspace
|
|
1260 |
snf-manage resource-modify --limit 2 astakos.pending_app
|
|
1261 |
snf-manage resource-modify --limit 4 cyclades.vm
|
|
1262 |
snf-manage resource-modify --limit 40G cyclades.disk
|
|
1263 |
snf-manage resource-modify --limit 16G cyclades.total_ram
|
|
1264 |
snf-manage resource-modify --limit 8G cyclades.ram
|
|
1265 |
snf-manage resource-modify --limit 32 cyclades.total_cpu
|
|
1266 |
snf-manage resource-modify --limit 16 cyclades.cpu
|
|
1267 |
snf-manage resource-modify --limit 4 cyclades.network.private
|
|
1268 |
snf-manage resource-modify --limit 4 cyclades.floating_ip
|
|
1259 |
snf-manage resource-modify --default-quota 40G pithos.diskspace
|
|
1260 |
snf-manage resource-modify --default-quota 2 astakos.pending_app
|
|
1261 |
snf-manage resource-modify --default-quota 4 cyclades.vm
|
|
1262 |
snf-manage resource-modify --default-quota 40G cyclades.disk
|
|
1263 |
snf-manage resource-modify --default-quota 16G cyclades.total_ram
|
|
1264 |
snf-manage resource-modify --default-quota 8G cyclades.ram
|
|
1265 |
snf-manage resource-modify --default-quota 32 cyclades.total_cpu
|
|
1266 |
snf-manage resource-modify --default-quota 16 cyclades.cpu
|
|
1267 |
snf-manage resource-modify --default-quota 4 cyclades.network.private
|
|
1268 |
snf-manage resource-modify --default-quota 4 cyclades.floating_ip
|
|
1269 | 1269 |
""" |
1270 | 1270 |
try_run(cmd) |
1271 | 1271 |
|
Also available in: Unified diff