Add support for shared-file-system /v2/services and /v2/scheduler-stats/pools#2350
Conversation
/v2/services and /v2/scheduler-stats/pools
1959017 to
0508ebb
Compare
|
Build failed.
|
|
I tried to find the log for the failing test but I couldn't. Where can I find out why the test is failing? |
|
I can see Also Both of these look unrelated to the changes in this branch. @EmilienM Can you trigger a re-run, please? |
|
@majewsky Github actions look fine to me, those are the actual jobs we care now. I'll look at the PR asap. |
|
I just realized we don't have acceptance coverage for this one, @majewsky any plans for doing it? |
|
We are currently upstreaming custom code in limes. I have tested the endpoints within limes against our staging openstack installation. For acceptance testing I would probably need to setup my own openstack cluster for testing inside a VM which would probably take a few days. I don't think I could run the tests against our staging installation as it could interfere with other people using it. |
Right now sharedfilesystems is not tested by our Github actions, I'll work on that soon. But if you have access to any OpenStack cloud with Manila you should be able to run acceptance test against it, and write new tests for this PR. If it's not possible, I'll have to check with other maintainers, but we usually have a policy of documented & tested code before it merges into master. |
|
I have pushed a commit which adds basic tests for the new things I have added in this PR. Locally I had to use an admin account to run them successful. I didn't look into how the tests are run and with what permissions but lets see what the CI run says. |
|
Build failed.
|
|
@SuperSandro2000 sorry for the lag, I finally pushed a PR to enable Manila in our CI: #2361 |
|
please rebase to trigger new ci jobs |
6cbe116 to
519e501
Compare
|
Build failed.
|
mandre
left a comment
There was a problem hiding this comment.
Hi @SuperSandro2000, thanks for the PR. It's quite a big one, and it would probably be easier in the future to split your work per API calls, so that we can merge them independently when they're ready. This looks mostly OK, I left a few comments, just one thing that surprised me was that you only implemented a subset of the supported fields, is that on purpose? I think you've already made 90% of the work and implementing the missing fields shouldn't be that much effort.
I only added the fields I needed but I can also add the other fields if you want. |
519e501 to
723ebe5
Compare
|
Build failed.
|
acceptance/openstack/sharedfilesystems/v2/schedulerstats_test.go
Outdated
Show resolved
Hide resolved
723ebe5 to
5721ba0
Compare
|
Build failed.
|
|
I am a bit clueless why the CI is failing now. Could someone assist? |
mandre
left a comment
There was a problem hiding this comment.
I am a bit clueless why the CI is failing now. Could someone assist?
You had the wrong type for several fields and that caused serialization to fail.
| // The host name for the back end. | ||
| Host string `json:"host"` | ||
| // The back end capabilities which include qos, total_capacity_gb, etc. | ||
| Capabilities Capabilities `json:"capabilities"` |
There was a problem hiding this comment.
The capabilities are only returned when querying for the pool details. I believe we should have a separate PoolDetails struct.
There was a problem hiding this comment.
Other details endpoint don't do it like this and only have one result. I am also not sure how that would even be done because it is always the generic paginator object returned.
…ls}` api endpoints
7a13241 to
7d0cb7d
Compare
7d0cb7d to
43edb96
Compare
|
@mandre I finally got around fixing your comments and the tests. |
mandre
left a comment
There was a problem hiding this comment.
Thanks @SuperSandro2000 for making the requested changes. This looks good and CI is happy. LGTM.
Fixes #2349
Links to the line numbers/files in the OpenStack source code that support the
code in this PR:
https://docs.openstack.org/api-ref/shared-file-system/?expanded=#list-back-end-storage-pools
https://docs.openstack.org/api-ref/shared-file-system/?expanded=#list-services