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

DOBS translate underscores #582

Merged

Conversation

codenrhoden
Copy link
Contributor

New config option, dobs.convertUnderscores, enables the DOBS driver to
replace any underscores with dashes during volume creation. When a
VolumeInspectByName request comes in, that name is also converted, and
the volume that was created with the dashes is returned.

It is important to note that the returned data from the driver is always
correct -- the name is never displayed as having underscores instead of
dashes, because no such volume exists.

Fixes #450

This is functionally equivalent to #580, so look there for even more info. This PR also has a dependent PR that has to go in first, and that is #581. Once that is in, this can be rebased to remove the 2nd commit.

This patch add the VolumeInspectByName function to the dobs driver,
allowing a caller to more efficiently retrieve a single volume when
doing a lookup by name instead of by ID.

When looking up a volume by name instead of ID, the DO API requires a
region, so the way a region was looked up was changed to have
commonality between VolumeCreate() and VolumeInspectByName().
VolumeCreate() retains the additional capability to read a region from
the AvailabilityZone create option.

The order of precedence for region is:
1. az op (create only)
2. IID header field
3. driver config
New config option, dobs.convertUnderscores, enables the DOBS driver to
replace any underscores with dashes during volume creation. When a
VolumeInspectByName request comes in, that name is also converted, and
the volume that was created with the dashes is returned.

It is important to note that the returned data from the driver is always
correct -- the name is never displayed as having underscores instead of
dashes, because no such volume exists.
@codecov-io
Copy link

codecov-io commented Jun 22, 2017

Codecov Report

Merging #582 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #582   +/-   ##
=======================================
  Coverage   28.42%   28.42%           
=======================================
  Files          34       34           
  Lines        2016     2016           
=======================================
  Hits          573      573           
  Misses       1381     1381           
  Partials       62       62

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb8a4bc...93f388e. Read the comment docs.

@akutz akutz merged commit 6939c3b into thecodeteam:master Jun 26, 2017
@codenrhoden codenrhoden deleted the enhancement/dobs_translate_underscores branch June 26, 2017 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants