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

[api] Collections API for Cloud Volumes #14260

Merged
merged 5 commits into from
Mar 15, 2017

Conversation

AparnaKarve
Copy link
Contributor

Collections API for Cloud Volumes

/api/cloud_volumes

/cc @abellotti @imtayadeway

Copy link
Member

@abellotti abellotti left a comment

Choose a reason for hiding this comment

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

Hi @AparnaKarve looks good, couple of questions/comments.

FactoryGirl.create(:cloud_volume)
test_collection_query(:cloud_volumes, cloud_volumes_url, CloudVolume)
end

Copy link
Member

Choose a reason for hiding this comment

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

need to add the other test for bulk queries.

Copy link
Member

Choose a reason for hiding this comment

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

also probably need just the resource gets tests, look at spec/requests/api/regions_spec.rb and create a spec/requests/api/cloud_volumes_spec.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

config/api.yml Outdated
:identifier: cloud_volume
:options:
- :collection
- :subcollection
Copy link
Member

Choose a reason for hiding this comment

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

I didn't see who is declaring this as a subcollection

Copy link
Member

Choose a reason for hiding this comment

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

is this needed a primary collection (i.e. I want to query all cloud volumes) or as a subcollection (I need to query cloud volumes pertaining to a CI) or both ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current use case that I know needs it only as a primary collection. In that case, should I remove - :subcollection?

Copy link
Member

Choose a reason for hiding this comment

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

If it's just as a primary collection then yes, subcollection should go. Thanks.

@abellotti
Copy link
Member

Hi @AparnaKarve I think this is good, we just need the it "bulk query CloudVolumes" test added to spec/requests/api/collections_spec.rb. Look at the later part of the file for the bulk queries. Thanks.

@miq-bot
Copy link
Member

miq-bot commented Mar 15, 2017

Checked commits AparnaKarve/manageiq@1e6f2c9~...0bbcd8a with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks good. ⭐

@abellotti
Copy link
Member

Thanks @AparnaKarve for adding the test. LGTM!! 👍

@abellotti abellotti merged commit 765f29d into ManageIQ:master Mar 15, 2017
@abellotti abellotti added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 15, 2017
@AparnaKarve
Copy link
Contributor Author

Thanks for merging @abellotti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants