Skip to content

Add v3 and microversion support to cinder#413

Closed
j-griffith wants to merge 2 commits intogophercloud:masterfrom
j-griffith:add_v3_and_microversion_support_to_cinder
Closed

Add v3 and microversion support to cinder#413
j-griffith wants to merge 2 commits intogophercloud:masterfrom
j-griffith:add_v3_and_microversion_support_to_cinder

Conversation

@j-griffith
Copy link
Copy Markdown

This change pulls the existing V2 implementations into V3. Note that
the base V3 version (3.0) is a direct map back to V2. As a result to
use the base V3 endpoint for Cinder we can don't need to change anything
other than the URL. Also clean up some simple lint errors in
requests.go

One thing that the base V3 version does buy us here though is
Microversions (for better or worse). So, this change also adds in the
ability to specify MicroVersion in the additional-header of the
ServiceClient. This will be important going forward and so we can now
add things like the new standalone Attachment API.

For #412

Volume V3 just points to V2 unless a microversioned call is issued:
https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L25
https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L50

An example of a micro versioned call (not implemented in gophercloud):
https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L212

Even the base V3 view builder just utilizes V2 (only adding additional
info for specific versions):
https://github.com/openstack/cinder/blob/master/cinder/api/v3/views/volumes.py#L19
https://github.com/openstack/cinder/blob/master/cinder/api/v3/views/snapshots.py#L19

This just creates base V3 support for Cinder.  For all intents V3.0
of Cinder is in fact V2, so we don't need to do much with the existing
volumes or snapshots right now.  We do want to add microversion support
though so we can get shiny new things like the Attachments API.
@j-griffith j-griffith force-pushed the add_v3_and_microversion_support_to_cinder branch from 507c740 to 18dc2ad Compare July 15, 2017 16:26
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 15, 2017

Coverage Status

Coverage decreased (-0.09%) to 70.943% when pulling 18dc2ad on j-griffith:add_v3_and_microversion_support_to_cinder into 062f273 on gophercloud:master.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Jul 15, 2017

@j-griffith Thanks!

These two commits look kind of weird. The second commit seems to only be removing files and adding some comments -- nothing about adding microversion support. No doubt the commits themselves are valid, but from a historical log perspective, it might not make sense.

Since v3 is pretty much a copy of v2, I think we can do a mass commit of it. Would you be able do add some github inline comments on the changes between the two? I can also diff the files manually, but having the changes explicitly pointed out will help.

Also, with regard to your comments about the public methods: yes, all of those methods need to be public. They're not used by the user, but they're used by code in other packages.

Let me know if you have any questions.

@j-griffith
Copy link
Copy Markdown
Author

Ahhh! My bad:
Funky commits -
Yeah, this is part of a larger set that added attachments, I pulled that out but should've removed the dependency so it doesn't look so screwy.

Public items -
Noted, I'll remove those comments, thanks!

I think in the interest of being "clean" on this I'll just submit a new PR for this and "rewrite" my git history a bit that way.

This change pulls the existing V2 implementations into V3.  Note that
the base V3 version (3.0) is a direct map back to V2.  As a result to
use the base V3 endpoint for Cinder we can don't need to change anything
other than the URL.  Also clean up some simple lint errors in
requests.go

One thing that the base V3 version does buy us here though is
Microversions (for better or worse).  So, this change also adds in the
ability to specify MicroVersion in the additional-header of the
ServiceClient.  This will be important going forward and so we can now
add things like the new standalone Attachment API.

Volume V3 just points to V2 unless a microversioned call is issued:
    https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L25
    https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L50

An example of a micro versioned call (not implemented in gophercloud):
    https://github.com/openstack/cinder/blob/master/cinder/api/v3/volumes.py#L212

Even the base V3 view builder just utilizes V2 (only adding additional
info for specific versions):
    https://github.com/openstack/cinder/blob/master/cinder/api/v3/views/volumes.py#L19
    https://github.com/openstack/cinder/blob/master/cinder/api/v3/views/snapshots.py#L19

Note that this change is part of a series that will add Attachment
support.
@jtopjian
Copy link
Copy Markdown
Contributor

Sounds good to me!

@j-griffith j-griffith force-pushed the add_v3_and_microversion_support_to_cinder branch from 18dc2ad to 5538286 Compare July 15, 2017 16:52
@j-griffith
Copy link
Copy Markdown
Author

Abort, Abort!!!

@j-griffith j-griffith closed this Jul 15, 2017
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 15, 2017

Coverage Status

Coverage decreased (-0.09%) to 70.943% when pulling 5538286 on j-griffith:add_v3_and_microversion_support_to_cinder into 062f273 on gophercloud:master.

cardoe pushed a commit to cardoe/gophercloud that referenced this pull request Aug 27, 2020
…cloud#413)

* Add connection retries to openstack API

* fixed spelling

* enhanced code readability

* make MaxRetries a configuration parameter

* MaxRetries: changed unsuported uints to ints

* update logging messages
msheikh-wind pushed a commit to msheikh-wind/gophercloud that referenced this pull request May 19, 2025
The Storage.Filesystem synchronization is failing for AIO-DX because
the 'ceph' host filesystem is created during the first unlock of the
controllers. The host profile must not have the 'ceph' filesystem, but
the current config will have it after the unlock, because the sysinv
will create that automatically to support the 3 Ceph monitors.

This fix will ignore the 'ceph' filesystem synchronization when this
is an AIO-DX deployment.

Test-Plan
  PASS: Deploy an AIO-DX and check both controllers are InSync and
        Reconciled
  PASS: Deploy a Standard and check all the hosts are InSync and
        Reconciled

Signed-off-by: Felipe Sanches Zanoni <Felipe.SanchesZanoni@windriver.com>
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