-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a real python api for running commands
This commit adds a real api for running the stestr commands. Instead of just having a magic run() function that takes in an tuple of a argparse Namespace and a list of undefined arguments this migrates all the real work into a function that has properly defined kwargs. The run() command is then relegated to just convert the Namespace into a dict and pass the arguments into that real function. This enables external programs to just call the new functions with defined args and run commands exactly like on the cli, but with a defined python interface. It makes everything a lot easier for python consumption. The tradeoff here though is that everything is bit more verbose, but that's the cost of being explicit with a defined interface. As a side effect of this change instead of passing that Namespace object around between all the lower layers real interfaces have to be defined for all the functions. This means a ton of new kwargs, but again this is better in the long run because it means we have defined interfaces for all the functions. Closes Issue #8
- Loading branch information
Showing
11 changed files
with
403 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.