Add v3 and microversion support to cinder#413
Add v3 and microversion support to cinder#413j-griffith wants to merge 2 commits intogophercloud:masterfrom
Conversation
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.
507c740 to
18dc2ad
Compare
|
@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. |
|
Ahhh! My bad: Public items - 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.
|
Sounds good to me! |
18dc2ad to
5538286
Compare
|
Abort, Abort!!! |
…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
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>
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