Skip to content
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

feat(service): add a consolidated get of memory resource block statuses #51

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

scott-howe-1
Copy link
Collaborator

@scott-howe-1 scott-howe-1 commented Nov 8, 2024

This changes gives the frontend client the ability to update the composition status of all blade memory resources blocks in a single call (BladesGetResourceStatus())

Statuses are returned as a collection:

type BladesMemoryResourceStatusCollection struct {
	StatusCount int32 `json:"statusCount"`
	ResourceStatuses []BladesResourceStatus `json:"resourceStatuses"`
}

with an array of statuses, with each element looking like:

type BladesResourceStatus struct {
	Uri string `json:"uri"`
	Id string `json:"id"`
	CompositionStatus MemoryResourceBlockCompositionStatus `json:"compositionStatus"`
}

and

type MemoryResourceBlockCompositionStatus struct {
	CompositionState string `json:"compositionState"`
	MaxCompositions int32 `json:"maxCompositions,omitempty"`
	NumberOfCompositions int32 `json:"numberOfCompositions,omitempty"`
}

This "status" struct can be expanded to include more information in the future. Currently, though, it's just reporting composition state information.
Curl output example:

image

When the blade is running legacy BMC code that does NOT provide a consolidated resource block status response, an empty collection is returned. This will indicate to the client that they need to retrieve the status information one blade at a time via the BladesGetResourceById api.
This behavior is for backward compatibility and is not the intended behavior going forward.

image

Additional frontend API's were also added for being able to report similar status information for blade-memory, blade-ports and blades. These have been left Not Implemented for now.

Currently, this just consists of the resource block composition state, but can be expanded.
Also, added a frontend framework for future consolidated status reporting for blade-memory, blade-ports and blades (a combo of all resource, port and memory statuses).
@scott-howe-1 scott-howe-1 marked this pull request as draft November 8, 2024 23:09
@scott-howe-1 scott-howe-1 marked this pull request as ready for review November 11, 2024 18:22
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.

1 participant