Skip to content

Add DELETE support in V3 volume types#655

Merged
jtopjian merged 2 commits intogophercloud:masterfrom
TommyLike:feature/volume_type_delete
Dec 21, 2017
Merged

Add DELETE support in V3 volume types#655
jtopjian merged 2 commits intogophercloud:masterfrom
TommyLike:feature/volume_type_delete

Conversation

@TommyLike
Copy link
Copy Markdown
Contributor

@TommyLike TommyLike commented Dec 6, 2017

Add Delete support for volume type in volume V3.

For #649

Volume type delete V3

@TommyLike TommyLike force-pushed the feature/volume_type_delete branch from 5ab4889 to 83d60f6 Compare December 6, 2017 01:59
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 6, 2017

Coverage Status

Coverage decreased (-0.2%) to 72.593% when pulling 5ab4889 on TommyLike:feature/volume_type_delete into 955c2f5 on gophercloud:master.

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 6, 2017

Coverage Status

Coverage decreased (-0.05%) to 72.712% when pulling 83d60f6 on TommyLike:feature/volume_type_delete into 955c2f5 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Dec 6, 2017

@TommyLike TommyLike force-pushed the feature/volume_type_delete branch from 83d60f6 to ca7cc3d Compare December 6, 2017 03:54
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 6, 2017

Coverage Status

Coverage increased (+0.02%) to 72.777% when pulling ca7cc3d on TommyLike:feature/volume_type_delete into 955c2f5 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Dec 6, 2017

Add Create/Delete/List/Update/Get support for volume
type in volume V3.
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 20, 2017

Coverage Status

Coverage increased (+0.02%) to 72.824% when pulling d36378d on TommyLike:feature/volume_type_delete into 44f115b on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Dec 20, 2017

Copy link
Copy Markdown
Contributor

@dklyle dklyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor item. Otherwise, this looks good to me.

}

func TestVolumeTypesCreate(t *testing.T) {
func TestVolumeTypesCreateDestory(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit, but Destroy is misspelled, but to be consistent I would just change it to TestVolumeTypesCRUD.

Support volume type delete in V3
@TommyLike TommyLike force-pushed the feature/volume_type_delete branch from d36378d to 3798066 Compare December 21, 2017 00:42
@TommyLike
Copy link
Copy Markdown
Contributor Author

@dklyle done!

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 21, 2017

Coverage Status

Coverage increased (+0.02%) to 72.824% when pulling 3798066 on TommyLike:feature/volume_type_delete into a999540 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Dec 21, 2017

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TommyLike three small changes that can wait until the next PR.

This looks good to me, pending @dklyle's approval, too.

}
fmt.Println(volumeType)

Example to delete a Volume TYpe
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: TYpe should be Type, but this can be fixed in the next PR.

}

func TestVolumeTypesCreate(t *testing.T) {
func TestVolumeTypesCreateDestroy(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming you're going to do the Update test here, too, please change to TestVolumeTypesCRUD in the next PR.


Example to delete a Volume TYpe

typeID := "0fe36e73809d46aeae6705c39077b1b3"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is supposed to be a UUID such as ca33f1fa-3ff5-42d8-a8a8-4417ae2e9130

}
}

func TestVolumeTypesCreate(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Dec 21, 2017

@TommyLike Thanks for this. If you can patch up the doc nits in the Update PR, it would be appreciated.

Also, for posterity, the Cinder code for this is here:

https://github.com/openstack/cinder/blob/stable/pike/cinder/api/contrib/types_manage.py#L164

@TommyLike Please remember to link to the source code for all PRs.

@jtopjian
Copy link
Copy Markdown
Contributor

Also, @dklyle, thank you for reviewing.

@jtopjian jtopjian merged commit cf81d92 into gophercloud:master Dec 21, 2017
cardoe pushed a commit to cardoe/gophercloud that referenced this pull request Aug 27, 2020
…cloud#655)

* Add new data source 'openstack_compute_availability_zones_v2'

* Fix up TOC

* Add region to schema

* Fix up error messaging

* Simplify test

* Style fixes

* Fix up style issues

* Fix up another style issue

* Use Default in 'state' Schema

* Make region computed, set region when state is read

* Sort list of zones

* Use the hashcode library to create the state's ID from the list of zones

* Documentation updates
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.

4 participants