Add SetVolumeMetadata to cinder.Client #39

Merged
merged 1 commit into from Feb 6, 2017

Conversation

Projects
None yet
4 participants
Member

babbageclunk commented Feb 3, 2017

This allows updating the tags for a volume.

Will be used by Juju after a successful migration to update the owning controller for the volume.
Part of fixing https://bugs.launchpad.net/juju/+bug/1648063

Includes a drive-by to make some debug logging not be a warning.

axw approved these changes Feb 3, 2017

cinder/autogenerated_client.go
+ urlPath := url.URL{Path: fmt.Sprintf("volumes/%s/metadata", volumeId)}
+ url := client.endpoint.ResolveReference(&urlPath).String()
+ // Contrary to what the documentation says, using POST here means
+ // that we can updates of a single key. Using PUT will always
@axw

axw Feb 3, 2017

Member

s/updates of/update/ ?

@babbageclunk

babbageclunk Feb 6, 2017

Member

Fixed, thanks.

cinder/client.go
+
+// SetVolumeMetadata sets metadata on a server. Replaces metadata
+// items that match keys - doesn't modify items that aren't in the
+// request.
@axw

axw Feb 3, 2017

Member

"Returns the complete, updated metadata for the volume." ?

Add SetVolumeMetadata to cinder.Client
This allows updating the tags for a volume.

Will be used after a Juju migration to update controller.
Part of fixing https://bugs.launchpad.net/juju/+bug/1648063

Includes a driveby fix for unnecessary warning when a determining the
available API versions.
Member

babbageclunk commented Feb 6, 2017

$$merge$$

$$merge$$

Member

babbageclunk commented Feb 6, 2017

No dice, huh?

Member

babbageclunk commented Feb 6, 2017

$$merge$$

Member

jujubot commented Feb 6, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-goose

Member

babbageclunk commented Feb 6, 2017

Ok, now my membership is public.

$$merge$$

@jujubot jujubot merged commit 51ccf4f into go-goose:v1 Feb 6, 2017

@babbageclunk babbageclunk deleted the babbageclunk:set-volume-metadata branch Feb 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment