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

Rackspace Cloud Block Storage models have the potential to create unintended resources #1404

Merged
merged 2 commits into from Dec 21, 2012

Conversation

krames
Copy link
Member

@krames krames commented Dec 20, 2012

This pull request fixes #1402

The save method in both Fog::Rackspace::BlockStorage::Volume and Fog::Rackspace::BlockStorage::Snapshot create new cloud resources every time they are called. This has the potential to create unintended resources.

…Rackspace::BlockStorage::Snapshot to skip creating cloud reources if identity was already set Fixes fog#1402
@geemus
Copy link
Member

geemus commented Dec 20, 2012

@krames - For the sake of consistency with other things in fog this should probably raise an error (rather than returning true) for saves that fail. I think this better communicates what is up and avoids any confusion about save and update being equivalent. See: https://github.com/fog/fog/blob/master/lib/fog/rackspace/models/compute/server.rb#L69 Thoughts?

@geemus
Copy link
Member

geemus commented Dec 20, 2012

@krames - also, looks like one of your other commits and this one conflict, so a rebase would be awesome. Thanks!

@krames
Copy link
Member Author

krames commented Dec 20, 2012

No problem! I will update it to throw an error and rebase the code.

…og::Rackspace::BlockStorage::Snapshot to throw an exception if the identity attribute is set per geemus; rebased code to latest master
@krames
Copy link
Member Author

krames commented Dec 21, 2012

This should be good to go. @brianhartsock can you review and merge this one for me?

Thanks!

@brianhartsock
Copy link
Member

Hmm. I wish the API for block and compute had a more well defined "update" (like https://github.com/fog/fog/blob/master/lib/fog/rackspace/models/load_balancers/load_balancer.rb#L166) but they don't...

With that said, LGTM

brianhartsock added a commit that referenced this pull request Dec 21, 2012
Rackspace Cloud Block Storage models have the potential to create unintended resources
@brianhartsock brianhartsock merged commit a0d49d3 into fog:master Dec 21, 2012
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.

Rackspace Cloud Block Storage models have the potential to create unintended resources
3 participants