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

Fix autoincrement when creating a flavor if private flavors exist. #1894

Merged
merged 1 commit into from Jun 19, 2013
Merged

Fix autoincrement when creating a flavor if private flavors exist. #1894

merged 1 commit into from Jun 19, 2013

Conversation

tkadauke
Copy link
Contributor

Before, only public flavors were considered when finding the next free ID. That could lead to the case where the calculated ID was already taken which lead to a conflict. This happened whenever the user tried to create a private flavor via fog and then another (private OR public) flavor afterwards. Now, we also take private flavors into account, so the conflict cannot happen anymore.

As a side effect, it is now also possible to just return all private flavors, using the :is_public => false filter on the list_flavors_detail API call or the flavors collection.

Before, only public flavors were considered when finding the next free ID. That could lead to the case where the calculated ID was already taken which lead to a conflict. This happened whenever the user tried to create a private flavor via fog and then another (private OR public) flavor afterwards. Now, we also take private flavors into account, so the conflict cannot happen anymore.

As a side effect, it is now also possible to just return all private flavors, using the :is_public => false filter on the list_flavors_detail API call or the flavors collection.
@geemus
Copy link
Member

geemus commented Jun 18, 2013

@dprince @rubiojr - could you guys review? Thanks!

@dprince
Copy link
Member

dprince commented Jun 19, 2013

This looks good to me. Thanks.

dprince added a commit that referenced this pull request Jun 19, 2013
Fix autoincrement when creating a flavor if private flavors exist.
@dprince dprince merged commit ac2d666 into fog:master Jun 19, 2013
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.

None yet

3 participants