Skip to content

Updated SDK with 4.20.1 APIs #112

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions cloudstack/AccountService.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type AccountServiceIface interface {
EnableAccount(p *EnableAccountParams) (*EnableAccountResponse, error)
NewEnableAccountParams() *EnableAccountParams
IsAccountAllowedToCreateOfferingsWithTags(p *IsAccountAllowedToCreateOfferingsWithTagsParams) (*IsAccountAllowedToCreateOfferingsWithTagsResponse, error)
NewIsAccountAllowedToCreateOfferingsWithTagsParams() *IsAccountAllowedToCreateOfferingsWithTagsParams
NewIsAccountAllowedToCreateOfferingsWithTagsParams(id string) *IsAccountAllowedToCreateOfferingsWithTagsParams
LinkAccountToLdap(p *LinkAccountToLdapParams) (*LinkAccountToLdapResponse, error)
NewLinkAccountToLdapParams(account string, domainid string, ldapdomain string) *LinkAccountToLdapParams
ListAccounts(p *ListAccountsParams) (*ListAccountsResponse, error)
Expand Down Expand Up @@ -443,6 +443,7 @@ func (s *AccountService) CreateAccount(p *CreateAccountParams) (*CreateAccountRe
type CreateAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -510,6 +511,7 @@ type CreateAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -770,6 +772,7 @@ func (s *AccountService) DisableAccount(p *DisableAccountParams) (*DisableAccoun
type DisableAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -837,6 +840,7 @@ type DisableAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -969,6 +973,7 @@ func (s *AccountService) EnableAccount(p *EnableAccountParams) (*EnableAccountRe
type EnableAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -1036,6 +1041,7 @@ type EnableAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -1096,9 +1102,10 @@ func (p *IsAccountAllowedToCreateOfferingsWithTagsParams) GetId() (string, bool)

// You should always use this function to get a new IsAccountAllowedToCreateOfferingsWithTagsParams instance,
// as then you are sure you have configured all required params
func (s *AccountService) NewIsAccountAllowedToCreateOfferingsWithTagsParams() *IsAccountAllowedToCreateOfferingsWithTagsParams {
func (s *AccountService) NewIsAccountAllowedToCreateOfferingsWithTagsParams(id string) *IsAccountAllowedToCreateOfferingsWithTagsParams {
p := &IsAccountAllowedToCreateOfferingsWithTagsParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
}

Expand Down Expand Up @@ -1354,6 +1361,9 @@ func (p *ListAccountsParams) toURLValues() url.Values {
vv := strconv.Itoa(v.(int))
u.Set("accounttype", vv)
}
if v, found := p.p["apikeyaccess"]; found {
u.Set("apikeyaccess", v.(string))
}
if v, found := p.p["details"]; found {
vv := strings.Join(v.([]string), ",")
u.Set("details", vv)
Expand Down Expand Up @@ -1424,6 +1434,27 @@ func (p *ListAccountsParams) GetAccounttype() (int, bool) {
return value, ok
}

func (p *ListAccountsParams) SetApikeyaccess(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["apikeyaccess"] = v
}

func (p *ListAccountsParams) ResetApikeyaccess() {
if p.p != nil && p.p["apikeyaccess"] != nil {
delete(p.p, "apikeyaccess")
}
}

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

func (p *ListAccountsParams) SetDetails(v []string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -1811,6 +1842,7 @@ type ListAccountsResponse struct {
type Account struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -1878,6 +1910,7 @@ type AccountUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -2326,6 +2359,7 @@ func (s *AccountService) LockAccount(p *LockAccountParams) (*LockAccountResponse
type LockAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -2393,6 +2427,7 @@ type LockAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -2548,6 +2583,7 @@ func (s *AccountService) MarkDefaultZoneForAccount(p *MarkDefaultZoneForAccountP
type MarkDefaultZoneForAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -2615,6 +2651,7 @@ type MarkDefaultZoneForAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down Expand Up @@ -2655,6 +2692,9 @@ func (p *UpdateAccountParams) toURLValues() url.Values {
u.Set(fmt.Sprintf("accountdetails[0].%s", k), m[k])
}
}
if v, found := p.p["apikeyaccess"]; found {
u.Set("apikeyaccess", v.(string))
}
if v, found := p.p["domainid"]; found {
u.Set("domainid", v.(string))
}
Expand Down Expand Up @@ -2715,6 +2755,27 @@ func (p *UpdateAccountParams) GetAccountdetails() (map[string]string, bool) {
return value, ok
}

func (p *UpdateAccountParams) SetApikeyaccess(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["apikeyaccess"] = v
}

func (p *UpdateAccountParams) ResetApikeyaccess() {
if p.p != nil && p.p["apikeyaccess"] != nil {
delete(p.p, "apikeyaccess")
}
}

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

func (p *UpdateAccountParams) SetDomainid(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -2846,6 +2907,7 @@ func (s *AccountService) UpdateAccount(p *UpdateAccountParams) (*UpdateAccountRe
type UpdateAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"`
Apikeyaccess string `json:"apikeyaccess"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Expand Down Expand Up @@ -2913,6 +2975,7 @@ type UpdateAccountResponseUser struct {
Accountid string `json:"accountid"`
Accounttype int `json:"accounttype"`
Apikey string `json:"apikey"`
Apikeyaccess string `json:"apikeyaccess"`
Created string `json:"created"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Expand Down
8 changes: 4 additions & 4 deletions cloudstack/AccountService_mock.go

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

1 change: 1 addition & 0 deletions cloudstack/AffinityGroupService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ func (s *AffinityGroupService) UpdateVMAffinityGroup(p *UpdateVMAffinityGroupPar
type UpdateVMAffinityGroupResponse struct {
Account string `json:"account"`
Affinitygroup []UpdateVMAffinityGroupResponseAffinitygroup `json:"affinitygroup"`
Arch string `json:"arch"`
Autoscalevmgroupid string `json:"autoscalevmgroupid"`
Autoscalevmgroupname string `json:"autoscalevmgroupname"`
Backupofferingid string `json:"backupofferingid"`
Expand Down
1 change: 1 addition & 0 deletions cloudstack/BrocadeVCSService.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ type BrocadeVcsDeviceNetwork struct {
Sentbytes int64 `json:"sentbytes"`
Service []BrocadeVcsDeviceNetworkService `json:"service"`
Specifyipranges bool `json:"specifyipranges"`
Specifyvlan bool `json:"specifyvlan"`
State string `json:"state"`
Strechedl2subnet bool `json:"strechedl2subnet"`
Subdomainaccess bool `json:"subdomainaccess"`
Expand Down
48 changes: 48 additions & 0 deletions cloudstack/ClusterService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,9 @@ func (p *ListClustersParams) toURLValues() url.Values {
if v, found := p.p["allocationstate"]; found {
u.Set("allocationstate", v.(string))
}
if v, found := p.p["arch"]; found {
u.Set("arch", v.(string))
}
if v, found := p.p["clustertype"]; found {
u.Set("clustertype", v.(string))
}
Expand Down Expand Up @@ -1506,6 +1509,27 @@ func (p *ListClustersParams) GetAllocationstate() (string, bool) {
return value, ok
}

func (p *ListClustersParams) SetArch(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["arch"] = v
}

func (p *ListClustersParams) ResetArch() {
if p.p != nil && p.p["arch"] != nil {
delete(p.p, "arch")
}
}

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

func (p *ListClustersParams) SetClustertype(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -2104,6 +2128,9 @@ func (p *ListClustersMetricsParams) toURLValues() url.Values {
if v, found := p.p["allocationstate"]; found {
u.Set("allocationstate", v.(string))
}
if v, found := p.p["arch"]; found {
u.Set("arch", v.(string))
}
if v, found := p.p["clustertype"]; found {
u.Set("clustertype", v.(string))
}
Expand Down Expand Up @@ -2164,6 +2191,27 @@ func (p *ListClustersMetricsParams) GetAllocationstate() (string, bool) {
return value, ok
}

func (p *ListClustersMetricsParams) SetArch(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["arch"] = v
}

func (p *ListClustersMetricsParams) ResetArch() {
if p.p != nil && p.p["arch"] != nil {
delete(p.p, "arch")
}
}

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

func (p *ListClustersMetricsParams) SetClustertype(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down
1 change: 1 addition & 0 deletions cloudstack/ConfigurationService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ type UpdateStorageCapabilitiesResponse struct {
Suitableformigration bool `json:"suitableformigration"`
Tags string `json:"tags"`
Type string `json:"type"`
Usediops int64 `json:"usediops"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
}
25 changes: 25 additions & 0 deletions cloudstack/FirewallService.go
Original file line number Diff line number Diff line change
Expand Up @@ -4436,6 +4436,10 @@ func (p *UpdatePortForwardingRuleParams) toURLValues() url.Values {
if p.p == nil {
return u
}
if v, found := p.p["cidrlist"]; found {
vv := strings.Join(v.([]string), ",")
u.Set("cidrlist", vv)
}
if v, found := p.p["customid"]; found {
u.Set("customid", v.(string))
}
Expand Down Expand Up @@ -4463,6 +4467,27 @@ func (p *UpdatePortForwardingRuleParams) toURLValues() url.Values {
return u
}

func (p *UpdatePortForwardingRuleParams) SetCidrlist(v []string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["cidrlist"] = v
}

func (p *UpdatePortForwardingRuleParams) ResetCidrlist() {
if p.p != nil && p.p["cidrlist"] != nil {
delete(p.p, "cidrlist")
}
}

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

func (p *UpdatePortForwardingRuleParams) SetCustomid(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down
Loading
Loading