Skip to content

blockstorage/v3: Add support for create/delete qos#2140

Merged
jtopjian merged 1 commit intogophercloud:masterfrom
nikParasyr:blockstorage_v3_qos
Apr 10, 2021
Merged

blockstorage/v3: Add support for create/delete qos#2140
jtopjian merged 1 commit intogophercloud:masterfrom
nikParasyr:blockstorage_v3_qos

Conversation

@nikParasyr
Copy link
Copy Markdown
Contributor

For #2139

Create:
Return code on doc is wrong, and parameters other than name are missing. Code showcases more how consumer and specs are used.
docs
code_schema code_api code

Delete:
docs
code_api code

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 4, 2021

Coverage Status

Coverage increased (+0.009%) to 79.867% when pulling 2ca6529 on nikParasyr:blockstorage_v3_qos into 5137346 on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Apr 4, 2021

Build succeeded.

@nikParasyr
Copy link
Copy Markdown
Contributor Author

@jtopjian this is ready from my side.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Apr 6, 2021

@nikParasyr Thanks!

This set of API calls is a bit strange. The schema only defines a single field called name and then allows any other arbitrary field to be specified. I'm sure this is because of the many variations of QoS parameters that are possible. However, in theory, foobar is also a valid field.

With that in mind, from reading the other Python code, I do agree with your assessment for using Name, Consumer, and Specs as fields. I also agree with how the Specs are modified to be inline with the top-level of the request body.

One optional change you can make is to define the different types of consumers as types, since there is only a finite set of acceptable values for consumer: https://github.com/openstack/cinder/blob/acfc148d7cec08362873115abb4551d2ba531d06/cinder/objects/fields.py#L139-L142

You can see an example of this here:

Note that this type would only be used in the functions in requests.go. For the resulting struct in results.go, the field would still be a string.

Again, this is optional, but encouraged as it helps model the data more accurately.

Please let me know if you have any questions.

@nikParasyr nikParasyr force-pushed the blockstorage_v3_qos branch from b57537f to 2ca6529 Compare April 7, 2021 13:12
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Apr 7, 2021

Build failed.

@nikParasyr
Copy link
Copy Markdown
Contributor Author

recheck

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Apr 7, 2021

Build failed.

@nikParasyr
Copy link
Copy Markdown
Contributor Author

recheck

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Apr 8, 2021

Build succeeded.

@nikParasyr
Copy link
Copy Markdown
Contributor Author

@jtopjian thanks for the help :) The changes are done. Let me know if anything is missing

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 - nice work. Thank you!

@jtopjian jtopjian merged commit 05a462d into gophercloud:master Apr 10, 2021
@nikParasyr nikParasyr deleted the blockstorage_v3_qos branch May 20, 2021 13:00
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