def run(ctx=None): if context.target_nodes: nodes = context.target_nodes.split(",") else: nodes = ctx.all_nodes for node in nodes: ctx.update(node=node) c = roles.get("HW", ctx) c.run(context.cmd)
def setup(ctx=None): if not context.component: print "Please pass --component option." return else: print "Setting up component %s @ %s" % (context.component, ctx) C = roles.get(context.component, ctx) if context.method: fn = getattr(C, context.method) fn() else: C.setup()
def _setup_role(ctx, role): ROLE = roles.get(role, ctx) ROLE.setup()
def _setup_master(ctx): MASTER = roles.get(constants.MASTER, ctx) MASTER.setup()
def _setup_vmc(ctx): VMC = roles.get(constants.VMC, ctx) VMC.setup()