Skip to content

Commit 9130ec8

Browse files
authored
Add support for unmanaged kubernetes (#59)
1 parent be2b1cd commit 9130ec8

38 files changed

+67364
-63265
lines changed

cloudstack/AddressService.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ type AssociateIpAddressResponse struct {
289289
Fordisplay bool `json:"fordisplay"`
290290
Forvirtualnetwork bool `json:"forvirtualnetwork"`
291291
Hasannotations bool `json:"hasannotations"`
292+
Hasrules bool `json:"hasrules"`
292293
Id string `json:"id"`
293294
Ipaddress string `json:"ipaddress"`
294295
Isportable bool `json:"isportable"`
@@ -308,6 +309,7 @@ type AssociateIpAddressResponse struct {
308309
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
309310
Virtualmachineid string `json:"virtualmachineid"`
310311
Virtualmachinename string `json:"virtualmachinename"`
312+
Virtualmachinetype string `json:"virtualmachinetype"`
311313
Vlanid string `json:"vlanid"`
312314
Vlanname string `json:"vlanname"`
313315
Vmipaddress string `json:"vmipaddress"`
@@ -469,6 +471,10 @@ func (p *ListPublicIpAddressesParams) toURLValues() url.Values {
469471
if v, found := p.p["projectid"]; found {
470472
u.Set("projectid", v.(string))
471473
}
474+
if v, found := p.p["retrieveonlyresourcecount"]; found {
475+
vv := strconv.FormatBool(v.(bool))
476+
u.Set("retrieveonlyresourcecount", vv)
477+
}
472478
if v, found := p.p["state"]; found {
473479
u.Set("state", v.(string))
474480
}
@@ -776,6 +782,21 @@ func (p *ListPublicIpAddressesParams) GetProjectid() (string, bool) {
776782
return value, ok
777783
}
778784

785+
func (p *ListPublicIpAddressesParams) SetRetrieveonlyresourcecount(v bool) {
786+
if p.p == nil {
787+
p.p = make(map[string]interface{})
788+
}
789+
p.p["retrieveonlyresourcecount"] = v
790+
}
791+
792+
func (p *ListPublicIpAddressesParams) GetRetrieveonlyresourcecount() (bool, bool) {
793+
if p.p == nil {
794+
p.p = make(map[string]interface{})
795+
}
796+
value, ok := p.p["retrieveonlyresourcecount"].(bool)
797+
return value, ok
798+
}
799+
779800
func (p *ListPublicIpAddressesParams) SetState(v string) {
780801
if p.p == nil {
781802
p.p = make(map[string]interface{})
@@ -922,6 +943,7 @@ type PublicIpAddress struct {
922943
Fordisplay bool `json:"fordisplay"`
923944
Forvirtualnetwork bool `json:"forvirtualnetwork"`
924945
Hasannotations bool `json:"hasannotations"`
946+
Hasrules bool `json:"hasrules"`
925947
Id string `json:"id"`
926948
Ipaddress string `json:"ipaddress"`
927949
Isportable bool `json:"isportable"`
@@ -941,6 +963,7 @@ type PublicIpAddress struct {
941963
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
942964
Virtualmachineid string `json:"virtualmachineid"`
943965
Virtualmachinename string `json:"virtualmachinename"`
966+
Virtualmachinetype string `json:"virtualmachinetype"`
944967
Vlanid string `json:"vlanid"`
945968
Vlanname string `json:"vlanname"`
946969
Vmipaddress string `json:"vmipaddress"`
@@ -1071,6 +1094,7 @@ type UpdateIpAddressResponse struct {
10711094
Fordisplay bool `json:"fordisplay"`
10721095
Forvirtualnetwork bool `json:"forvirtualnetwork"`
10731096
Hasannotations bool `json:"hasannotations"`
1097+
Hasrules bool `json:"hasrules"`
10741098
Id string `json:"id"`
10751099
Ipaddress string `json:"ipaddress"`
10761100
Isportable bool `json:"isportable"`
@@ -1090,6 +1114,7 @@ type UpdateIpAddressResponse struct {
10901114
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
10911115
Virtualmachineid string `json:"virtualmachineid"`
10921116
Virtualmachinename string `json:"virtualmachinename"`
1117+
Virtualmachinetype string `json:"virtualmachinetype"`
10931118
Vlanid string `json:"vlanid"`
10941119
Vlanname string `json:"vlanname"`
10951120
Vmipaddress string `json:"vmipaddress"`

cloudstack/AsyncjobService.go

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func (p *ListAsyncJobsParams) toURLValues() url.Values {
5959
vv := strconv.FormatBool(v.(bool))
6060
u.Set("listall", vv)
6161
}
62+
if v, found := p.p["managementserverid"]; found {
63+
u.Set("managementserverid", v.(string))
64+
}
6265
if v, found := p.p["page"]; found {
6366
vv := strconv.Itoa(v.(int))
6467
u.Set("page", vv)
@@ -148,6 +151,21 @@ func (p *ListAsyncJobsParams) GetListall() (bool, bool) {
148151
return value, ok
149152
}
150153

154+
func (p *ListAsyncJobsParams) SetManagementserverid(v UUID) {
155+
if p.p == nil {
156+
p.p = make(map[string]interface{})
157+
}
158+
p.p["managementserverid"] = v
159+
}
160+
161+
func (p *ListAsyncJobsParams) GetManagementserverid() (UUID, bool) {
162+
if p.p == nil {
163+
p.p = make(map[string]interface{})
164+
}
165+
value, ok := p.p["managementserverid"].(UUID)
166+
return value, ok
167+
}
168+
151169
func (p *ListAsyncJobsParams) SetPage(v int) {
152170
if p.p == nil {
153171
p.p = make(map[string]interface{})
@@ -222,19 +240,23 @@ type ListAsyncJobsResponse struct {
222240
}
223241

224242
type AsyncJob struct {
225-
Accountid string `json:"accountid"`
226-
Cmd string `json:"cmd"`
227-
Completed string `json:"completed"`
228-
Created string `json:"created"`
229-
JobID string `json:"jobid"`
230-
Jobinstanceid string `json:"jobinstanceid"`
231-
Jobinstancetype string `json:"jobinstancetype"`
232-
Jobprocstatus int `json:"jobprocstatus"`
233-
Jobresult json.RawMessage `json:"jobresult"`
234-
Jobresultcode int `json:"jobresultcode"`
235-
Jobresulttype string `json:"jobresulttype"`
236-
Jobstatus int `json:"jobstatus"`
237-
Userid string `json:"userid"`
243+
Account string `json:"account"`
244+
Accountid string `json:"accountid"`
245+
Cmd string `json:"cmd"`
246+
Completed string `json:"completed"`
247+
Created string `json:"created"`
248+
Domainid string `json:"domainid"`
249+
Domainpath string `json:"domainpath"`
250+
JobID string `json:"jobid"`
251+
Jobinstanceid string `json:"jobinstanceid"`
252+
Jobinstancetype string `json:"jobinstancetype"`
253+
Jobprocstatus int `json:"jobprocstatus"`
254+
Jobresult json.RawMessage `json:"jobresult"`
255+
Jobresultcode int `json:"jobresultcode"`
256+
Jobresulttype string `json:"jobresulttype"`
257+
Jobstatus int `json:"jobstatus"`
258+
Managementserverid UUID `json:"managementserverid"`
259+
Userid string `json:"userid"`
238260
}
239261

240262
type QueryAsyncJobResultParams struct {
@@ -302,17 +324,21 @@ func (s *AsyncjobService) QueryAsyncJobResult(p *QueryAsyncJobResultParams) (*Qu
302324
}
303325

304326
type QueryAsyncJobResultResponse struct {
305-
Accountid string `json:"accountid"`
306-
Cmd string `json:"cmd"`
307-
Completed string `json:"completed"`
308-
Created string `json:"created"`
309-
JobID string `json:"jobid"`
310-
Jobinstanceid string `json:"jobinstanceid"`
311-
Jobinstancetype string `json:"jobinstancetype"`
312-
Jobprocstatus int `json:"jobprocstatus"`
313-
Jobresult json.RawMessage `json:"jobresult"`
314-
Jobresultcode int `json:"jobresultcode"`
315-
Jobresulttype string `json:"jobresulttype"`
316-
Jobstatus int `json:"jobstatus"`
317-
Userid string `json:"userid"`
327+
Account string `json:"account"`
328+
Accountid string `json:"accountid"`
329+
Cmd string `json:"cmd"`
330+
Completed string `json:"completed"`
331+
Created string `json:"created"`
332+
Domainid string `json:"domainid"`
333+
Domainpath string `json:"domainpath"`
334+
JobID string `json:"jobid"`
335+
Jobinstanceid string `json:"jobinstanceid"`
336+
Jobinstancetype string `json:"jobinstancetype"`
337+
Jobprocstatus int `json:"jobprocstatus"`
338+
Jobresult json.RawMessage `json:"jobresult"`
339+
Jobresultcode int `json:"jobresultcode"`
340+
Jobresulttype string `json:"jobresulttype"`
341+
Jobstatus int `json:"jobstatus"`
342+
Managementserverid UUID `json:"managementserverid"`
343+
Userid string `json:"userid"`
318344
}

cloudstack/DiskOfferingService.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929

3030
type DiskOfferingServiceIface interface {
3131
CreateDiskOffering(p *CreateDiskOfferingParams) (*CreateDiskOfferingResponse, error)
32-
NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams
32+
NewCreateDiskOfferingParams(name string) *CreateDiskOfferingParams
3333
DeleteDiskOffering(p *DeleteDiskOfferingParams) (*DeleteDiskOfferingResponse, error)
3434
NewDeleteDiskOfferingParams(id string) *DeleteDiskOfferingParams
3535
ListDiskOfferings(p *ListDiskOfferingsParams) (*ListDiskOfferingsResponse, error)
@@ -639,10 +639,9 @@ func (p *CreateDiskOfferingParams) GetZoneid() ([]string, bool) {
639639

640640
// You should always use this function to get a new CreateDiskOfferingParams instance,
641641
// as then you are sure you have configured all required params
642-
func (s *DiskOfferingService) NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams {
642+
func (s *DiskOfferingService) NewCreateDiskOfferingParams(name string) *CreateDiskOfferingParams {
643643
p := &CreateDiskOfferingParams{}
644644
p.p = make(map[string]interface{})
645-
p.p["displaytext"] = displaytext
646645
p.p["name"] = name
647646
return p
648647
}

cloudstack/DiskOfferingService_mock.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudstack/EventService.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ func (p *ListEventsParams) toURLValues() url.Values {
381381
if v, found := p.p["account"]; found {
382382
u.Set("account", v.(string))
383383
}
384+
if v, found := p.p["archived"]; found {
385+
vv := strconv.FormatBool(v.(bool))
386+
u.Set("archived", vv)
387+
}
384388
if v, found := p.p["domainid"]; found {
385389
u.Set("domainid", v.(string))
386390
}
@@ -456,6 +460,21 @@ func (p *ListEventsParams) GetAccount() (string, bool) {
456460
return value, ok
457461
}
458462

463+
func (p *ListEventsParams) SetArchived(v bool) {
464+
if p.p == nil {
465+
p.p = make(map[string]interface{})
466+
}
467+
p.p["archived"] = v
468+
}
469+
470+
func (p *ListEventsParams) GetArchived() (bool, bool) {
471+
if p.p == nil {
472+
p.p = make(map[string]interface{})
473+
}
474+
value, ok := p.p["archived"].(bool)
475+
return value, ok
476+
}
477+
459478
func (p *ListEventsParams) SetDomainid(v string) {
460479
if p.p == nil {
461480
p.p = make(map[string]interface{})
@@ -774,6 +793,7 @@ type ListEventsResponse struct {
774793

775794
type Event struct {
776795
Account string `json:"account"`
796+
Archived bool `json:"archived"`
777797
Created string `json:"created"`
778798
Description string `json:"description"`
779799
Domain string `json:"domain"`

0 commit comments

Comments
 (0)