-
Notifications
You must be signed in to change notification settings - Fork 2
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
[SA-25286] Use Non-Deprecated Status Endpoint #641
base: main
Are you sure you want to change the base?
Conversation
for _, f := range functions { | ||
switch f { | ||
case FunctionController: | ||
count := cts.Stats.GetControllerCount() + 1 | ||
cts.Stats.SetControllerCount(count) | ||
cts.UpgradedStats.SetControllerCount(count) | ||
case FunctionGateway: | ||
count := cts.Stats.GetGatewayCount() + 1 | ||
cts.Stats.SetGatewayCount(count) | ||
cts.UpgradedStats.SetGatewayCount(count) | ||
case FunctionLogServer: | ||
count := cts.Stats.GetLogServerCount() + 1 | ||
cts.Stats.SetLogServerCount(count) | ||
cts.UpgradedStats.SetLogServerCount(count) | ||
case FunctionLogForwarder: | ||
count := cts.Stats.GetLogForwarderCount() + 1 | ||
cts.Stats.SetLogForwarderCount(count) | ||
cts.UpgradedStats.SetLogForwarderCount(count) | ||
case FunctionPortal: | ||
count := cts.Stats.GetPortalCount() + 1 | ||
cts.Stats.SetPortalCount(count) | ||
cts.UpgradedStats.SetPortalCount(count) | ||
case FunctionConnector: | ||
count := cts.Stats.GetConnectorCount() + 1 | ||
cts.Stats.SetConnectorCount(count) | ||
cts.UpgradedStats.SetConnectorCount(count) | ||
} | ||
} |
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.
Is this part captured in another field like .Stats.Data
and .UpgradeStats.Data
?
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 believe so. I didn't see these fields in the new API spec.
c8, s8, _ := GenerateApplianceWithStats([]string{FunctionController}, "controller8", "", "6.2.0", "", statusHealthy, UpgradeStatusIdle, false, "default", "default") | ||
c8, s8, _ := GenerateApplianceWithStats([]string{FunctionController}, "controller8", "", "6.2.0", "", statusOffline, UpgradeStatusIdle, false, "default", "default") |
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.
Huh I guess the test was wrong lol.
Name: openapi.PtrString("controller"), | ||
Disk: openapi.PtrFloat32(90), | ||
Version: openapi.PtrString("5.5.4"), | ||
DiskInfo: &openapi.StatsAppliancesListAllOfDiskInfo{ | ||
Total: openapi.PtrFloat32(100000000000), | ||
Used: openapi.PtrFloat32(90000000000), | ||
Free: openapi.PtrFloat32(10000000000), | ||
Name: "controller", | ||
Disk: openapi.PtrFloat32(90), | ||
ApplianceVersion: openapi.PtrString("5.5.4"), | ||
Details: &openapi.ApplianceWithStatusAllOfDetails{ | ||
Disk: &openapi.SystemInfo{ | ||
Total: openapi.PtrInt64(int64(100000000000)), | ||
Used: openapi.PtrInt64(int64(90000000000)), | ||
Free: openapi.PtrInt64(int64(10000000000)), | ||
}, |
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 think this is the original issue in the API spec where you wanted int64 which led you to this journey of tasks. Thanks for taking this on! 👍
No description provided.