Commit 6eea001c authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

deploy: Cleanup fabfile wrt actions

Support only:

 snf-deploy synnefo --autoconf

 snf-deploy synnefo --setup qa
 snf-deploy setup --setup qa --component NS --node qa1 --cluster ganeti-qa

 snf-deploy run --setup qa --target-nodes qa1,qa2 --cmd=date
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent a9653b4b
......@@ -259,12 +259,6 @@ def parse_options():
def get_actions(*args):
actions = {
"ganeti": [
"setup_ganeti"
],
"ganeti-qa": [
"setup_qa",
],
"synnefo": [
"setup_synnefo",
],
......
......@@ -118,41 +118,22 @@ def setup_synnefo():
setup_role(constants.CLIENT)
def setup_ganeti():
setup_role(constants.NS)
setup_role(constants.NFS)
setup_cluster()
@with_cluster
def _setup_qa(ctx):
setup_role(constants.NS)
setup_role(constants.NFS)
setup_cluster()
setup_role(constants.DEV)
@with_ctx
def setup_qa(ctx=None):
execute(_setup_qa, ctx, hosts=ctx.clusters)
def setup(ctx=None):
if not context.component:
print "Please pass --component option."
return
else:
print "Setting up component %s @ %s" % (context.component, ctx)
@with_ctx
def setup(ctx=None):
C = roles.get(context.component, ctx)
if context.node:
if context.component:
C = roles.get(context.component, ctx)
elif context.role:
C = roles.get(context.role, ctx)
if context.method:
fn = getattr(C, context.method)
fn()
else:
C.setup()
elif context.cluster:
_setup_cluster(ctx)
if context.method:
fn = getattr(C, context.method)
fn()
else:
C.setup()
@with_ctx
......
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