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

Block storage: adding support of update snapshot api call #2081

Merged
merged 5 commits into from
Dec 21, 2020

Conversation

TenSt
Copy link
Contributor

@TenSt TenSt commented Dec 20, 2020

For #2066

  • code
  • unit tests
  • acceptance tests
  • documentation

Links to the line numbers/files in the OpenStack source code that support the code in this PR:

API:
https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=update-a-snapshot-detail#update-a-snapshot

Schema:
https://github.com/openstack/cinder/blob/482e6a3cc5cca697b54ee1d853a4eca6e6f3cfc7/cinder/api/schemas/snapshots.py#L45

It seems that v3 uses the same method as v2 under the hood:
https://github.com/openstack/cinder/blob/482e6a3cc5cca697b54ee1d853a4eca6e6f3cfc7/cinder/api/v3/snapshots.py#L26

Update api:
https://github.com/openstack/cinder/blob/482e6a3cc5cca697b54ee1d853a4eca6e6f3cfc7/cinder/api/v2/snapshots.py#L148

Additional information:
Acceptance tests were ran against live OpenStack API(Ussuri). Here are logs from its run:
AcceptanceTestsRun_logs.txt

@coveralls
Copy link

coveralls commented Dec 20, 2020

Coverage Status

Coverage increased (+0.002%) to 79.743% when pulling 0dc3cbf on TenSt:block-storage-update-snapshot into 7e3109d on gophercloud:master.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 20, 2020

Build failed.

Copy link
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.

@TenSt Thanks! This all looks really good - really nice work. Just one small nit with the acceptance test.

You can ignore the OpenLab error. The failure is coming from an unrelated test.

Please let me know if you have any questions.

acceptance/openstack/blockstorage/v3/snapshots_test.go Outdated Show resolved Hide resolved
@TenSt
Copy link
Contributor Author

TenSt commented Dec 21, 2020

@jtopjian Thanks! I've done the change you requested.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 21, 2020

Build failed.

@jtopjian
Copy link
Contributor

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Dec 21, 2020

Build succeeded.

Copy link
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.

LGTM - thanks!

@jtopjian jtopjian merged commit b9ecd5a into gophercloud:master Dec 21, 2020
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.

None yet

3 participants