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

Expose waiters in the CLI #985

Merged
merged 2 commits into from
Nov 6, 2014
Merged

Expose waiters in the CLI #985

merged 2 commits into from
Nov 6, 2014

Conversation

kyleknap
Copy link
Contributor

@kyleknap kyleknap commented Nov 5, 2014

Add a wait command to all services that have waiters. For each type of
waiter, a subcommand representing that waiter was added. For example, to wait
for an ec2 instance to reach the running state, the wait command would be
specified as aws ec2 wait instance-running.

With the CLI being in a weird transition state, there are some areas that I would like to improve on, but I believe changes to both the client interface and switching the clidriver over to clients need to be made first. I will point out these areas in the code. Let me know if you have any suggestions. Feedback on the places I point out would be very much welcomed.

cc @jamesls @danielgtaylor

Add a ``wait`` command to all services that have waiters. For each type of
waiter, a subcommand representing that waiter was added. For example, to wait
for an ec2 instance to reach the running state, the wait command would be
specified as ``aws ec2 wait instance-running``.
@@ -232,7 +232,16 @@ def doc_subitems_start(self, help_command, **kwargs):

def doc_subitem(self, command_name, help_command, **kwargs):
doc = help_command.doc
doc.style.tocitem(command_name)
subcommand = help_command.command_table[command_name]
subcommand_table = getattr(subcommand, 'subcommand_table', {})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on the assumption that the commands that have even more commands, are a custom BasicCommand. All custom commands have the subcommand_table property. However, if we were stringing together ServiceCommand and ServiceOperation objects we will not be able to use this property because they have no such property (not even under a different name).

@jamesls
Copy link
Member

jamesls commented Nov 5, 2014

Overall I think this looks good. I like the approach, it was straightforward and easy to follow. The only two small things are figuring out if it's possible to have consistent event args and if we can add something to the client to avoid accessing internal attributes.

@kyleknap
Copy link
Contributor Author

kyleknap commented Nov 6, 2014

Ready to get looked at again. I ran the integration tests and they pass as well.

@jamesls
Copy link
Member

jamesls commented Nov 6, 2014

:shipit: Looks good.

kyleknap added a commit that referenced this pull request Nov 6, 2014
Expose waiters in the CLI
@kyleknap kyleknap merged commit 431b694 into aws:develop Nov 6, 2014
jamesls added a commit that referenced this pull request Nov 6, 2014
This reverts commit 431b694, reversing
changes made to 0a5605e.
kyleknap added a commit that referenced this pull request Nov 7, 2014
* release-1.5.6:
  Bumping version to 1.5.6
  Simplify DelegationSetId format
  Update CHANGELOG with new service features
  Revert "Merge pull request #985 from kyleknap/waiters"
  Update waiter code based on feedback
  Expose waiters in the CLI
@jamesls jamesls mentioned this pull request Nov 10, 2014
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