Commit b2f6b013 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos Committed by Christos Stavrakakis
Browse files

snf-deploy: add flavor options in synnefo.conf

parent 4513fb62
......@@ -25,6 +25,10 @@ router = node1
[synnefo]
pithos_dir = /srv/pithos
flavor_cpu = 1,2,4,8
flavor_ram = 128,256,512,1024,2048,4096,8192
flavor_disk = 2,5,10,20,40,60,80,100
flavor_storage = file,plain,drbd
vm_public_bridge = br0
vm_private_bridge = prv0
......
......@@ -1048,14 +1048,14 @@ def setup_router():
env.env.common_bridge, env.env.public_iface)
try_run(cmd)
@roles("cyclades")
def cyclades_loaddata():
debug(env.host, " * Loading initial data for cyclades...")
tmpl = "/tmp/flavor.json"
replace = {}
custom = customize_settings_from_tmpl(tmpl, replace)
put(custom, tmpl)
try_run("snf-manage loaddata " + tmpl)
try_run("snf-manage flavor-create %s %s %s %s" % (env.env.flavor_cpu,
env.env.flavor_ram,
env.env.flavor_disk,
env.env.flavor_storage))
#run("snf-manage loaddata flavors")
......
[
{
"model": "db.Flavor",
"pk": 1,
"fields": {
"cpu": 1,
"ram": 256,
"disk": 2,
"disk_template": "plain"
}
},
{
"model": "db.Flavor",
"pk": 2,
"fields": {
"cpu": 1,
"ram": 256,
"disk": 2,
"disk_template": "file"
}
}
]
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