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

better separation of execution logic from CLI #11

Open
msusta opened this issue Jul 25, 2014 · 3 comments
Open

better separation of execution logic from CLI #11

msusta opened this issue Jul 25, 2014 · 3 comments

Comments

@msusta
Copy link
Contributor

msusta commented Jul 25, 2014

At the moment the CLI handler is hosting most of the actual execution logic while being tied to the CLI input. It'd be nice if the logic got moved somewhere separately to better accept arguments from other inputs without the need to rewrite most of the cli.py code.

@pas256
Copy link
Member

pas256 commented Jul 25, 2014

Totally agree. I kind of designed it with core.Distami being kind of the API, and CLI being the process, but really the CLI and process should be separated as well.

@msusta
Copy link
Contributor Author

msusta commented Jul 28, 2014

Guess the exec logic here is the copy() function and parallel copy setup. So no matter the input / parser the data should be:

  • AMI ID
  • AMI Region
  • Regions to copy to
  • Accounts to share with

So the CLI should be left only with arg parser and the functionality moved somewhere in core. It can be probably in it's own class to still allow using Distami without change.

@pas256
Copy link
Member

pas256 commented Jul 28, 2014

Right. I would like it to be its own class as core is already doing enough

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

No branches or pull requests

2 participants