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

Should requests return an operation? #340

Closed
Temikus opened this issue May 22, 2018 · 1 comment
Closed

Should requests return an operation? #340

Temikus opened this issue May 22, 2018 · 1 comment
Assignees

Comments

@Temikus
Copy link
Member

Temikus commented May 22, 2018

I think if requests are uncomfortable enough that we have to have this in tests:
https://github.com/fog/fog-google/blob/23878b2d33ea1aecb54fa7d4652b1c77b3e51530/test/helpers/client_helper.rb#L43-L75
, we should just make requests return an operation object we can just use .wait_for on.

So instead of:

    request = @client.insert_backup_run(instance.name, data)
    operation = @operations.new(:service => service).get(request.name)
    operation.wait_for { ready? }

, we should have something like:

    operation = @client.insert_backup_run(instance.name, data)
    operation.wait_for { ready? }

@icco WDYT? Or am I missing something?

@Temikus
Copy link
Member Author

Temikus commented Jul 14, 2018

Closing in favor of #381

@Temikus Temikus closed this as completed Jul 14, 2018
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

1 participant