Skip to content
Draft
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
2 changes: 1 addition & 1 deletion cloudstack/APIDiscoveryService.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *APIDiscoveryService) NewListApisParams() *ListApisParams {
return p
}

// lists all available apis on the server, provided by the Api Discovery plugin
// Lists all available APIs on the server, provided by the API Discovery plugin
func (s *APIDiscoveryService) ListApis(p *ListApisParams) (*ListApisResponse, error) {
resp, err := s.cs.newRequest("listApis", p.toURLValues())
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions cloudstack/AccountService.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ func (s *AccountService) NewDeleteAccountParams(id string) *DeleteAccountParams
return p
}

// Deletes a account, and all users associated with this account
// Deletes an Account and all Users associated with this Account
func (s *AccountService) DeleteAccount(p *DeleteAccountParams) (*DeleteAccountResponse, error) {
resp, err := s.cs.newPostRequest("deleteAccount", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1367,7 +1367,7 @@ func (s *AccountService) NewLinkAccountToLdapParams(account string, domainid str
return p
}

// link a cloudstack account to a group or OU in ldap
// Link a cloudstack account to a group or OU in ldap
func (s *AccountService) LinkAccountToLdap(p *LinkAccountToLdapParams) (*LinkAccountToLdapResponse, error) {
resp, err := s.cs.newPostRequest("linkAccountToLdap", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1864,7 +1864,7 @@ func (s *AccountService) GetAccountByID(id string, opts ...OptionFunc) (*Account
return nil, l.Count, fmt.Errorf("There is more then one result for Account UUID: %s!", id)
}

// Lists accounts and provides detailed account information for listed accounts
// Lists Accounts and provides detailed Account information for listed Accounts
func (s *AccountService) ListAccounts(p *ListAccountsParams) (*ListAccountsResponse, error) {
resp, err := s.cs.newRequest("listAccounts", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -2245,7 +2245,7 @@ func (s *AccountService) GetProjectAccountID(keyword string, projectid string, o
return "", l.Count, fmt.Errorf("Could not find an exact match for %s: %+v", keyword, l)
}

// Lists project's accounts
// Lists project's Accounts
func (s *AccountService) ListProjectAccounts(p *ListProjectAccountsParams) (*ListProjectAccountsResponse, error) {
resp, err := s.cs.newRequest("listProjectAccounts", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -2416,7 +2416,7 @@ func (s *AccountService) NewLockAccountParams(account string, domainid string) *
return p
}

// This deprecated function used to locks an account. Look for the API DisableAccount instead
// This deprecated function used to lock an Account. Look for the API DisableAccount instead
func (s *AccountService) LockAccount(p *LockAccountParams) (*LockAccountResponse, error) {
resp, err := s.cs.newPostRequest("lockAccount", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -2994,7 +2994,7 @@ func (s *AccountService) NewUpdateAccountParams() *UpdateAccountParams {
return p
}

// Updates account information for the authenticated user
// Updates Account information for the authenticated user
func (s *AccountService) UpdateAccount(p *UpdateAccountParams) (*UpdateAccountResponse, error) {
resp, err := s.cs.newPostRequest("updateAccount", p.toURLValues())
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions cloudstack/AddressService.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func (s *AddressService) NewAssociateIpAddressParams() *AssociateIpAddressParams
return p
}

// Acquires and associates a public IP to an account.
// Acquires and associates a public IP to an Account.
func (s *AddressService) AssociateIpAddress(p *AssociateIpAddressParams) (*AssociateIpAddressResponse, error) {
resp, err := s.cs.newPostRequest("associateIpAddress", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -553,7 +553,7 @@ func (s *AddressService) NewDisassociateIpAddressParams(id string) *Disassociate
return p
}

// Disassociates an IP address from the account.
// Disassociates an IP address from the Account.
func (s *AddressService) DisassociateIpAddress(p *DisassociateIpAddressParams) (*DisassociateIpAddressResponse, error) {
resp, err := s.cs.newPostRequest("disassociateIpAddress", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1308,7 +1308,7 @@ func (s *AddressService) GetPublicIpAddressByID(id string, opts ...OptionFunc) (
return nil, l.Count, fmt.Errorf("There is more then one result for PublicIpAddress UUID: %s!", id)
}

// Lists all public ip addresses
// Lists all public IP addresses
func (s *AddressService) ListPublicIpAddresses(p *ListPublicIpAddressesParams) (*ListPublicIpAddressesResponse, error) {
resp, err := s.cs.newRequest("listPublicIpAddresses", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1588,7 +1588,7 @@ func (s *AddressService) NewReleaseIpAddressParams(id string) *ReleaseIpAddressP
return p
}

// Releases an IP address from the account.
// Releases an IP address from the Account.
func (s *AddressService) ReleaseIpAddress(p *ReleaseIpAddressParams) (*ReleaseIpAddressResponse, error) {
resp, err := s.cs.newPostRequest("releaseIpAddress", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1874,7 +1874,7 @@ func (s *AddressService) NewReserveIpAddressParams(id string) *ReserveIpAddressP
return p
}

// Reserve a public IP to an account.
// Reserve a public IP to an Account.
func (s *AddressService) ReserveIpAddress(p *ReserveIpAddressParams) (*ReserveIpAddressResponse, error) {
resp, err := s.cs.newPostRequest("reserveIpAddress", p.toURLValues())
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cloudstack/AffinityGroupService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ func (s *AffinityGroupService) NewUpdateVMAffinityGroupParams(id string) *Update
return p
}

// Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect.
// Updates the affinity/anti-affinity group associations of an Instance. The Instance has to be stopped and restarted for the new properties to take effect.
func (s *AffinityGroupService) UpdateVMAffinityGroup(p *UpdateVMAffinityGroupParams) (*UpdateVMAffinityGroupResponse, error) {
resp, err := s.cs.newPostRequest("updateVMAffinityGroup", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -1131,6 +1131,7 @@ func (s *AffinityGroupService) UpdateVMAffinityGroup(p *UpdateVMAffinityGroupPar
type UpdateVMAffinityGroupResponse struct {
Account string `json:"account"`
Affinitygroup []UpdateVMAffinityGroupResponseAffinitygroup `json:"affinitygroup"`
Alloweddetails string `json:"alloweddetails"`
Arch string `json:"arch"`
Autoscalevmgroupid string `json:"autoscalevmgroupid"`
Autoscalevmgroupname string `json:"autoscalevmgroupname"`
Expand Down
6 changes: 3 additions & 3 deletions cloudstack/AnnotationService.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (s *AnnotationService) NewAddAnnotationParams() *AddAnnotationParams {
return p
}

// add an annotation.
// Add an annotation.
func (s *AnnotationService) AddAnnotation(p *AddAnnotationParams) (*AddAnnotationResponse, error) {
resp, err := s.cs.newPostRequest("addAnnotation", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -517,7 +517,7 @@ func (s *AnnotationService) NewRemoveAnnotationParams(id string) *RemoveAnnotati
return p
}

// remove an annotation.
// Remove an annotation.
func (s *AnnotationService) RemoveAnnotation(p *RemoveAnnotationParams) (*RemoveAnnotationResponse, error) {
resp, err := s.cs.newPostRequest("removeAnnotation", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -622,7 +622,7 @@ func (s *AnnotationService) NewUpdateAnnotationVisibilityParams(adminsonly bool,
return p
}

// update an annotation visibility.
// Update an annotation visibility.
func (s *AnnotationService) UpdateAnnotationVisibility(p *UpdateAnnotationVisibilityParams) (*UpdateAnnotationVisibilityResponse, error) {
resp, err := s.cs.newPostRequest("updateAnnotationVisibility", p.toURLValues())
if err != nil {
Expand Down
98 changes: 97 additions & 1 deletion cloudstack/AsyncjobService.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func (p *ListAsyncJobsParams) toURLValues() url.Values {
vv := strconv.Itoa(v.(int))
u.Set("pagesize", vv)
}
if v, found := p.p["resourceid"]; found {
u.Set("resourceid", v.(string))
}
if v, found := p.p["resourcetype"]; found {
u.Set("resourcetype", v.(string))
}
if v, found := p.p["startdate"]; found {
u.Set("startdate", v.(string))
}
Expand Down Expand Up @@ -244,6 +250,48 @@ func (p *ListAsyncJobsParams) GetPagesize() (int, bool) {
return value, ok
}

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

func (p *ListAsyncJobsParams) ResetResourceid() {
if p.p != nil && p.p["resourceid"] != nil {
delete(p.p, "resourceid")
}
}

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

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

func (p *ListAsyncJobsParams) ResetResourcetype() {
if p.p != nil && p.p["resourcetype"] != nil {
delete(p.p, "resourcetype")
}
}

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

func (p *ListAsyncJobsParams) SetStartdate(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down Expand Up @@ -273,7 +321,7 @@ func (s *AsyncjobService) NewListAsyncJobsParams() *ListAsyncJobsParams {
return p
}

// Lists all pending asynchronous jobs for the account.
// Lists all pending asynchronous jobs for the Account.
func (s *AsyncjobService) ListAsyncJobs(p *ListAsyncJobsParams) (*ListAsyncJobsResponse, error) {
resp, err := s.cs.newRequest("listAsyncJobs", p.toURLValues())
if err != nil {
Expand Down Expand Up @@ -326,6 +374,12 @@ func (p *QueryAsyncJobResultParams) toURLValues() url.Values {
if v, found := p.p["jobid"]; found {
u.Set("jobid", v.(string))
}
if v, found := p.p["resourceid"]; found {
u.Set("resourceid", v.(string))
}
if v, found := p.p["resourcetype"]; found {
u.Set("resourcetype", v.(string))
}
return u
}

Expand All @@ -350,6 +404,48 @@ func (p *QueryAsyncJobResultParams) GetJobID() (string, bool) {
return value, ok
}

func (p *QueryAsyncJobResultParams) SetResourceid(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["resourceid"] = v
}

func (p *QueryAsyncJobResultParams) ResetResourceid() {
if p.p != nil && p.p["resourceid"] != nil {
delete(p.p, "resourceid")
}
}

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

func (p *QueryAsyncJobResultParams) SetResourcetype(v string) {
if p.p == nil {
p.p = make(map[string]interface{})
}
p.p["resourcetype"] = v
}

func (p *QueryAsyncJobResultParams) ResetResourcetype() {
if p.p != nil && p.p["resourcetype"] != nil {
delete(p.p, "resourcetype")
}
}

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

// You should always use this function to get a new QueryAsyncJobResultParams instance,
// as then you are sure you have configured all required params
func (s *AsyncjobService) NewQueryAsyncJobResultParams(jobid string) *QueryAsyncJobResultParams {
Expand Down
Loading
Loading