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

Create volume is more robust on newer OpenStacks #857

Closed

Conversation

@allardhoeve
Copy link
Contributor

allardhoeve commented Sep 16, 2016

Make create_volume more robust on newer OpenStacks

Description

On newer OpenStacks, things will fail if you do not provide location or if you do not provide ex_volume_type. The driver will pass the default None values to self.driver.request, which serializes them to null, which is an invalid value for /os-volumes/ on newer incarnations of OpenStack.

This PR makes it so the OpenStack driver does not include these fields if they are None, so they are not refused by OpenStack's validation.

Status

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)
@tonybaloney
Copy link
Contributor

tonybaloney commented Sep 17, 2016

sorry assertNotIn was only added in py2.7, you'll have to use assertFalse(x in y) instead.

@allardhoeve allardhoeve force-pushed the ByteInternet:create_volume_is_more_robust branch from 42d069e to db95261 Sep 20, 2016
@allardhoeve
Copy link
Contributor Author

allardhoeve commented Sep 20, 2016

Yeah, forgot about that ancient version ;) Changed it.

@allardhoeve allardhoeve force-pushed the ByteInternet:create_volume_is_more_robust branch from db95261 to 6edf269 Sep 20, 2016
@allardhoeve
Copy link
Contributor Author

allardhoeve commented Sep 20, 2016

Thumbs up, anyone?

@vdloo
Copy link
Member

vdloo commented Sep 20, 2016

lgtm

@tonybaloney
Copy link
Contributor

tonybaloney commented Sep 21, 2016

Changes look good. thanks @allardhoeve +1

@asfgit asfgit closed this in a266e55 Sep 21, 2016
asfgit pushed a commit that referenced this pull request Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.