Commit 53efa0aa authored by Christos Stavrakakis's avatar Christos Stavrakakis

snf-deploy: Set quota for existing users

Add new action 'set_user_quota' to set base quota for existing users.
parent f37e6c34
......@@ -443,7 +443,7 @@ def get_actions(*args):
"setup_pithos",
"setup_vncauthproxy",
"setup_cyclades", "cyclades_loaddata", "add_pools",
"export_services", "import_services",
"export_services", "import_services", "set_user_quota",
"setup_kamaki", "upload_image", "register_image",
"setup_burnin"
],
......
......@@ -1270,6 +1270,24 @@ def import_services():
try_run(cmd)
@roles("accounts")
def set_user_quota():
debug(env.host, " * Setting user quota...")
cmd = """
snf-manage user-modify -f --all --base-quota pithos.diskspace 40G
snf-manage user-modify -f --all --base-quota astakos.pending_app 2
snf-manage user-modify -f --all --base-quota cyclades.vm 4
snf-manage user-modify -f --all --base-quota cyclades.disk 40G
snf-manage user-modify -f --all --base-quota cyclades.total_ram 16G
snf-manage user-modify -f --all --base-quota cyclades.ram 8G
snf-manage user-modify -f --all --base-quota cyclades.total_cpu 32
snf-manage user-modify -f --all --base-quota cyclades.cpu 16
snf-manage user-modify -f --all --base-quota cyclades.network.private 4
snf-manage user-modify -f --all --base-quota cyclades.floating_ip 4
"""
try_run(cmd)
@roles("cyclades")
def add_network():
debug(env.host, " * Adding public network in cyclades...")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment