New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/dashboard_v2: Pool controller #20823
Conversation
Signed-off-by: Ricardo Dias <rdias@suse.com>
dashboard QA suite ran successfully: |
|
@sebastian-philipp could you be more specific? I don't know what missing information you are talking about, but the current information returned is enough for what dashboard is showing in the frontend, and addresses the requirements for the RBD management feature. |
|
I think it's fine to get this initial implementation ready for merging, so the basic infrastructure and code path is in place. Afterwards, let's look into adding the missing information that gets us in par with the functionality provided by openATTIC. |
I agree with @LenzGr. This PR provides the necessary information to implement the RBD form, Pool form will be done latter. |
Actually the information returned in this implementation also returns the Example of output for an erasure-code pool:
The purpose of this PR is not a replacement of the oA Pool view, but rather to add the infrastructure for dashboard future features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is working well when integrated with the RBD form that I'm working on.
|
||
@ApiController('pool') | ||
@AuthRequired() | ||
class PoolController(RESTController): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either s/PoolController/Pool/
or we should add the Controller
postfix to all controllers.
res['pool_name'] = pool['pool_name'] | ||
return res | ||
|
||
@classmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staticmethod
? You don't use cls
here.
Signed-off-by: Ricardo Dias <rdias@suse.com>
Signed-off-by: Ricardo Dias <rdias@suse.com>
3bf4e81
to
0dff6fb
Compare
@sebastian-philipp addressed your comments. |
mgr/dashboard_v2: Pool controller Reviewed-by: Ricardo Marques <rimarques@suse.com> Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com> (cherry picked from commit 8bd3434) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
This PR implements the pool controller that can be used to retrive OSD pools info.
Two endpoints are enabled by this controller:
/api/pool
and/api/pool/<pool_name>
The endpoints support two parameters:
attrs
: comma separated list of pool info attributes (to filter which attributes should be returned)stats
: boolean (to include pools stats in the response)Example:
Signed-off-by: Ricardo Dias rdias@suse.com