Skip to content

Backups list detail #2083#2085

Merged
jtopjian merged 2 commits intogophercloud:masterfrom
rendaw:backups-list-detail
Jan 17, 2021
Merged

Backups list detail #2083#2085
jtopjian merged 2 commits intogophercloud:masterfrom
rendaw:backups-list-detail

Conversation

@rendaw
Copy link
Copy Markdown
Contributor

@rendaw rendaw commented Dec 31, 2020

For #2083

Here's the API docs:

https://docs.openstack.org/api-ref/block-storage/v3/?expanded=list-backups-with-detail-detail#list-backups-with-detail

Sorry, I'm not sure where to find this in the openstack source.

Also I modified the List tests to not include additional information like status - this is what I observed against OVH, and appears to match the docs here: https://docs.openstack.org/api-ref/block-storage/v3/?expanded=list-backups-for-project-detail#list-backups-for-project

@rendaw rendaw changed the title Backups list detail #2083 Draft: Backups list detail #2083 Dec 31, 2020
@rendaw rendaw changed the title Draft: Backups list detail #2083 Backups list detail #2083 Dec 31, 2020
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.006%) to 79.749% when pulling 1dc253c on rendaw:backups-list-detail into 810f391 on gophercloud:master.

@rendaw
Copy link
Copy Markdown
Contributor Author

rendaw commented Dec 31, 2020

Sorry, I haven't tested the code as a whole live, I was going to hook it into the project I'm on but go complains about the module name not matching...

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Dec 31, 2020

Build succeeded.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Jan 5, 2021

I don't have access to an OpenStack environment that supports volume backups to test this out.

Sorry, I haven't tested the code as a whole live, I was going to hook it into the project I'm on but go complains about the module name not matching...

You can run the acceptance test for this against your cloud by doing the following:

  1. Edit https://github.com/gophercloud/gophercloud/blob/master/acceptance/openstack/blockstorage/extensions/backups_test.go#L29 and change List to ListDetail.
  2. Source an openrc file
  3. Run:
$ cd gophercloud
$ go test -v -tags "fixtures acceptance" -run "TestBackupsCRUD" github.com/gophercloud/gophercloud/acceptance/openstack/blockstorage/extensions

Let me know if that works or if you run into any problems.

@rendaw
Copy link
Copy Markdown
Contributor Author

rendaw commented Jan 13, 2021

Hey, sorry for the delay! I tried the acceptance tests but the openrc I have for this provider (OVH) doesn't work with the standard env auth parser (we use clientconfig), and I was getting errors in lines that I had modified locally to try to get it to work; I wasn't confident that the acceptance test was running the up to date acceptance test code. Also I was hesitant to create and delete backups on the region 😅

I figured out replace though and tested just ListDetail, it works with no issues (returns all backups with full details).

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.

@rendaw LGTM - thank you for working on this and for testing it out.

@jtopjian jtopjian merged commit 9a8ce00 into gophercloud:master Jan 17, 2021
@jtopjian jtopjian mentioned this pull request Jan 17, 2021
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