Skip to content

Cinder V3: Restore a volume from a backup#1871

Merged
jtopjian merged 6 commits intogophercloud:masterfrom
kayrus:volume-from-backup
Mar 4, 2020
Merged

Cinder V3: Restore a volume from a backup#1871
jtopjian merged 6 commits intogophercloud:masterfrom
kayrus:volume-from-backup

Conversation

@kayrus
Copy link
Copy Markdown
Contributor

@kayrus kayrus commented Mar 2, 2020

Resolves #1870

@kayrus kayrus changed the title Volume from backup Cinder V3: Restore a volume from a backup Mar 2, 2020
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 2, 2020

Coverage Status

Coverage increased (+0.01%) to 77.125% when pulling 12caeca on kayrus:volume-from-backup into cf66cbf on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 2, 2020

Build failed.

@kayrus
Copy link
Copy Markdown
Contributor Author

kayrus commented Mar 2, 2020

@jtopjian ready for review

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.

@kayrus Thanks! Two minor changes to make and one change modifying the main Volume struct - let me know if you have any questions.

Also, some general info for you and for others researching in the future: I'm kicking around the idea of squashing all of the "Ext" structs into the main resource structs.

This change recently began with microversions (#1854) in order to prevent lots of small microversion updates from becoming unmanageable, but I'm thinking about doing it for all types of extensions. This PR is notable because the amendments to the CreateOpts are both from an extension (backups) and a microversion, so we'll leave this as-is for now.

Historically, the "Ext" structs provided a large design value with Gophercloud: it allowed us to model the OpenStack API in a very composable and modular way, helping us make Gophercloud flexible and extendible. But after 4-5 years of working on Gophercloud, I'm almost confident that squashing all extensions into the main resource structs won't do any harm.

I'm not quite ready to make this change yet, but I'm considering it.

/cc @ozerovandrei

@kayrus kayrus force-pushed the volume-from-backup branch 4 times, most recently from 70e9bed to 3544f72 Compare March 3, 2020 08:00
@kayrus kayrus force-pushed the volume-from-backup branch from 3544f72 to 93ebdd7 Compare March 3, 2020 08:01
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 3, 2020

Build failed.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Mar 3, 2020

@kayrus Looks like there's a unit test failing with this.

@kayrus
Copy link
Copy Markdown
Contributor Author

kayrus commented Mar 3, 2020

@jtopjian do we really need to put a BackupID into a pointer in results?

@kayrus kayrus force-pushed the volume-from-backup branch from bf56427 to 06df141 Compare March 3, 2020 18:53
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 3, 2020

Build failed.

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.

@kayrus Thanks for continuing with this. Two minor changes and I think this should be good to go.

@kayrus kayrus force-pushed the volume-from-backup branch from c1e40e2 to 12caeca Compare March 4, 2020 05:59
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 4, 2020

Build failed.

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.

LGTM - thank you!

@jtopjian jtopjian merged commit 15c4d46 into gophercloud:master Mar 4, 2020
@kayrus kayrus deleted the volume-from-backup branch March 4, 2020 20:20
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.

Cinder V3: Create a volume directly from a backup

3 participants