This fixes an issue where acorn offerings computeclasses and kubectl get clustercomputeclasses would fail with the following error:
✗ ERROR: template: :1:39: executing "" at <memoryToRange .Memory>: error calling memoryToRange: object passed is not a ComputeClassMemory struct
This was due to a recent change where the Memory struct on apiv1.ComputeClass and adminv1.ClusterComputeClass are now different. The fix is to check for both types and process them accordingly when converting values into a table.
Checklist
[X] The title of this PR would make a good line in Acorn's Release Note's Changelog
[X] The title of this PR ends with a link to the main issue being address in parentheses, like: This is a title (#1216). Here's an example
[X] All relevant issues are referenced in the PR description. NOTE: don't use GitHub keywords that auto-close issues
This fixes an issue where
acorn offerings computeclasses
andkubectl get clustercomputeclasses
would fail with the following error:This was due to a recent change where the
Memory
struct onapiv1.ComputeClass
andadminv1.ClusterComputeClass
are now different. The fix is to check for both types and process them accordingly when converting values into a table.Checklist
This is a title (#1216)
. Here's an example