Skip to content

Commit 75d368f

Browse files
authored
Merge pull request #93 from apache/sdk-4.20
Update SDK with 4.20 APIs
2 parents b9fa85f + d4d7f16 commit 75d368f

Some content is hidden

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

50 files changed

+107919
-90364
lines changed

cloudstack/AccountService.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ type CreateAccountResponse struct {
485485
Snapshotlimit string `json:"snapshotlimit"`
486486
Snapshottotal int64 `json:"snapshottotal"`
487487
State string `json:"state"`
488+
Taggedresources []string `json:"taggedresources"`
488489
Templateavailable string `json:"templateavailable"`
489490
Templatelimit string `json:"templatelimit"`
490491
Templatetotal int64 `json:"templatetotal"`
@@ -811,6 +812,7 @@ type DisableAccountResponse struct {
811812
Snapshotlimit string `json:"snapshotlimit"`
812813
Snapshottotal int64 `json:"snapshottotal"`
813814
State string `json:"state"`
815+
Taggedresources []string `json:"taggedresources"`
814816
Templateavailable string `json:"templateavailable"`
815817
Templatelimit string `json:"templatelimit"`
816818
Templatetotal int64 `json:"templatetotal"`
@@ -1009,6 +1011,7 @@ type EnableAccountResponse struct {
10091011
Snapshotlimit string `json:"snapshotlimit"`
10101012
Snapshottotal int64 `json:"snapshottotal"`
10111013
State string `json:"state"`
1014+
Taggedresources []string `json:"taggedresources"`
10121015
Templateavailable string `json:"templateavailable"`
10131016
Templatelimit string `json:"templatelimit"`
10141017
Templatetotal int64 `json:"templatetotal"`
@@ -1200,6 +1203,9 @@ func (p *ListAccountsParams) toURLValues() url.Values {
12001203
if v, found := p.p["state"]; found {
12011204
u.Set("state", v.(string))
12021205
}
1206+
if v, found := p.p["tag"]; found {
1207+
u.Set("tag", v.(string))
1208+
}
12031209
return u
12041210
}
12051211

@@ -1476,6 +1482,27 @@ func (p *ListAccountsParams) GetState() (string, bool) {
14761482
return value, ok
14771483
}
14781484

1485+
func (p *ListAccountsParams) SetTag(v string) {
1486+
if p.p == nil {
1487+
p.p = make(map[string]interface{})
1488+
}
1489+
p.p["tag"] = v
1490+
}
1491+
1492+
func (p *ListAccountsParams) ResetTag() {
1493+
if p.p != nil && p.p["tag"] != nil {
1494+
delete(p.p, "tag")
1495+
}
1496+
}
1497+
1498+
func (p *ListAccountsParams) GetTag() (string, bool) {
1499+
if p.p == nil {
1500+
p.p = make(map[string]interface{})
1501+
}
1502+
value, ok := p.p["tag"].(string)
1503+
return value, ok
1504+
}
1505+
14791506
// You should always use this function to get a new ListAccountsParams instance,
14801507
// as then you are sure you have configured all required params
14811508
func (s *AccountService) NewListAccountsParams() *ListAccountsParams {
@@ -1634,6 +1661,7 @@ type Account struct {
16341661
Snapshotlimit string `json:"snapshotlimit"`
16351662
Snapshottotal int64 `json:"snapshottotal"`
16361663
State string `json:"state"`
1664+
Taggedresources []string `json:"taggedresources"`
16371665
Templateavailable string `json:"templateavailable"`
16381666
Templatelimit string `json:"templatelimit"`
16391667
Templatetotal int64 `json:"templatetotal"`
@@ -1984,6 +2012,7 @@ type ProjectAccount struct {
19842012
Snapshotlimit string `json:"snapshotlimit"`
19852013
Snapshottotal int64 `json:"snapshottotal"`
19862014
State string `json:"state"`
2015+
Taggedresources []string `json:"taggedresources"`
19872016
Tags []Tags `json:"tags"`
19882017
Templateavailable string `json:"templateavailable"`
19892018
Templatelimit string `json:"templatelimit"`
@@ -2006,6 +2035,7 @@ type Tags struct {
20062035
Customer string `json:"customer"`
20072036
Domain string `json:"domain"`
20082037
Domainid string `json:"domainid"`
2038+
Domainpath string `json:"domainpath"`
20092039
Key string `json:"key"`
20102040
Project string `json:"project"`
20112041
Projectid string `json:"projectid"`
@@ -2146,6 +2176,7 @@ type LockAccountResponse struct {
21462176
Snapshotlimit string `json:"snapshotlimit"`
21472177
Snapshottotal int64 `json:"snapshottotal"`
21482178
State string `json:"state"`
2179+
Taggedresources []string `json:"taggedresources"`
21492180
Templateavailable string `json:"templateavailable"`
21502181
Templatelimit string `json:"templatelimit"`
21512182
Templatetotal int64 `json:"templatetotal"`
@@ -2367,6 +2398,7 @@ type MarkDefaultZoneForAccountResponse struct {
23672398
Snapshotlimit string `json:"snapshotlimit"`
23682399
Snapshottotal int64 `json:"snapshottotal"`
23692400
State string `json:"state"`
2401+
Taggedresources []string `json:"taggedresources"`
23702402
Templateavailable string `json:"templateavailable"`
23712403
Templatelimit string `json:"templatelimit"`
23722404
Templatetotal int64 `json:"templatetotal"`
@@ -2664,6 +2696,7 @@ type UpdateAccountResponse struct {
26642696
Snapshotlimit string `json:"snapshotlimit"`
26652697
Snapshottotal int64 `json:"snapshottotal"`
26662698
State string `json:"state"`
2699+
Taggedresources []string `json:"taggedresources"`
26672700
Templateavailable string `json:"templateavailable"`
26682701
Templatelimit string `json:"templatelimit"`
26692702
Templatetotal int64 `json:"templatetotal"`

cloudstack/AddressService.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ type AssociateIpAddressResponse struct {
346346
Associatednetworkname string `json:"associatednetworkname"`
347347
Domain string `json:"domain"`
348348
Domainid string `json:"domainid"`
349+
Domainpath string `json:"domainpath"`
349350
Fordisplay bool `json:"fordisplay"`
351+
Forsystemvms bool `json:"forsystemvms"`
350352
Forvirtualnetwork bool `json:"forvirtualnetwork"`
351353
Hasannotations bool `json:"hasannotations"`
352354
Hasrules bool `json:"hasrules"`
@@ -515,6 +517,10 @@ func (p *ListPublicIpAddressesParams) toURLValues() url.Values {
515517
vv := strconv.FormatBool(v.(bool))
516518
u.Set("forloadbalancing", vv)
517519
}
520+
if v, found := p.p["forsystemvms"]; found {
521+
vv := strconv.FormatBool(v.(bool))
522+
u.Set("forsystemvms", vv)
523+
}
518524
if v, found := p.p["forvirtualnetwork"]; found {
519525
vv := strconv.FormatBool(v.(bool))
520526
u.Set("forvirtualnetwork", vv)
@@ -713,6 +719,27 @@ func (p *ListPublicIpAddressesParams) GetForloadbalancing() (bool, bool) {
713719
return value, ok
714720
}
715721

722+
func (p *ListPublicIpAddressesParams) SetForsystemvms(v bool) {
723+
if p.p == nil {
724+
p.p = make(map[string]interface{})
725+
}
726+
p.p["forsystemvms"] = v
727+
}
728+
729+
func (p *ListPublicIpAddressesParams) ResetForsystemvms() {
730+
if p.p != nil && p.p["forsystemvms"] != nil {
731+
delete(p.p, "forsystemvms")
732+
}
733+
}
734+
735+
func (p *ListPublicIpAddressesParams) GetForsystemvms() (bool, bool) {
736+
if p.p == nil {
737+
p.p = make(map[string]interface{})
738+
}
739+
value, ok := p.p["forsystemvms"].(bool)
740+
return value, ok
741+
}
742+
716743
func (p *ListPublicIpAddressesParams) SetForvirtualnetwork(v bool) {
717744
if p.p == nil {
718745
p.p = make(map[string]interface{})
@@ -1180,7 +1207,9 @@ type PublicIpAddress struct {
11801207
Associatednetworkname string `json:"associatednetworkname"`
11811208
Domain string `json:"domain"`
11821209
Domainid string `json:"domainid"`
1210+
Domainpath string `json:"domainpath"`
11831211
Fordisplay bool `json:"fordisplay"`
1212+
Forsystemvms bool `json:"forsystemvms"`
11841213
Forvirtualnetwork bool `json:"forvirtualnetwork"`
11851214
Hasannotations bool `json:"hasannotations"`
11861215
Hasrules bool `json:"hasrules"`
@@ -1349,7 +1378,9 @@ type UpdateIpAddressResponse struct {
13491378
Associatednetworkname string `json:"associatednetworkname"`
13501379
Domain string `json:"domain"`
13511380
Domainid string `json:"domainid"`
1381+
Domainpath string `json:"domainpath"`
13521382
Fordisplay bool `json:"fordisplay"`
1383+
Forsystemvms bool `json:"forsystemvms"`
13531384
Forvirtualnetwork bool `json:"forvirtualnetwork"`
13541385
Hasannotations bool `json:"hasannotations"`
13551386
Hasrules bool `json:"hasrules"`

cloudstack/AffinityGroupService.go

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -245,18 +245,20 @@ func (s *AffinityGroupService) CreateAffinityGroup(p *CreateAffinityGroupParams)
245245
}
246246

247247
type CreateAffinityGroupResponse struct {
248-
Account string `json:"account"`
249-
Description string `json:"description"`
250-
Domain string `json:"domain"`
251-
Domainid string `json:"domainid"`
252-
Id string `json:"id"`
253-
JobID string `json:"jobid"`
254-
Jobstatus int `json:"jobstatus"`
255-
Name string `json:"name"`
256-
Project string `json:"project"`
257-
Projectid string `json:"projectid"`
258-
Type string `json:"type"`
259-
VirtualmachineIds []string `json:"virtualmachineIds"`
248+
Account string `json:"account"`
249+
Dedicatedresources []string `json:"dedicatedresources"`
250+
Description string `json:"description"`
251+
Domain string `json:"domain"`
252+
Domainid string `json:"domainid"`
253+
Domainpath string `json:"domainpath"`
254+
Id string `json:"id"`
255+
JobID string `json:"jobid"`
256+
Jobstatus int `json:"jobstatus"`
257+
Name string `json:"name"`
258+
Project string `json:"project"`
259+
Projectid string `json:"projectid"`
260+
Type string `json:"type"`
261+
VirtualmachineIds []string `json:"virtualmachineIds"`
260262
}
261263

262264
type DeleteAffinityGroupParams struct {
@@ -980,18 +982,20 @@ type ListAffinityGroupsResponse struct {
980982
}
981983

982984
type AffinityGroup struct {
983-
Account string `json:"account"`
984-
Description string `json:"description"`
985-
Domain string `json:"domain"`
986-
Domainid string `json:"domainid"`
987-
Id string `json:"id"`
988-
JobID string `json:"jobid"`
989-
Jobstatus int `json:"jobstatus"`
990-
Name string `json:"name"`
991-
Project string `json:"project"`
992-
Projectid string `json:"projectid"`
993-
Type string `json:"type"`
994-
VirtualmachineIds []string `json:"virtualmachineIds"`
985+
Account string `json:"account"`
986+
Dedicatedresources []string `json:"dedicatedresources"`
987+
Description string `json:"description"`
988+
Domain string `json:"domain"`
989+
Domainid string `json:"domainid"`
990+
Domainpath string `json:"domainpath"`
991+
Id string `json:"id"`
992+
JobID string `json:"jobid"`
993+
Jobstatus int `json:"jobstatus"`
994+
Name string `json:"name"`
995+
Project string `json:"project"`
996+
Projectid string `json:"projectid"`
997+
Type string `json:"type"`
998+
VirtualmachineIds []string `json:"virtualmachineIds"`
995999
}
9961000

9971001
type UpdateVMAffinityGroupParams struct {
@@ -1137,6 +1141,7 @@ type UpdateVMAffinityGroupResponse struct {
11371141
Cpuspeed int `json:"cpuspeed"`
11381142
Cpuused string `json:"cpuused"`
11391143
Created string `json:"created"`
1144+
Deleteprotection bool `json:"deleteprotection"`
11401145
Details map[string]string `json:"details"`
11411146
Diskioread int64 `json:"diskioread"`
11421147
Diskiowrite int64 `json:"diskiowrite"`
@@ -1148,6 +1153,7 @@ type UpdateVMAffinityGroupResponse struct {
11481153
Displayvm bool `json:"displayvm"`
11491154
Domain string `json:"domain"`
11501155
Domainid string `json:"domainid"`
1156+
Domainpath string `json:"domainpath"`
11511157
Forvirtualnetwork bool `json:"forvirtualnetwork"`
11521158
Group string `json:"group"`
11531159
Groupid string `json:"groupid"`
@@ -1161,6 +1167,7 @@ type UpdateVMAffinityGroupResponse struct {
11611167
Icon interface{} `json:"icon"`
11621168
Id string `json:"id"`
11631169
Instancename string `json:"instancename"`
1170+
Ipaddress string `json:"ipaddress"`
11641171
Isdynamicallyscalable bool `json:"isdynamicallyscalable"`
11651172
Isodisplaytext string `json:"isodisplaytext"`
11661173
Isoid string `json:"isoid"`
@@ -1198,6 +1205,7 @@ type UpdateVMAffinityGroupResponse struct {
11981205
State string `json:"state"`
11991206
Tags []Tags `json:"tags"`
12001207
Templatedisplaytext string `json:"templatedisplaytext"`
1208+
Templateformat string `json:"templateformat"`
12011209
Templateid string `json:"templateid"`
12021210
Templatename string `json:"templatename"`
12031211
Templatetype string `json:"templatetype"`
@@ -1209,6 +1217,7 @@ type UpdateVMAffinityGroupResponse struct {
12091217
Userid string `json:"userid"`
12101218
Username string `json:"username"`
12111219
Vgpu string `json:"vgpu"`
1220+
Vmtype string `json:"vmtype"`
12121221
Vnfdetails map[string]string `json:"vnfdetails"`
12131222
Vnfnics []string `json:"vnfnics"`
12141223
Zoneid string `json:"zoneid"`
@@ -1220,6 +1229,7 @@ type UpdateVMAffinityGroupResponseSecuritygroup struct {
12201229
Description string `json:"description"`
12211230
Domain string `json:"domain"`
12221231
Domainid string `json:"domainid"`
1232+
Domainpath string `json:"domainpath"`
12231233
Egressrule []UpdateVMAffinityGroupResponseSecuritygroupRule `json:"egressrule"`
12241234
Id string `json:"id"`
12251235
Ingressrule []UpdateVMAffinityGroupResponseSecuritygroupRule `json:"ingressrule"`
@@ -1245,16 +1255,18 @@ type UpdateVMAffinityGroupResponseSecuritygroupRule struct {
12451255
}
12461256

12471257
type UpdateVMAffinityGroupResponseAffinitygroup struct {
1248-
Account string `json:"account"`
1249-
Description string `json:"description"`
1250-
Domain string `json:"domain"`
1251-
Domainid string `json:"domainid"`
1252-
Id string `json:"id"`
1253-
Name string `json:"name"`
1254-
Project string `json:"project"`
1255-
Projectid string `json:"projectid"`
1256-
Type string `json:"type"`
1257-
VirtualmachineIds []string `json:"virtualmachineIds"`
1258+
Account string `json:"account"`
1259+
Dedicatedresources []string `json:"dedicatedresources"`
1260+
Description string `json:"description"`
1261+
Domain string `json:"domain"`
1262+
Domainid string `json:"domainid"`
1263+
Domainpath string `json:"domainpath"`
1264+
Id string `json:"id"`
1265+
Name string `json:"name"`
1266+
Project string `json:"project"`
1267+
Projectid string `json:"projectid"`
1268+
Type string `json:"type"`
1269+
VirtualmachineIds []string `json:"virtualmachineIds"`
12581270
}
12591271

12601272
func (r *UpdateVMAffinityGroupResponse) UnmarshalJSON(b []byte) error {

0 commit comments

Comments
 (0)