Skip to content

Create volume is more robust on newer OpenStacks#857

Closed
allardhoeve wants to merge 1 commit into
apache:trunkfrom
ByteInternet:create_volume_is_more_robust
Closed

Create volume is more robust on newer OpenStacks#857
allardhoeve wants to merge 1 commit into
apache:trunkfrom
ByteInternet:create_volume_is_more_robust

Conversation

@allardhoeve

@allardhoeve allardhoeve commented Sep 16, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@allardhoeve allardhoeve force-pushed the create_volume_is_more_robust branch from 42d069e to db95261 Compare September 20, 2016 08:47
@allardhoeve

Copy link
Copy Markdown
Contributor Author

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

@allardhoeve allardhoeve force-pushed the create_volume_is_more_robust branch from db95261 to 6edf269 Compare September 20, 2016 09:59
@allardhoeve

Copy link
Copy Markdown
Contributor Author

Thumbs up, anyone?

@vdloo

vdloo commented Sep 20, 2016

Copy link
Copy Markdown
Member

lgtm

@tonybaloney

Copy link
Copy Markdown
Contributor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants