-
Notifications
You must be signed in to change notification settings - Fork 31
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
update listApis.json, Quota API, and fixed double url value handling #90
base: main
Are you sure you want to change the base?
Conversation
Requesting a review to check any mistakes/issues in implementation. @vishesh92 @mlsorensen |
I noticed that the listApis.json was missing the api functions. |
quotaUpdate that was generated has additional response fields in the struct when the documentation states it should only show "updated_on". type QuotaUpdateResponse struct {
JobID string `json:"jobid"`
Jobstatus int `json:"jobstatus"`
Updated_on string `json:"updated_on"`
} However the new listApis.json from cloudmonkey cli seems to show more fields than the documentation. So documentation might be a bit stale. {
"description": "Update quota calculations, alerts and statements",
"isasync": false,
"name": "quotaUpdate",
"params": [],
"related": "",
"response": [
{},
{},
{
"description": "the current status of the latest async job acting on this object",
"name": "jobstatus",
"type": "integer"
},
{
"description": "timestamp when the run got over",
"name": "updated_on",
"type": "date"
},
{
"description": "the UUID of the latest async job acting on this object",
"name": "jobid",
"type": "string"
}
],
"since": "4.7.0"
}, |
|
seems to be an issue with generator.go on double types |
Fixed the double/float type generation.
|
As of cloudstack 14.19.0.2 it seems like the quotaBalance response object does not match listApis.json from cmk-cli. Is the object I am receiving from cloudstack api. {
"quotabalanceresponse": {
"balance": {
"startquota": 0,
"credits": [],
"startdate": "2024-07-27T11:32:15-0500",
"currency": "$"
}
}
} Is the generated type. type QuotaBalanceResponse struct {
QuotaBalance []*QuotaBalance `json:"balance"`
}
type QuotaBalance struct {
Account string `json:"account"`
Accountid int64 `json:"accountid"`
Domain int64 `json:"domain"`
JobID string `json:"jobid"`
Jobstatus int `json:"jobstatus"`
Name string `json:"name"`
Quota float64 `json:"quota"`
Type int `json:"type"`
Unit string `json:"unit"`
} There seems to be no correlation between these types? |
Implemented response type overrides for quotaBalance and quotaStatement that should work. |
https://cloudstack.apache.org/api/apidocs-4.19/
Quota api implementation