Page MenuHomePhabricator

iscap 'project level' commands

Authored by mmodell on Sep 4 2015, 3:33 PM.


Group Reviewers
rMWTSa01e784798a4: iscap 'project level' commands
rMSCAa01e784798a4: iscap 'project level' commands
Patch without arc
git checkout -b D4 && curl -L | git apply

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/

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

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

Change-Id: I059bcef83e9e1a17213764fd1671328853904220

Test Plan

iscap.gif (681×961 px, 122 KB)

Diff Detail

rMSCA Scap
No Lint Coverage
No Test Coverage
Build Status
Buildable 25
Build 25: arc lint + arc unit

Event Timeline

mmodell retitled this revision from to iscap 'project level' commands.
mmodell updated this object.
mmodell edited the test plan for this revision. (Show Details)
mmodell added a reviewer: thcipriani.
  • fix dynamic command imports
  • Implement completion for commands and subcommands

And this is what it looks like:

iscap.gif (681×961 px, 122 KB)

mmodell added subscribers: demon, dduvall, greg.
This revision was automatically updated to reflect the committed changes.
Gehel mentioned this in Unknown Object (Task).Jul 11 2019, 12:29 PM
RobH mentioned this in Unknown Object (Task).Sep 9 2019, 7:55 PM
jijiki mentioned this in Unknown Object (Task).Oct 26 2020, 11:50 AM
wiki_willy mentioned this in Unknown Object (Task).Feb 4 2021, 11:52 PM