-
Notifications
You must be signed in to change notification settings - Fork 4
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
Liquid nova report capacity #628
base: master
Are you sure you want to change the base?
Conversation
return fmt.Errorf("while serializing Subcapacity Attributes: %w", err) | ||
} | ||
b.Subcapacities = append(b.Subcapacities, liquid.Subcapacity{ | ||
// TODO: What should be the naming here? We list subcapacities for cores, ram and instances on the same split flavor capacity |
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.
I don't like there being multiple subcapacities for different aspects of the same thing. Let's have this as a single subcapacity with Capacity: 0,
and all the actual data in attributes shaped like the old subcapacities.
internal/liquids/nova/usage.go
Outdated
|
||
for _, subres := range allSubresources { | ||
var attrs SubresourceAttributes | ||
if err = json.Unmarshal(subres.Attributes, &attrs); err != nil { // TODO: Unmarshalling here + marshalling when building the subresources seems inefficient |
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.
Consider passing the subresources as type liquid.SubresourceBuilder[A]
instead.
Checklist: