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

[SA-25286] Use Non-Deprecated Status Endpoint #641

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

Conversation

ravenc-appgate
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Mar 11, 2025
Comment on lines -127 to -154
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)
}
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Comment on lines -608 to +612
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")
Copy link
Contributor

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.

Comment on lines -62 to +70
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)),
},
Copy link
Contributor

@mandopaloooza mandopaloooza Mar 11, 2025

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! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Development

Successfully merging this pull request may close these issues.

2 participants