Page MenuHomePhabricator

iscap 'project level' commands
ClosedPublic

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

Details

Reviewers
thcipriani
Group Reviewers
Release-Engineering-Team
Commits
rMWTSa01e784798a4: iscap 'project level' commands
rMSCAa01e784798a4: iscap 'project level' commands
Patch without arc
git checkout -b D4 && curl -L https://phabricator.wikimedia.org/D4?download=true | git apply
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

Diff Detail

Repository
rMSCA Scap
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mmodell updated this revision to Diff 17.Sep 4 2015, 3:33 PM
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.
mmodell updated this revision to Diff 18.Sep 5 2015, 5:53 AM
  • fix dynamic command imports
mmodell updated this revision to Diff 19.Sep 5 2015, 7:34 AM
  • Implement completion for commands and subcommands

And this is what it looks like:

mmodell edited the test plan for this revision. (Show Details)Sep 5 2015, 7:47 AM
mmodell added subscribers: demon, dduvall, greg.
This revision was automatically updated to reflect the committed changes.
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptFeb 20 2018, 4:24 PM
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
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