HomePhabricator
Diffusion Scap a01e784798a4

iscap 'project level' commands

Description

iscap 'project level' commands

Summary:
Now you can add custom commands to a deployment project
by placing simple python modules in project_root/scap/cmd/
The command implementation should be in a file named
{command-name}.py and the module should define a function
named run(*args).

If there are any other functions defined in a command_module
then those function names map directly to subcommands.

Example project_root/scap/cmd/mycommand.py:

def run(*args):
    print "run("
    print args
    print ")"

def subcommand(*args):
    print "mycommand subcommand [args]"

Change-Id: I059bcef83e9e1a17213764fd1671328853904220

Test Plan: run scap/bin/iscap

Reviewers: thcipriani

Differential Revision: https://phabricator.wikimedia.org/D4