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
wants to merge 1 commit into
base: trunk
from

Conversation

Projects
None yet
3 participants
@allardhoeve
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

This comment has been minimized.

Show comment
Hide comment
@tonybaloney

tonybaloney Sep 17, 2016

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@allardhoeve

allardhoeve Sep 20, 2016

Contributor

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

Contributor

allardhoeve commented Sep 20, 2016

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

@allardhoeve

This comment has been minimized.

Show comment
Hide comment
@allardhoeve

allardhoeve Sep 20, 2016

Contributor

Thumbs up, anyone?

Contributor

allardhoeve commented Sep 20, 2016

Thumbs up, anyone?

@vdloo

This comment has been minimized.

Show comment
Hide comment
@vdloo

vdloo Sep 20, 2016

Member

lgtm

Member

vdloo commented Sep 20, 2016

lgtm

@tonybaloney

This comment has been minimized.

Show comment
Hide comment
@tonybaloney

tonybaloney Sep 21, 2016

Contributor

Changes look good. thanks @allardhoeve +1

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