Skip to content

Commit

Permalink
Add support for unmanaged kubernetes (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishesh92 authored Aug 4, 2023
1 parent be2b1cd commit 9130ec8
Show file tree
Hide file tree
Showing 38 changed files with 67,364 additions and 63,265 deletions.
25 changes: 25 additions & 0 deletions cloudstack/AddressService.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ type AssociateIpAddressResponse struct {
Fordisplay bool `json:"fordisplay"`
Forvirtualnetwork bool `json:"forvirtualnetwork"`
Hasannotations bool `json:"hasannotations"`
Hasrules bool `json:"hasrules"`
Id string `json:"id"`
Ipaddress string `json:"ipaddress"`
Isportable bool `json:"isportable"`
Expand All @@ -308,6 +309,7 @@ type AssociateIpAddressResponse struct {
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
Virtualmachineid string `json:"virtualmachineid"`
Virtualmachinename string `json:"virtualmachinename"`
Virtualmachinetype string `json:"virtualmachinetype"`
Vlanid string `json:"vlanid"`
Vlanname string `json:"vlanname"`
Vmipaddress string `json:"vmipaddress"`
Expand Down Expand Up @@ -469,6 +471,10 @@ func (p *ListPublicIpAddressesParams) toURLValues() url.Values {
if v, found := p.p["projectid"]; found {
u.Set("projectid", v.(string))
}
if v, found := p.p["retrieveonlyresourcecount"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("retrieveonlyresourcecount", vv)
}
if v, found := p.p["state"]; found {
u.Set("state", v.(string))
}
Expand Down Expand Up @@ -776,6 +782,21 @@ func (p *ListPublicIpAddressesParams) GetProjectid() (string, bool) {
return value, ok
}

func (p *ListPublicIpAddressesParams) SetRetrieveonlyresourcecount(v bool) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["retrieveonlyresourcecount"] = v
}

func (p *ListPublicIpAddressesParams) GetRetrieveonlyresourcecount() (bool, bool) {
if p.p == nil {
p.p = make(map[string]interface{})
}
value, ok := p.p["retrieveonlyresourcecount"].(bool)
return value, ok
}

func (p *ListPublicIpAddressesParams) SetState(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -922,6 +943,7 @@ type PublicIpAddress struct {
Fordisplay bool `json:"fordisplay"`
Forvirtualnetwork bool `json:"forvirtualnetwork"`
Hasannotations bool `json:"hasannotations"`
Hasrules bool `json:"hasrules"`
Id string `json:"id"`
Ipaddress string `json:"ipaddress"`
Isportable bool `json:"isportable"`
Expand All @@ -941,6 +963,7 @@ type PublicIpAddress struct {
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
Virtualmachineid string `json:"virtualmachineid"`
Virtualmachinename string `json:"virtualmachinename"`
Virtualmachinetype string `json:"virtualmachinetype"`
Vlanid string `json:"vlanid"`
Vlanname string `json:"vlanname"`
Vmipaddress string `json:"vmipaddress"`
Expand Down Expand Up @@ -1071,6 +1094,7 @@ type UpdateIpAddressResponse struct {
Fordisplay bool `json:"fordisplay"`
Forvirtualnetwork bool `json:"forvirtualnetwork"`
Hasannotations bool `json:"hasannotations"`
Hasrules bool `json:"hasrules"`
Id string `json:"id"`
Ipaddress string `json:"ipaddress"`
Isportable bool `json:"isportable"`
Expand All @@ -1090,6 +1114,7 @@ type UpdateIpAddressResponse struct {
Virtualmachinedisplayname string `json:"virtualmachinedisplayname"`
Virtualmachineid string `json:"virtualmachineid"`
Virtualmachinename string `json:"virtualmachinename"`
Virtualmachinetype string `json:"virtualmachinetype"`
Vlanid string `json:"vlanid"`
Vlanname string `json:"vlanname"`
Vmipaddress string `json:"vmipaddress"`
Expand Down
78 changes: 52 additions & 26 deletions cloudstack/AsyncjobService.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func (p *ListAsyncJobsParams) toURLValues() url.Values {
vv := strconv.FormatBool(v.(bool))
u.Set("listall", vv)
}
if v, found := p.p["managementserverid"]; found {
u.Set("managementserverid", v.(string))
}
if v, found := p.p["page"]; found {
vv := strconv.Itoa(v.(int))
u.Set("page", vv)
Expand Down Expand Up @@ -148,6 +151,21 @@ func (p *ListAsyncJobsParams) GetListall() (bool, bool) {
return value, ok
}

func (p *ListAsyncJobsParams) SetManagementserverid(v UUID) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["managementserverid"] = v
}

func (p *ListAsyncJobsParams) GetManagementserverid() (UUID, bool) {
if p.p == nil {
p.p = make(map[string]interface{})
}
value, ok := p.p["managementserverid"].(UUID)
return value, ok
}

func (p *ListAsyncJobsParams) SetPage(v int) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -222,19 +240,23 @@ type ListAsyncJobsResponse struct {
}

type AsyncJob struct {
Accountid string `json:"accountid"`
Cmd string `json:"cmd"`
Completed string `json:"completed"`
Created string `json:"created"`
JobID string `json:"jobid"`
Jobinstanceid string `json:"jobinstanceid"`
Jobinstancetype string `json:"jobinstancetype"`
Jobprocstatus int `json:"jobprocstatus"`
Jobresult json.RawMessage `json:"jobresult"`
Jobresultcode int `json:"jobresultcode"`
Jobresulttype string `json:"jobresulttype"`
Jobstatus int `json:"jobstatus"`
Userid string `json:"userid"`
Account string `json:"account"`
Accountid string `json:"accountid"`
Cmd string `json:"cmd"`
Completed string `json:"completed"`
Created string `json:"created"`
Domainid string `json:"domainid"`
Domainpath string `json:"domainpath"`
JobID string `json:"jobid"`
Jobinstanceid string `json:"jobinstanceid"`
Jobinstancetype string `json:"jobinstancetype"`
Jobprocstatus int `json:"jobprocstatus"`
Jobresult json.RawMessage `json:"jobresult"`
Jobresultcode int `json:"jobresultcode"`
Jobresulttype string `json:"jobresulttype"`
Jobstatus int `json:"jobstatus"`
Managementserverid UUID `json:"managementserverid"`
Userid string `json:"userid"`
}

type QueryAsyncJobResultParams struct {
Expand Down Expand Up @@ -302,17 +324,21 @@ func (s *AsyncjobService) QueryAsyncJobResult(p *QueryAsyncJobResultParams) (*Qu
}

type QueryAsyncJobResultResponse struct {
Accountid string `json:"accountid"`
Cmd string `json:"cmd"`
Completed string `json:"completed"`
Created string `json:"created"`
JobID string `json:"jobid"`
Jobinstanceid string `json:"jobinstanceid"`
Jobinstancetype string `json:"jobinstancetype"`
Jobprocstatus int `json:"jobprocstatus"`
Jobresult json.RawMessage `json:"jobresult"`
Jobresultcode int `json:"jobresultcode"`
Jobresulttype string `json:"jobresulttype"`
Jobstatus int `json:"jobstatus"`
Userid string `json:"userid"`
Account string `json:"account"`
Accountid string `json:"accountid"`
Cmd string `json:"cmd"`
Completed string `json:"completed"`
Created string `json:"created"`
Domainid string `json:"domainid"`
Domainpath string `json:"domainpath"`
JobID string `json:"jobid"`
Jobinstanceid string `json:"jobinstanceid"`
Jobinstancetype string `json:"jobinstancetype"`
Jobprocstatus int `json:"jobprocstatus"`
Jobresult json.RawMessage `json:"jobresult"`
Jobresultcode int `json:"jobresultcode"`
Jobresulttype string `json:"jobresulttype"`
Jobstatus int `json:"jobstatus"`
Managementserverid UUID `json:"managementserverid"`
Userid string `json:"userid"`
}
5 changes: 2 additions & 3 deletions cloudstack/DiskOfferingService.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

type DiskOfferingServiceIface interface {
CreateDiskOffering(p *CreateDiskOfferingParams) (*CreateDiskOfferingResponse, error)
NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams
NewCreateDiskOfferingParams(name string) *CreateDiskOfferingParams
DeleteDiskOffering(p *DeleteDiskOfferingParams) (*DeleteDiskOfferingResponse, error)
NewDeleteDiskOfferingParams(id string) *DeleteDiskOfferingParams
ListDiskOfferings(p *ListDiskOfferingsParams) (*ListDiskOfferingsResponse, error)
Expand Down Expand Up @@ -639,10 +639,9 @@ func (p *CreateDiskOfferingParams) GetZoneid() ([]string, bool) {

// You should always use this function to get a new CreateDiskOfferingParams instance,
// as then you are sure you have configured all required params
func (s *DiskOfferingService) NewCreateDiskOfferingParams(displaytext string, name string) *CreateDiskOfferingParams {
func (s *DiskOfferingService) NewCreateDiskOfferingParams(name string) *CreateDiskOfferingParams {
p := &CreateDiskOfferingParams{}
p.p = make(map[string]interface{})
p.p["displaytext"] = displaytext
p.p["name"] = name
return p
}
Expand Down
8 changes: 4 additions & 4 deletions cloudstack/DiskOfferingService_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions cloudstack/EventService.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ func (p *ListEventsParams) toURLValues() url.Values {
if v, found := p.p["account"]; found {
u.Set("account", v.(string))
}
if v, found := p.p["archived"]; found {
vv := strconv.FormatBool(v.(bool))
u.Set("archived", vv)
}
if v, found := p.p["domainid"]; found {
u.Set("domainid", v.(string))
}
Expand Down Expand Up @@ -456,6 +460,21 @@ func (p *ListEventsParams) GetAccount() (string, bool) {
return value, ok
}

func (p *ListEventsParams) SetArchived(v bool) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["archived"] = v
}

func (p *ListEventsParams) GetArchived() (bool, bool) {
if p.p == nil {
p.p = make(map[string]interface{})
}
value, ok := p.p["archived"].(bool)
return value, ok
}

func (p *ListEventsParams) SetDomainid(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -774,6 +793,7 @@ type ListEventsResponse struct {

type Event struct {
Account string `json:"account"`
Archived bool `json:"archived"`
Created string `json:"created"`
Description string `json:"description"`
Domain string `json:"domain"`
Expand Down
Loading

0 comments on commit 9130ec8

Please sign in to comment.