Skip to content

Commit cff4f1b

Browse files
authored
Update listApis with 4.21.0 APIs (#120)
* Update listApis with 4.21 APIs * add template_id to required params for backward compatability * Add support for GPU apis (#121) * Add support to Cni config, Nsx, Netris service management and add additional k8s APIs support (#123) * Add support for extension APIs (#124) * Add support for backup & recovery service (#122) * Add support for backup & recovery service * add additional apis to the vm service
1 parent ab2a5ff commit cff4f1b

File tree

72 files changed

+105785
-72725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+105785
-72725
lines changed

cloudstack/AccountService.go

Lines changed: 120 additions & 0 deletions
Large diffs are not rendered by default.

cloudstack/AddressService.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ type AssociateIpAddressResponse struct {
450450
Domainid string `json:"domainid"`
451451
Domainpath string `json:"domainpath"`
452452
Fordisplay bool `json:"fordisplay"`
453+
Forprovider bool `json:"forprovider"`
453454
Forsystemvms bool `json:"forsystemvms"`
454455
Forvirtualnetwork bool `json:"forvirtualnetwork"`
455456
Hasannotations bool `json:"hasannotations"`
@@ -619,6 +620,10 @@ func (p *ListPublicIpAddressesParams) toURLValues() url.Values {
619620
vv := strconv.FormatBool(v.(bool))
620621
u.Set("forloadbalancing", vv)
621622
}
623+
if v, found := p.p["forprovider"]; found {
624+
vv := strconv.FormatBool(v.(bool))
625+
u.Set("forprovider", vv)
626+
}
622627
if v, found := p.p["forsystemvms"]; found {
623628
vv := strconv.FormatBool(v.(bool))
624629
u.Set("forsystemvms", vv)
@@ -821,6 +826,27 @@ func (p *ListPublicIpAddressesParams) GetForloadbalancing() (bool, bool) {
821826
return value, ok
822827
}
823828

829+
func (p *ListPublicIpAddressesParams) SetForprovider(v bool) {
830+
if p.p == nil {
831+
p.p = make(map[string]interface{})
832+
}
833+
p.p["forprovider"] = v
834+
}
835+
836+
func (p *ListPublicIpAddressesParams) ResetForprovider() {
837+
if p.p != nil && p.p["forprovider"] != nil {
838+
delete(p.p, "forprovider")
839+
}
840+
}
841+
842+
func (p *ListPublicIpAddressesParams) GetForprovider() (bool, bool) {
843+
if p.p == nil {
844+
p.p = make(map[string]interface{})
845+
}
846+
value, ok := p.p["forprovider"].(bool)
847+
return value, ok
848+
}
849+
824850
func (p *ListPublicIpAddressesParams) SetForsystemvms(v bool) {
825851
if p.p == nil {
826852
p.p = make(map[string]interface{})
@@ -1311,6 +1337,7 @@ type PublicIpAddress struct {
13111337
Domainid string `json:"domainid"`
13121338
Domainpath string `json:"domainpath"`
13131339
Fordisplay bool `json:"fordisplay"`
1340+
Forprovider bool `json:"forprovider"`
13141341
Forsystemvms bool `json:"forsystemvms"`
13151342
Forvirtualnetwork bool `json:"forvirtualnetwork"`
13161343
Hasannotations bool `json:"hasannotations"`
@@ -1482,6 +1509,7 @@ type UpdateIpAddressResponse struct {
14821509
Domainid string `json:"domainid"`
14831510
Domainpath string `json:"domainpath"`
14841511
Fordisplay bool `json:"fordisplay"`
1512+
Forprovider bool `json:"forprovider"`
14851513
Forsystemvms bool `json:"forsystemvms"`
14861514
Forvirtualnetwork bool `json:"forvirtualnetwork"`
14871515
Hasannotations bool `json:"hasannotations"`
@@ -1870,6 +1898,7 @@ type ReserveIpAddressResponse struct {
18701898
Domainid string `json:"domainid"`
18711899
Domainpath string `json:"domainpath"`
18721900
Fordisplay bool `json:"fordisplay"`
1901+
Forprovider bool `json:"forprovider"`
18731902
Forsystemvms bool `json:"forsystemvms"`
18741903
Forvirtualnetwork bool `json:"forvirtualnetwork"`
18751904
Hasannotations bool `json:"hasannotations"`

cloudstack/AffinityGroupService.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,9 @@ type UpdateVMAffinityGroupResponse struct {
11561156
Domainid string `json:"domainid"`
11571157
Domainpath string `json:"domainpath"`
11581158
Forvirtualnetwork bool `json:"forvirtualnetwork"`
1159+
Gpucardid string `json:"gpucardid"`
1160+
Gpucardname string `json:"gpucardname"`
1161+
Gpucount int `json:"gpucount"`
11591162
Group string `json:"group"`
11601163
Groupid string `json:"groupid"`
11611164
Guestosid string `json:"guestosid"`
@@ -1177,6 +1180,12 @@ type UpdateVMAffinityGroupResponse struct {
11771180
Jobstatus int `json:"jobstatus"`
11781181
Keypairs string `json:"keypairs"`
11791182
Lastupdated string `json:"lastupdated"`
1183+
Leaseduration int `json:"leaseduration"`
1184+
Leaseexpiryaction string `json:"leaseexpiryaction"`
1185+
Leaseexpirydate string `json:"leaseexpirydate"`
1186+
Maxheads int64 `json:"maxheads"`
1187+
Maxresolutionx int64 `json:"maxresolutionx"`
1188+
Maxresolutiony int64 `json:"maxresolutiony"`
11801189
Memory int `json:"memory"`
11811190
Memoryintfreekbs int64 `json:"memoryintfreekbs"`
11821191
Memorykbs int64 `json:"memorykbs"`
@@ -1218,6 +1227,9 @@ type UpdateVMAffinityGroupResponse struct {
12181227
Userid string `json:"userid"`
12191228
Username string `json:"username"`
12201229
Vgpu string `json:"vgpu"`
1230+
Vgpuprofileid string `json:"vgpuprofileid"`
1231+
Vgpuprofilename string `json:"vgpuprofilename"`
1232+
Videoram int64 `json:"videoram"`
12211233
Vmtype string `json:"vmtype"`
12221234
Vnfdetails map[string]string `json:"vnfdetails"`
12231235
Vnfnics []string `json:"vnfnics"`

cloudstack/AsyncjobService.go

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -294,23 +294,24 @@ type ListAsyncJobsResponse struct {
294294
}
295295

296296
type AsyncJob struct {
297-
Account string `json:"account"`
298-
Accountid string `json:"accountid"`
299-
Cmd string `json:"cmd"`
300-
Completed string `json:"completed"`
301-
Created string `json:"created"`
302-
Domainid string `json:"domainid"`
303-
Domainpath string `json:"domainpath"`
304-
JobID string `json:"jobid"`
305-
Jobinstanceid string `json:"jobinstanceid"`
306-
Jobinstancetype string `json:"jobinstancetype"`
307-
Jobprocstatus int `json:"jobprocstatus"`
308-
Jobresult json.RawMessage `json:"jobresult"`
309-
Jobresultcode int `json:"jobresultcode"`
310-
Jobresulttype string `json:"jobresulttype"`
311-
Jobstatus int `json:"jobstatus"`
312-
Managementserverid UUID `json:"managementserverid"`
313-
Userid string `json:"userid"`
297+
Account string `json:"account"`
298+
Accountid string `json:"accountid"`
299+
Cmd string `json:"cmd"`
300+
Completed string `json:"completed"`
301+
Created string `json:"created"`
302+
Domainid string `json:"domainid"`
303+
Domainpath string `json:"domainpath"`
304+
JobID string `json:"jobid"`
305+
Jobinstanceid string `json:"jobinstanceid"`
306+
Jobinstancetype string `json:"jobinstancetype"`
307+
Jobprocstatus int `json:"jobprocstatus"`
308+
Jobresult json.RawMessage `json:"jobresult"`
309+
Jobresultcode int `json:"jobresultcode"`
310+
Jobresulttype string `json:"jobresulttype"`
311+
Jobstatus int `json:"jobstatus"`
312+
Managementserverid UUID `json:"managementserverid"`
313+
Managementservername string `json:"managementservername"`
314+
Userid string `json:"userid"`
314315
}
315316

316317
type QueryAsyncJobResultParams struct {
@@ -384,21 +385,22 @@ func (s *AsyncjobService) QueryAsyncJobResult(p *QueryAsyncJobResultParams) (*Qu
384385
}
385386

386387
type QueryAsyncJobResultResponse struct {
387-
Account string `json:"account"`
388-
Accountid string `json:"accountid"`
389-
Cmd string `json:"cmd"`
390-
Completed string `json:"completed"`
391-
Created string `json:"created"`
392-
Domainid string `json:"domainid"`
393-
Domainpath string `json:"domainpath"`
394-
JobID string `json:"jobid"`
395-
Jobinstanceid string `json:"jobinstanceid"`
396-
Jobinstancetype string `json:"jobinstancetype"`
397-
Jobprocstatus int `json:"jobprocstatus"`
398-
Jobresult json.RawMessage `json:"jobresult"`
399-
Jobresultcode int `json:"jobresultcode"`
400-
Jobresulttype string `json:"jobresulttype"`
401-
Jobstatus int `json:"jobstatus"`
402-
Managementserverid UUID `json:"managementserverid"`
403-
Userid string `json:"userid"`
388+
Account string `json:"account"`
389+
Accountid string `json:"accountid"`
390+
Cmd string `json:"cmd"`
391+
Completed string `json:"completed"`
392+
Created string `json:"created"`
393+
Domainid string `json:"domainid"`
394+
Domainpath string `json:"domainpath"`
395+
JobID string `json:"jobid"`
396+
Jobinstanceid string `json:"jobinstanceid"`
397+
Jobinstancetype string `json:"jobinstancetype"`
398+
Jobprocstatus int `json:"jobprocstatus"`
399+
Jobresult json.RawMessage `json:"jobresult"`
400+
Jobresultcode int `json:"jobresultcode"`
401+
Jobresulttype string `json:"jobresulttype"`
402+
Jobstatus int `json:"jobstatus"`
403+
Managementserverid UUID `json:"managementserverid"`
404+
Managementservername string `json:"managementservername"`
405+
Userid string `json:"userid"`
404406
}

cloudstack/AuthenticationService.go

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -169,24 +169,25 @@ func (s *AuthenticationService) Login(p *LoginParams) (*LoginResponse, error) {
169169
}
170170

171171
type LoginResponse struct {
172-
Account string `json:"account"`
173-
Domainid string `json:"domainid"`
174-
Firstname string `json:"firstname"`
175-
Is2faenabled string `json:"is2faenabled"`
176-
Is2faverified string `json:"is2faverified"`
177-
Issuerfor2fa string `json:"issuerfor2fa"`
178-
JobID string `json:"jobid"`
179-
Jobstatus int `json:"jobstatus"`
180-
Lastname string `json:"lastname"`
181-
Providerfor2fa string `json:"providerfor2fa"`
182-
Registered string `json:"registered"`
183-
Sessionkey string `json:"sessionkey"`
184-
Timeout int `json:"timeout"`
185-
Timezone string `json:"timezone"`
186-
Timezoneoffset string `json:"timezoneoffset"`
187-
Type string `json:"type"`
188-
Userid string `json:"userid"`
189-
Username string `json:"username"`
172+
Account string `json:"account"`
173+
Domainid string `json:"domainid"`
174+
Firstname string `json:"firstname"`
175+
Is2faenabled string `json:"is2faenabled"`
176+
Is2faverified string `json:"is2faverified"`
177+
Issuerfor2fa string `json:"issuerfor2fa"`
178+
JobID string `json:"jobid"`
179+
Jobstatus int `json:"jobstatus"`
180+
Lastname string `json:"lastname"`
181+
Managementserverid UUID `json:"managementserverid"`
182+
Providerfor2fa string `json:"providerfor2fa"`
183+
Registered string `json:"registered"`
184+
Sessionkey string `json:"sessionkey"`
185+
Timeout int `json:"timeout"`
186+
Timezone string `json:"timezone"`
187+
Timezoneoffset string `json:"timezoneoffset"`
188+
Type string `json:"type"`
189+
Userid string `json:"userid"`
190+
Username string `json:"username"`
190191
}
191192

192193
type LogoutParams struct {
@@ -389,22 +390,23 @@ func (s *AuthenticationService) Oauthlogin(p *OauthloginParams) (*OauthloginResp
389390
}
390391

391392
type OauthloginResponse struct {
392-
Account string `json:"account"`
393-
Domainid string `json:"domainid"`
394-
Firstname string `json:"firstname"`
395-
Is2faenabled string `json:"is2faenabled"`
396-
Is2faverified string `json:"is2faverified"`
397-
Issuerfor2fa string `json:"issuerfor2fa"`
398-
JobID string `json:"jobid"`
399-
Jobstatus int `json:"jobstatus"`
400-
Lastname string `json:"lastname"`
401-
Providerfor2fa string `json:"providerfor2fa"`
402-
Registered string `json:"registered"`
403-
Sessionkey string `json:"sessionkey"`
404-
Timeout int `json:"timeout"`
405-
Timezone string `json:"timezone"`
406-
Timezoneoffset string `json:"timezoneoffset"`
407-
Type string `json:"type"`
408-
Userid string `json:"userid"`
409-
Username string `json:"username"`
393+
Account string `json:"account"`
394+
Domainid string `json:"domainid"`
395+
Firstname string `json:"firstname"`
396+
Is2faenabled string `json:"is2faenabled"`
397+
Is2faverified string `json:"is2faverified"`
398+
Issuerfor2fa string `json:"issuerfor2fa"`
399+
JobID string `json:"jobid"`
400+
Jobstatus int `json:"jobstatus"`
401+
Lastname string `json:"lastname"`
402+
Managementserverid UUID `json:"managementserverid"`
403+
Providerfor2fa string `json:"providerfor2fa"`
404+
Registered string `json:"registered"`
405+
Sessionkey string `json:"sessionkey"`
406+
Timeout int `json:"timeout"`
407+
Timezone string `json:"timezone"`
408+
Timezoneoffset string `json:"timezoneoffset"`
409+
Type string `json:"type"`
410+
Userid string `json:"userid"`
411+
Username string `json:"username"`
410412
}

0 commit comments

Comments
 (0)