Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tctl refactoring #1168

Merged
merged 4 commits into from
Jul 28, 2017
Merged

tctl refactoring #1168

merged 4 commits into from
Jul 28, 2017

Conversation

kontsevoy
Copy link
Contributor

Introduction

This commit does not change any behavior. It is 100% refactoring and cleaning up. It prepares tctl to exist in two forms (distributions):

  • OSS - just like before, but dynamic resources are officially supported (they are not hidden anymore)
  • Enterprise - supports additional resources and possibly additional commands.

Meat

tctl already had all of its commands separated into various Command structures/classes. However, the CLI parsing (basically main() function) has been the same: big and flat, except it was called Run()

This commit makes Run() configurable: a caller (usually main()) can pass a list of commands it wants to be executed. Obviously you can inherit commands as well.

This allows different editions (distributions) of tctl to be quickly created.

Conclusion

This PR is a preparation for #1137 (becomes trivial)

... to make the unit test more reliable

refs #1143
`tctl` can now be compiled for multiple distributions, with different
features (commands) enabled or disabled.
@kontsevoy kontsevoy merged commit ad95a27 into master Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants