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

Add waiter models #992

Merged
merged 3 commits into from
Nov 10, 2014
Merged

Add waiter models #992

merged 3 commits into from
Nov 10, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 10, 2014

This re-adds #985, and fixes a bug where creating a client without a region would sometimes generate an error. The fix here is so use the waiter_model (via the newly added get_waiter_model from botocore). From the newly added commit:

Update waiters to use the new get_waiter_model

This fixes an issue where previously we were creating a client
without specifying a region, which in certain cases would trigger
an error.  Now we only use the waiter model to generate the necessary
commands.

As part of thie change I went ahead and just switched the invoke
to just use the service/operation object.  This isn't ideal, but at the
same time, it's pretty clear that for the time being there's no way
to do this entirely with just clients.  Given that's the case, I don't
feel it's that imperative to use clients where possible.  When
we switch to clients, this module will need updates regardless.
It also simplified the code a little bit.

Also, the CI build will fail until the get_waiter_model method is merged,
(depends on boto/botocore#376).

cc @kyleknap @danielgtaylor

kyleknap and others added 3 commits November 9, 2014 20:30
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``.

Conflicts:
	awscli/handlers.py
This fixes an issue where previously we were creating a client
without specifying a region, which in certain cases would trigger
an error.  Now we only use the waiter model to generate the necessary
commands.

As part of thie change I went ahead and just switched the invoke
to just use the service/operation object.  This isn't ideal, but at the
same time, it's pretty clear that for the time being there's no way
to do this entirely with just clients.  Given that's the case, I don't
feel it's that imperative to use clients where possible.  When
we switch to clients, this module will need updates regardless.
It also simplified the code a little bit.
@kyleknap
Copy link
Contributor

Looks good. 🚢 Just had the small pep8 comment. I agree with your point on waiting on using the client interface for waiters. I feel that we need to make the conversion first in the clidriver before trying to use clients in the customizations. The customizations revolve too much on the clidriver to be able to make the transition in the customizations first.

Also, I do not think there is a changelog entry for this. We should add one.

@jamesls jamesls merged commit b89d6f0 into aws:develop 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