diff --git a/go.mod b/go.mod index a2bb25ae3..bd5319b08 100644 --- a/go.mod +++ b/go.mod @@ -106,7 +106,7 @@ require ( github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1 github.com/ulikunitz/xz v0.5.5 github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311 - github.com/xanzy/go-cloudstack v2.4.1+incompatible + github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0 github.com/yandex-cloud/go-genproto v0.0.0-20190401174212-1db0ef3dce9b github.com/yandex-cloud/go-sdk v0.0.0-20190402114215-3fc1d6947035 golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d diff --git a/go.sum b/go.sum index 79d921747..1ad98b4e9 100644 --- a/go.sum +++ b/go.sum @@ -406,8 +406,8 @@ github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311 h1:s5pyxd5S6wRs2WpEE0xRfWUF46Wbz44h203KnbX0ecI= github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/xanzy/go-cloudstack v2.4.1+incompatible h1:Oc4xa2+I94h1g/QJ+nHoq597nJz2KXzxuQx/weOx0AU= -github.com/xanzy/go-cloudstack v2.4.1+incompatible/go.mod h1:s3eL3z5pNXF5FVybcT+LIVdId8pYn709yv6v5mrkrQE= +github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0 h1:NJrcIkdzq0C3I8ypAZwFE9RHtGbfp+mJvqIcoFATZuk= +github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0/go.mod h1:sBh287mCRwCz6zyXHMmw7sSZGPohVpnx+o+OY4M+i3A= github.com/yandex-cloud/go-genproto v0.0.0-20190401174212-1db0ef3dce9b h1:WcWw17zHjM1QoM5dPD2XUK9S0wSKlyohlCMeb1rwr0g= github.com/yandex-cloud/go-genproto v0.0.0-20190401174212-1db0ef3dce9b/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-sdk v0.0.0-20190402114215-3fc1d6947035 h1:2ZLZeg6xp+kYYGR2iMWSZyTn6j8bphNguO3drw7S1l4= diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/APIDiscoveryService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/APIDiscoveryService.go index 030f034eb..e47653c45 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/APIDiscoveryService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/APIDiscoveryService.go @@ -75,6 +75,8 @@ type ListApisResponse struct { type Api struct { Description string `json:"description"` Isasync bool `json:"isasync"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Params []ApiParams `json:"params"` Related string `json:"related"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AccountService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AccountService.go index ef82b7680..2eb558594 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AccountService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AccountService.go @@ -109,8 +109,9 @@ func (s *AccountService) AddAccountToProject(p *AddAccountToProjectParams) (*Add } type AddAccountToProjectResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -334,6 +335,8 @@ type CreateAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -464,8 +467,9 @@ func (s *AccountService) DeleteAccount(p *DeleteAccountParams) (*DeleteAccountRe } type DeleteAccountResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -544,8 +548,9 @@ func (s *AccountService) DeleteAccountFromProject(p *DeleteAccountFromProjectPar } type DeleteAccountFromProjectResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -651,7 +656,6 @@ func (s *AccountService) DisableAccount(p *DisableAccountParams) (*DisableAccoun } type DisableAccountResponse struct { - JobID string `json:"jobid"` Accountdetails map[string]string `json:"accountdetails"` Accounttype int `json:"accounttype"` Cpuavailable string `json:"cpuavailable"` @@ -667,6 +671,8 @@ type DisableAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -818,6 +824,8 @@ type EnableAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -945,7 +953,9 @@ func (s *AccountService) GetSolidFireAccountId(p *GetSolidFireAccountIdParams) ( } type GetSolidFireAccountIdResponse struct { - SolidFireAccountId int64 `json:"solidFireAccountId"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + SolidFireAccountId int64 `json:"solidFireAccountId"` } type ListAccountsParams struct { @@ -1214,6 +1224,8 @@ type Account struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1439,6 +1451,8 @@ type ProjectAccount struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1562,6 +1576,8 @@ type LockAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1721,7 +1737,6 @@ func (s *AccountService) MarkDefaultZoneForAccount(p *MarkDefaultZoneForAccountP } type MarkDefaultZoneForAccountResponse struct { - JobID string `json:"jobid"` Accountdetails map[string]string `json:"accountdetails"` Accounttype int `json:"accounttype"` Cpuavailable string `json:"cpuavailable"` @@ -1737,6 +1752,8 @@ type MarkDefaultZoneForAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1836,6 +1853,9 @@ func (p *UpdateAccountParams) toURLValues() url.Values { if v, found := p.p["newname"]; found { u.Set("newname", v.(string)) } + if v, found := p.p["roleid"]; found { + u.Set("roleid", v.(string)) + } return u } @@ -1887,12 +1907,19 @@ func (p *UpdateAccountParams) SetNewname(v string) { return } +func (p *UpdateAccountParams) SetRoleid(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["roleid"] = v + return +} + // You should always use this function to get a new UpdateAccountParams instance, // as then you are sure you have configured all required params -func (s *AccountService) NewUpdateAccountParams(newname string) *UpdateAccountParams { +func (s *AccountService) NewUpdateAccountParams() *UpdateAccountParams { p := &UpdateAccountParams{} p.p = make(map[string]interface{}) - p.p["newname"] = newname return p } @@ -1927,6 +1954,8 @@ type UpdateAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AddressService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AddressService.go index d0a61fc8e..ada47975e 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AddressService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AddressService.go @@ -146,7 +146,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. Either of the parameters are required, i.e. either zoneId, or networkId, or vpcId func (s *AddressService) AssociateIpAddress(p *AssociateIpAddressParams) (*AssociateIpAddressResponse, error) { resp, err := s.cs.newRequest("associateIpAddress", p.toURLValues()) if err != nil { @@ -182,7 +182,6 @@ func (s *AddressService) AssociateIpAddress(p *AssociateIpAddressParams) (*Assoc } type AssociateIpAddressResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Allocated string `json:"allocated"` Associatednetworkid string `json:"associatednetworkid"` @@ -197,6 +196,8 @@ type AssociateIpAddressResponse struct { Issourcenat bool `json:"issourcenat"` Isstaticnat bool `json:"isstaticnat"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` @@ -278,8 +279,9 @@ func (s *AddressService) DisassociateIpAddress(p *DisassociateIpAddressParams) ( } type DisassociateIpAddressResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -639,6 +641,8 @@ type PublicIpAddress struct { Issourcenat bool `json:"issourcenat"` Isstaticnat bool `json:"isstaticnat"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` @@ -748,7 +752,6 @@ func (s *AddressService) UpdateIpAddress(p *UpdateIpAddressParams) (*UpdateIpAdd } type UpdateIpAddressResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Allocated string `json:"allocated"` Associatednetworkid string `json:"associatednetworkid"` @@ -763,6 +766,8 @@ type UpdateIpAddressResponse struct { Issourcenat bool `json:"issourcenat"` Isstaticnat bool `json:"isstaticnat"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AffinityGroupService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AffinityGroupService.go index d81b54d05..87d28d85f 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AffinityGroupService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AffinityGroupService.go @@ -148,12 +148,13 @@ func (s *AffinityGroupService) CreateAffinityGroup(p *CreateAffinityGroupParams) } type CreateAffinityGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Description string `json:"description"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -267,8 +268,9 @@ func (s *AffinityGroupService) DeleteAffinityGroup(p *DeleteAffinityGroupParams) } type DeleteAffinityGroupResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -348,7 +350,9 @@ type ListAffinityGroupTypesResponse struct { } type AffinityGroupType struct { - Type string `json:"type"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Type string `json:"type"` } type ListAffinityGroupsParams struct { @@ -624,6 +628,8 @@ type AffinityGroup struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -723,7 +729,6 @@ func (s *AffinityGroupService) UpdateVMAffinityGroup(p *UpdateVMAffinityGroupPar } type UpdateVMAffinityGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []UpdateVMAffinityGroupResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -755,6 +760,8 @@ type UpdateVMAffinityGroupResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -764,7 +771,7 @@ type UpdateVMAffinityGroupResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -778,6 +785,7 @@ type UpdateVMAffinityGroupResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -829,3 +837,30 @@ type UpdateVMAffinityGroupResponseAffinitygroup struct { Type string `json:"type"` VirtualmachineIds []string `json:"virtualmachineIds"` } + +func (r *UpdateVMAffinityGroupResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateVMAffinityGroupResponse + return json.Unmarshal(b, (*alias)(r)) +} diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AlertService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AlertService.go index e6fb54118..8202e9631 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AlertService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AlertService.go @@ -106,6 +106,8 @@ func (s *AlertService) ArchiveAlerts(p *ArchiveAlertsParams) (*ArchiveAlertsResp type ArchiveAlertsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -124,6 +126,14 @@ func (r *ArchiveAlertsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias ArchiveAlertsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -210,6 +220,8 @@ func (s *AlertService) DeleteAlerts(p *DeleteAlertsParams) (*DeleteAlertsRespons type DeleteAlertsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -228,6 +240,14 @@ func (r *DeleteAlertsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteAlertsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -342,8 +362,9 @@ func (s *AlertService) GenerateAlert(p *GenerateAlertParams) (*GenerateAlertResp } type GenerateAlertResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -541,6 +562,8 @@ type ListAlertsResponse struct { type Alert struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Sent string `json:"sent"` Type int `json:"type"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AsyncjobService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AsyncjobService.go index 93c1fa049..20ad3b0a9 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AsyncjobService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AsyncjobService.go @@ -158,7 +158,9 @@ 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"` @@ -229,7 +231,9 @@ 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"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AuthenticationService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AuthenticationService.go index 7842d049a..aa886fed8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AuthenticationService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AuthenticationService.go @@ -108,6 +108,8 @@ type LoginResponse struct { Account string `json:"account"` Domainid string `json:"domainid"` Firstname string `json:"firstname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Registered string `json:"registered"` Sessionkey string `json:"sessionkey"` @@ -156,4 +158,6 @@ func (s *AuthenticationService) Logout(p *LogoutParams) (*LogoutResponse, error) type LogoutResponse struct { Description string `json:"description"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AutoScaleService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AutoScaleService.go index fd18f87e7..ee6d8a0c6 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/AutoScaleService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/AutoScaleService.go @@ -130,7 +130,6 @@ func (s *AutoScaleService) CreateAutoScalePolicy(p *CreateAutoScalePolicyParams) } type CreateAutoScalePolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Action string `json:"action"` Conditions []string `json:"conditions"` @@ -138,6 +137,8 @@ type CreateAutoScalePolicyResponse struct { Domainid string `json:"domainid"` Duration int `json:"duration"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Quiettime int `json:"quiettime"` @@ -299,13 +300,14 @@ func (s *AutoScaleService) CreateAutoScaleVmGroup(p *CreateAutoScaleVmGroupParam } type CreateAutoScaleVmGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Interval int `json:"interval"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Maxmembers int `json:"maxmembers"` Minmembers int `json:"minmembers"` @@ -471,7 +473,6 @@ func (s *AutoScaleService) CreateAutoScaleVmProfile(p *CreateAutoScaleVmProfileP } type CreateAutoScaleVmProfileResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Autoscaleuserid string `json:"autoscaleuserid"` Destroyvmgraceperiod int `json:"destroyvmgraceperiod"` @@ -479,6 +480,8 @@ type CreateAutoScaleVmProfileResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Otherdeployparams string `json:"otherdeployparams"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -602,12 +605,13 @@ func (s *AutoScaleService) CreateCondition(p *CreateConditionParams) (*CreateCon } type CreateConditionResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Counter []string `json:"counter"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Relationaloperator string `json:"relationaloperator"` @@ -707,12 +711,13 @@ func (s *AutoScaleService) CreateCounter(p *CreateCounterParams) (*CreateCounter } type CreateCounterResponse struct { - JobID string `json:"jobid"` - Id string `json:"id"` - Name string `json:"name"` - Source string `json:"source"` - Value string `json:"value"` - Zoneid string `json:"zoneid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Source string `json:"source"` + Value string `json:"value"` + Zoneid string `json:"zoneid"` } type DeleteAutoScalePolicyParams struct { @@ -778,8 +783,9 @@ func (s *AutoScaleService) DeleteAutoScalePolicy(p *DeleteAutoScalePolicyParams) } type DeleteAutoScalePolicyResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -846,8 +852,9 @@ func (s *AutoScaleService) DeleteAutoScaleVmGroup(p *DeleteAutoScaleVmGroupParam } type DeleteAutoScaleVmGroupResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -914,8 +921,9 @@ func (s *AutoScaleService) DeleteAutoScaleVmProfile(p *DeleteAutoScaleVmProfileP } type DeleteAutoScaleVmProfileResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -982,8 +990,9 @@ func (s *AutoScaleService) DeleteCondition(p *DeleteConditionParams) (*DeleteCon } type DeleteConditionResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1050,8 +1059,9 @@ func (s *AutoScaleService) DeleteCounter(p *DeleteCounterParams) (*DeleteCounter } type DeleteCounterResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1123,13 +1133,14 @@ func (s *AutoScaleService) DisableAutoScaleVmGroup(p *DisableAutoScaleVmGroupPar } type DisableAutoScaleVmGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Interval int `json:"interval"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Maxmembers int `json:"maxmembers"` Minmembers int `json:"minmembers"` @@ -1209,13 +1220,14 @@ func (s *AutoScaleService) EnableAutoScaleVmGroup(p *EnableAutoScaleVmGroupParam } type EnableAutoScaleVmGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Interval int `json:"interval"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Maxmembers int `json:"maxmembers"` Minmembers int `json:"minmembers"` @@ -1433,6 +1445,8 @@ type AutoScalePolicy struct { Domainid string `json:"domainid"` Duration int `json:"duration"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Quiettime int `json:"quiettime"` @@ -1677,6 +1691,8 @@ type AutoScaleVmGroup struct { Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Interval int `json:"interval"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Maxmembers int `json:"maxmembers"` Minmembers int `json:"minmembers"` @@ -1928,6 +1944,8 @@ type AutoScaleVmProfile struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Otherdeployparams string `json:"otherdeployparams"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -2129,6 +2147,8 @@ type Condition struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Relationaloperator string `json:"relationaloperator"` @@ -2328,11 +2348,13 @@ type ListCountersResponse struct { } type Counter struct { - Id string `json:"id"` - Name string `json:"name"` - Source string `json:"source"` - Value string `json:"value"` - Zoneid string `json:"zoneid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Source string `json:"source"` + Value string `json:"value"` + Zoneid string `json:"zoneid"` } type UpdateAutoScalePolicyParams struct { @@ -2439,7 +2461,6 @@ func (s *AutoScaleService) UpdateAutoScalePolicy(p *UpdateAutoScalePolicyParams) } type UpdateAutoScalePolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Action string `json:"action"` Conditions []string `json:"conditions"` @@ -2447,6 +2468,8 @@ type UpdateAutoScalePolicyResponse struct { Domainid string `json:"domainid"` Duration int `json:"duration"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Quiettime int `json:"quiettime"` @@ -2603,13 +2626,14 @@ func (s *AutoScaleService) UpdateAutoScaleVmGroup(p *UpdateAutoScaleVmGroupParam } type UpdateAutoScaleVmGroupResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Interval int `json:"interval"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Maxmembers int `json:"maxmembers"` Minmembers int `json:"minmembers"` @@ -2762,7 +2786,6 @@ func (s *AutoScaleService) UpdateAutoScaleVmProfile(p *UpdateAutoScaleVmProfileP } type UpdateAutoScaleVmProfileResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Autoscaleuserid string `json:"autoscaleuserid"` Destroyvmgraceperiod int `json:"destroyvmgraceperiod"` @@ -2770,6 +2793,8 @@ type UpdateAutoScaleVmProfileResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Otherdeployparams string `json:"otherdeployparams"` Project string `json:"project"` Projectid string `json:"projectid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BaremetalService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BaremetalService.go index 2b8b9f20d..41877f4e4 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BaremetalService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BaremetalService.go @@ -138,9 +138,10 @@ func (s *BaremetalService) AddBaremetalDhcp(p *AddBaremetalDhcpParams) (*AddBare } type AddBaremetalDhcpResponse struct { - JobID string `json:"jobid"` Dhcpservertype string `json:"dhcpservertype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid string `json:"physicalnetworkid"` Provider string `json:"provider"` Url string `json:"url"` @@ -285,8 +286,13 @@ func (s *BaremetalService) AddBaremetalPxeKickStartServer(p *AddBaremetalPxeKick } type AddBaremetalPxeKickStartServerResponse struct { - JobID string `json:"jobid"` - Tftpdir string `json:"tftpdir"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Physicalnetworkid string `json:"physicalnetworkid"` + Provider string `json:"provider"` + Tftpdir string `json:"tftpdir"` + Url string `json:"url"` } type AddBaremetalPxePingServerParams struct { @@ -474,10 +480,15 @@ func (s *BaremetalService) AddBaremetalPxePingServer(p *AddBaremetalPxePingServe } type AddBaremetalPxePingServerResponse struct { + Id string `json:"id"` JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Physicalnetworkid string `json:"physicalnetworkid"` Pingdir string `json:"pingdir"` Pingstorageserverip string `json:"pingstorageserverip"` + Provider string `json:"provider"` Tftpdir string `json:"tftpdir"` + Url string `json:"url"` } type AddBaremetalRctParams struct { @@ -548,9 +559,10 @@ func (s *BaremetalService) AddBaremetalRct(p *AddBaremetalRctParams) (*AddBareme } type AddBaremetalRctResponse struct { - JobID string `json:"jobid"` - Id string `json:"id"` - Url string `json:"url"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Url string `json:"url"` } type DeleteBaremetalRctParams struct { @@ -616,8 +628,9 @@ func (s *BaremetalService) DeleteBaremetalRct(p *DeleteBaremetalRctParams) (*Del } type DeleteBaremetalRctResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -734,6 +747,8 @@ type ListBaremetalDhcpResponse struct { type BaremetalDhcp struct { Dhcpservertype string `json:"dhcpservertype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid string `json:"physicalnetworkid"` Provider string `json:"provider"` Url string `json:"url"` @@ -840,6 +855,8 @@ type ListBaremetalPxeServersResponse struct { type BaremetalPxeServer struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid string `json:"physicalnetworkid"` Provider string `json:"provider"` Url string `json:"url"` @@ -921,8 +938,10 @@ type ListBaremetalRctResponse struct { } type BaremetalRct struct { - Id string `json:"id"` - Url string `json:"url"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Url string `json:"url"` } type NotifyBaremetalProvisionDoneParams struct { @@ -988,7 +1007,8 @@ func (s *BaremetalService) NotifyBaremetalProvisionDone(p *NotifyBaremetalProvis } type NotifyBaremetalProvisionDoneResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BigSwitchBCFService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BigSwitchBCFService.go index e85b20730..3b88d5235 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BigSwitchBCFService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BigSwitchBCFService.go @@ -139,10 +139,11 @@ func (s *BigSwitchBCFService) AddBigSwitchBcfDevice(p *AddBigSwitchBcfDevicePara } type AddBigSwitchBcfDeviceResponse struct { - JobID string `json:"jobid"` Bcfdeviceid string `json:"bcfdeviceid"` Bigswitchdevicename string `json:"bigswitchdevicename"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nat bool `json:"nat"` Password string `json:"password"` Physicalnetworkid string `json:"physicalnetworkid"` @@ -213,8 +214,9 @@ func (s *BigSwitchBCFService) DeleteBigSwitchBcfDevice(p *DeleteBigSwitchBcfDevi } type DeleteBigSwitchBcfDeviceResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -319,6 +321,8 @@ type BigSwitchBcfDevice struct { Bcfdeviceid string `json:"bcfdeviceid"` Bigswitchdevicename string `json:"bigswitchdevicename"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nat bool `json:"nat"` Password string `json:"password"` Physicalnetworkid string `json:"physicalnetworkid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BrocadeVCSService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BrocadeVCSService.go index 297476709..a89df33e8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/BrocadeVCSService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/BrocadeVCSService.go @@ -127,9 +127,10 @@ func (s *BrocadeVCSService) AddBrocadeVcsDevice(p *AddBrocadeVcsDeviceParams) (* } type AddBrocadeVcsDeviceResponse struct { - JobID string `json:"jobid"` Brocadedevicename string `json:"brocadedevicename"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid string `json:"physicalnetworkid"` Provider string `json:"provider"` Vcsdeviceid string `json:"vcsdeviceid"` @@ -198,8 +199,9 @@ func (s *BrocadeVCSService) DeleteBrocadeVcsDevice(p *DeleteBrocadeVcsDevicePara } type DeleteBrocadeVcsDeviceResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -349,6 +351,8 @@ type BrocadeVcsDeviceNetwork struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -502,6 +506,8 @@ type ListBrocadeVcsDevicesResponse struct { type BrocadeVcsDevice struct { Brocadedevicename string `json:"brocadedevicename"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid string `json:"physicalnetworkid"` Provider string `json:"provider"` Vcsdeviceid string `json:"vcsdeviceid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/CertificateService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/CertificateService.go index 196b961e4..46ea6f1eb 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/CertificateService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/CertificateService.go @@ -136,6 +136,7 @@ func (s *CertificateService) UploadCustomCertificate(p *UploadCustomCertificateP } type UploadCustomCertificateResponse struct { - JobID string `json:"jobid"` - Message string `json:"message"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Message string `json:"message"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/CloudIdentifierService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/CloudIdentifierService.go index 40d70aa92..5da8af1fa 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/CloudIdentifierService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/CloudIdentifierService.go @@ -70,6 +70,8 @@ func (s *CloudIdentifierService) GetCloudIdentifier(p *GetCloudIdentifierParams) type GetCloudIdentifierResponse struct { Cloudidentifier string `json:"cloudidentifier"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Signature string `json:"signature"` Userid string `json:"userid"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ClusterService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ClusterService.go index 8ad5cfce3..9a3c15d2e 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ClusterService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ClusterService.go @@ -280,6 +280,8 @@ type AddClusterResponse struct { Cpuovercommitratio string `json:"cpuovercommitratio"` Hypervisortype string `json:"hypervisortype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Managedstate string `json:"managedstate"` Memoryovercommitratio string `json:"memoryovercommitratio"` Name string `json:"name"` @@ -397,13 +399,14 @@ func (s *ClusterService) DedicateCluster(p *DedicateClusterParams) (*DedicateClu } type DedicateClusterResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Affinitygroupid string `json:"affinitygroupid"` Clusterid string `json:"clusterid"` Clustername string `json:"clustername"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type DeleteClusterParams struct { @@ -455,6 +458,8 @@ func (s *ClusterService) DeleteCluster(p *DeleteClusterParams) (*DeleteClusterRe type DeleteClusterResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -473,6 +478,14 @@ func (r *DeleteClusterResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteClusterResponse return json.Unmarshal(b, (*alias)(r)) } @@ -545,13 +558,14 @@ func (s *ClusterService) DisableOutOfBandManagementForCluster(p *DisableOutOfBan } type DisableOutOfBandManagementForClusterResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -627,13 +641,14 @@ func (s *ClusterService) EnableOutOfBandManagementForCluster(p *EnableOutOfBandM } type EnableOutOfBandManagementForClusterResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -906,6 +921,8 @@ type Cluster struct { Cpuovercommitratio string `json:"cpuovercommitratio"` Hypervisortype string `json:"hypervisortype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Managedstate string `json:"managedstate"` Memoryovercommitratio string `json:"memoryovercommitratio"` Name string `json:"name"` @@ -1058,6 +1075,8 @@ type DedicatedCluster struct { Clustername string `json:"clustername"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type ReleaseDedicatedClusterParams struct { @@ -1123,8 +1142,9 @@ func (s *ClusterService) ReleaseDedicatedCluster(p *ReleaseDedicatedClusterParam } type ReleaseDedicatedClusterResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1237,6 +1257,8 @@ type UpdateClusterResponse struct { Cpuovercommitratio string `json:"cpuovercommitratio"` Hypervisortype string `json:"hypervisortype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Managedstate string `json:"managedstate"` Memoryovercommitratio string `json:"memoryovercommitratio"` Name string `json:"name"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ConfigurationService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ConfigurationService.go index 2f87a3cbe..93f8d2f27 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ConfigurationService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ConfigurationService.go @@ -72,6 +72,8 @@ type Capability struct { Customdiskofferingmaxsize int64 `json:"customdiskofferingmaxsize"` Customdiskofferingminsize int64 `json:"customdiskofferingminsize"` Dynamicrolesenabled bool `json:"dynamicrolesenabled"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Kvmsnapshotenabled bool `json:"kvmsnapshotenabled"` Projectinviterequired bool `json:"projectinviterequired"` Regionsecondaryenabled bool `json:"regionsecondaryenabled"` @@ -247,6 +249,8 @@ type Configuration struct { Category string `json:"category"` Description string `json:"description"` Id int64 `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Scope string `json:"scope"` Value string `json:"value"` @@ -328,7 +332,9 @@ type ListDeploymentPlannersResponse struct { } type DeploymentPlanner struct { - Name string `json:"name"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type UpdateConfigurationParams struct { @@ -459,6 +465,8 @@ type UpdateConfigurationResponse struct { Category string `json:"category"` Description string `json:"description"` Id int64 `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Scope string `json:"scope"` Value string `json:"value"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/DiskOfferingService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/DiskOfferingService.go index 9e529ee16..f71d646f8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/DiskOfferingService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/DiskOfferingService.go @@ -37,10 +37,26 @@ func (p *CreateDiskOfferingParams) toURLValues() url.Values { vv := strconv.FormatInt(v.(int64), 10) u.Set("bytesreadrate", vv) } + if v, found := p.p["bytesreadratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("bytesreadratemax", vv) + } + if v, found := p.p["bytesreadratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("bytesreadratemaxlength", vv) + } if v, found := p.p["byteswriterate"]; found { vv := strconv.FormatInt(v.(int64), 10) u.Set("byteswriterate", vv) } + if v, found := p.p["byteswriteratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("byteswriteratemax", vv) + } + if v, found := p.p["byteswriteratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("byteswriteratemaxlength", vv) + } if v, found := p.p["customized"]; found { vv := strconv.FormatBool(v.(bool)) u.Set("customized", vv) @@ -71,10 +87,26 @@ func (p *CreateDiskOfferingParams) toURLValues() url.Values { vv := strconv.FormatInt(v.(int64), 10) u.Set("iopsreadrate", vv) } + if v, found := p.p["iopsreadratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopsreadratemax", vv) + } + if v, found := p.p["iopsreadratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopsreadratemaxlength", vv) + } if v, found := p.p["iopswriterate"]; found { vv := strconv.FormatInt(v.(int64), 10) u.Set("iopswriterate", vv) } + if v, found := p.p["iopswriteratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopswriteratemax", vv) + } + if v, found := p.p["iopswriteratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopswriteratemaxlength", vv) + } if v, found := p.p["maxiops"]; found { vv := strconv.FormatInt(v.(int64), 10) u.Set("maxiops", vv) @@ -106,6 +138,22 @@ func (p *CreateDiskOfferingParams) SetBytesreadrate(v int64) { return } +func (p *CreateDiskOfferingParams) SetBytesreadratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["bytesreadratemax"] = v + return +} + +func (p *CreateDiskOfferingParams) SetBytesreadratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["bytesreadratemaxlength"] = v + return +} + func (p *CreateDiskOfferingParams) SetByteswriterate(v int64) { if p.p == nil { p.p = make(map[string]interface{}) @@ -114,6 +162,22 @@ func (p *CreateDiskOfferingParams) SetByteswriterate(v int64) { return } +func (p *CreateDiskOfferingParams) SetByteswriteratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["byteswriteratemax"] = v + return +} + +func (p *CreateDiskOfferingParams) SetByteswriteratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["byteswriteratemaxlength"] = v + return +} + func (p *CreateDiskOfferingParams) SetCustomized(v bool) { if p.p == nil { p.p = make(map[string]interface{}) @@ -178,6 +242,22 @@ func (p *CreateDiskOfferingParams) SetIopsreadrate(v int64) { return } +func (p *CreateDiskOfferingParams) SetIopsreadratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopsreadratemax"] = v + return +} + +func (p *CreateDiskOfferingParams) SetIopsreadratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopsreadratemaxlength"] = v + return +} + func (p *CreateDiskOfferingParams) SetIopswriterate(v int64) { if p.p == nil { p.p = make(map[string]interface{}) @@ -186,6 +266,22 @@ func (p *CreateDiskOfferingParams) SetIopswriterate(v int64) { return } +func (p *CreateDiskOfferingParams) SetIopswriteratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopswriteratemax"] = v + return +} + +func (p *CreateDiskOfferingParams) SetIopswriteratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopswriteratemaxlength"] = v + return +} + func (p *CreateDiskOfferingParams) SetMaxiops(v int64) { if p.p == nil { p.p = make(map[string]interface{}) @@ -260,27 +356,37 @@ func (s *DiskOfferingService) CreateDiskOffering(p *CreateDiskOfferingParams) (* } type CreateDiskOfferingResponse struct { - CacheMode string `json:"cacheMode"` - Created string `json:"created"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Disksize int64 `json:"disksize"` - Displayoffering bool `json:"displayoffering"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Maxiops int64 `json:"maxiops"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Provisioningtype string `json:"provisioningtype"` - Storagetype string `json:"storagetype"` - Tags string `json:"tags"` + CacheMode string `json:"cacheMode"` + Created string `json:"created"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Disksize int64 `json:"disksize"` + Displayoffering bool `json:"displayoffering"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Maxiops int64 `json:"maxiops"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Provisioningtype string `json:"provisioningtype"` + Storagetype string `json:"storagetype"` + Tags string `json:"tags"` } type DeleteDiskOfferingParams struct { @@ -332,6 +438,8 @@ func (s *DiskOfferingService) DeleteDiskOffering(p *DeleteDiskOfferingParams) (* type DeleteDiskOfferingResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -350,6 +458,14 @@ func (r *DeleteDiskOfferingResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteDiskOfferingResponse return json.Unmarshal(b, (*alias)(r)) } @@ -570,27 +686,37 @@ type ListDiskOfferingsResponse struct { } type DiskOffering struct { - CacheMode string `json:"cacheMode"` - Created string `json:"created"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Disksize int64 `json:"disksize"` - Displayoffering bool `json:"displayoffering"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Maxiops int64 `json:"maxiops"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Provisioningtype string `json:"provisioningtype"` - Storagetype string `json:"storagetype"` - Tags string `json:"tags"` + CacheMode string `json:"cacheMode"` + Created string `json:"created"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Disksize int64 `json:"disksize"` + Displayoffering bool `json:"displayoffering"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Maxiops int64 `json:"maxiops"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Provisioningtype string `json:"provisioningtype"` + Storagetype string `json:"storagetype"` + Tags string `json:"tags"` } type UpdateDiskOfferingParams struct { @@ -687,25 +813,35 @@ func (s *DiskOfferingService) UpdateDiskOffering(p *UpdateDiskOfferingParams) (* } type UpdateDiskOfferingResponse struct { - CacheMode string `json:"cacheMode"` - Created string `json:"created"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Disksize int64 `json:"disksize"` - Displayoffering bool `json:"displayoffering"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Maxiops int64 `json:"maxiops"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Provisioningtype string `json:"provisioningtype"` - Storagetype string `json:"storagetype"` - Tags string `json:"tags"` + CacheMode string `json:"cacheMode"` + Created string `json:"created"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Disksize int64 `json:"disksize"` + Displayoffering bool `json:"displayoffering"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Maxiops int64 `json:"maxiops"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Provisioningtype string `json:"provisioningtype"` + Storagetype string `json:"storagetype"` + Tags string `json:"tags"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/DomainService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/DomainService.go index 5aff9933e..fdf26044f 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/DomainService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/DomainService.go @@ -113,6 +113,8 @@ type CreateDomainResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Level int `json:"level"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` @@ -227,8 +229,9 @@ func (s *DomainService) DeleteDomain(p *DeleteDomainParams) (*DeleteDomainRespon } type DeleteDomainResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -445,6 +448,8 @@ type DomainChildren struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Level int `json:"level"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` @@ -709,6 +714,8 @@ type Domain struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Level int `json:"level"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` @@ -826,6 +833,8 @@ type UpdateDomainResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Level int `json:"level"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/EventService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/EventService.go index f1cd41c2a..243ada4fa 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/EventService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/EventService.go @@ -106,6 +106,8 @@ func (s *EventService) ArchiveEvents(p *ArchiveEventsParams) (*ArchiveEventsResp type ArchiveEventsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -124,6 +126,14 @@ func (r *ArchiveEventsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias ArchiveEventsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -210,6 +220,8 @@ func (s *EventService) DeleteEvents(p *DeleteEventsParams) (*DeleteEventsRespons type DeleteEventsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -228,6 +240,14 @@ func (r *DeleteEventsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteEventsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -273,7 +293,9 @@ type ListEventTypesResponse struct { } type EventType struct { - Name string `json:"name"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type ListEventsParams struct { @@ -538,6 +560,8 @@ type Event struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Level string `json:"level"` Parentid string `json:"parentid"` Project string `json:"project"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/FirewallService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/FirewallService.go index 4c4f85b6b..766b7748c 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/FirewallService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/FirewallService.go @@ -195,12 +195,13 @@ func (s *FirewallService) AddPaloAltoFirewall(p *AddPaloAltoFirewallParams) (*Ad } type AddPaloAltoFirewallResponse struct { - JobID string `json:"jobid"` Fwdevicecapacity int64 `json:"fwdevicecapacity"` Fwdeviceid string `json:"fwdeviceid"` Fwdevicename string `json:"fwdevicename"` Fwdevicestate string `json:"fwdevicestate"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Numretries string `json:"numretries"` Physicalnetworkid string `json:"physicalnetworkid"` Privateinterface string `json:"privateinterface"` @@ -299,12 +300,13 @@ func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewall } type PaloAltoFirewallResponse struct { - JobID string `json:"jobid"` Fwdevicecapacity int64 `json:"fwdevicecapacity"` Fwdeviceid string `json:"fwdeviceid"` Fwdevicename string `json:"fwdevicename"` Fwdevicestate string `json:"fwdevicestate"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Numretries string `json:"numretries"` Physicalnetworkid string `json:"physicalnetworkid"` Privateinterface string `json:"privateinterface"` @@ -498,7 +500,6 @@ func (s *FirewallService) CreateEgressFirewallRule(p *CreateEgressFirewallRulePa } type CreateEgressFirewallRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Destcidrlist string `json:"destcidrlist"` Endport int `json:"endport"` @@ -508,6 +509,8 @@ type CreateEgressFirewallRuleResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -683,7 +686,6 @@ func (s *FirewallService) CreateFirewallRule(p *CreateFirewallRuleParams) (*Crea } type CreateFirewallRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Destcidrlist string `json:"destcidrlist"` Endport int `json:"endport"` @@ -693,6 +695,8 @@ type CreateFirewallRuleResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -905,12 +909,13 @@ func (s *FirewallService) CreatePortForwardingRule(p *CreatePortForwardingRulePa } type CreatePortForwardingRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Privateendport string `json:"privateendport"` Privateport string `json:"privateport"` @@ -993,8 +998,9 @@ func (s *FirewallService) DeleteEgressFirewallRule(p *DeleteEgressFirewallRulePa } type DeleteEgressFirewallRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1066,8 +1072,9 @@ func (s *FirewallService) DeleteFirewallRule(p *DeleteFirewallRuleParams) (*Dele } type DeleteFirewallRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1139,8 +1146,9 @@ func (s *FirewallService) DeletePaloAltoFirewall(p *DeletePaloAltoFirewallParams } type DeletePaloAltoFirewallResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1212,8 +1220,9 @@ func (s *FirewallService) DeletePortForwardingRule(p *DeletePortForwardingRulePa } type DeletePortForwardingRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1458,6 +1467,8 @@ type EgressFirewallRule struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -1706,6 +1717,8 @@ type FirewallRule struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -1821,6 +1834,8 @@ type PaloAltoFirewall struct { Fwdevicename string `json:"fwdevicename"` Fwdevicestate string `json:"fwdevicestate"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Numretries string `json:"numretries"` Physicalnetworkid string `json:"physicalnetworkid"` Privateinterface string `json:"privateinterface"` @@ -2071,6 +2086,8 @@ type PortForwardingRule struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Privateendport string `json:"privateendport"` Privateport string `json:"privateport"` @@ -2181,7 +2198,6 @@ func (s *FirewallService) UpdateEgressFirewallRule(p *UpdateEgressFirewallRulePa } type UpdateEgressFirewallRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Destcidrlist string `json:"destcidrlist"` Endport int `json:"endport"` @@ -2191,6 +2207,8 @@ type UpdateEgressFirewallRuleResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -2294,7 +2312,6 @@ func (s *FirewallService) UpdateFirewallRule(p *UpdateFirewallRuleParams) (*Upda } type UpdateFirewallRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Destcidrlist string `json:"destcidrlist"` Endport int `json:"endport"` @@ -2304,6 +2321,8 @@ type UpdateFirewallRuleResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Protocol string `json:"protocol"` Startport int `json:"startport"` @@ -2453,12 +2472,13 @@ func (s *FirewallService) UpdatePortForwardingRule(p *UpdatePortForwardingRulePa } type UpdatePortForwardingRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Privateendport string `json:"privateendport"` Privateport string `json:"privateport"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/GuestOSService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/GuestOSService.go index 9e6a67236..b2cacbc9b 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/GuestOSService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/GuestOSService.go @@ -131,10 +131,11 @@ func (s *GuestOSService) AddGuestOs(p *AddGuestOsParams) (*AddGuestOsResponse, e } type AddGuestOsResponse struct { - JobID string `json:"jobid"` Description string `json:"description"` Id string `json:"id"` Isuserdefined bool `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Oscategoryid string `json:"oscategoryid"` } @@ -252,16 +253,44 @@ func (s *GuestOSService) AddGuestOsMapping(p *AddGuestOsMappingParams) (*AddGues } type AddGuestOsMappingResponse struct { - JobID string `json:"jobid"` Hypervisor string `json:"hypervisor"` Hypervisorversion string `json:"hypervisorversion"` Id string `json:"id"` Isuserdefined string `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Osdisplayname string `json:"osdisplayname"` Osnameforhypervisor string `json:"osnameforhypervisor"` Ostypeid string `json:"ostypeid"` } +func (r *AddGuestOsMappingResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias AddGuestOsMappingResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ListGuestOsMappingParams struct { p map[string]interface{} } @@ -419,11 +448,40 @@ type GuestOsMapping struct { Hypervisorversion string `json:"hypervisorversion"` Id string `json:"id"` Isuserdefined string `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Osdisplayname string `json:"osdisplayname"` Osnameforhypervisor string `json:"osnameforhypervisor"` Ostypeid string `json:"ostypeid"` } +func (r *GuestOsMapping) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias GuestOsMapping + return json.Unmarshal(b, (*alias)(r)) +} + type ListOsCategoriesParams struct { p map[string]interface{} } @@ -605,8 +663,10 @@ type ListOsCategoriesResponse struct { } type OsCategory struct { - Id string `json:"id"` - Name string `json:"name"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type ListOsTypesParams struct { @@ -754,6 +814,8 @@ type OsType struct { Description string `json:"description"` Id string `json:"id"` Isuserdefined bool `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Oscategoryid string `json:"oscategoryid"` } @@ -820,8 +882,9 @@ func (s *GuestOSService) RemoveGuestOs(p *RemoveGuestOsParams) (*RemoveGuestOsRe } type RemoveGuestOsResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -888,8 +951,9 @@ func (s *GuestOSService) RemoveGuestOsMapping(p *RemoveGuestOsMappingParams) (*R } type RemoveGuestOsMappingResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -989,10 +1053,11 @@ func (s *GuestOSService) UpdateGuestOs(p *UpdateGuestOsParams) (*UpdateGuestOsRe } type UpdateGuestOsResponse struct { - JobID string `json:"jobid"` Description string `json:"description"` Id string `json:"id"` Isuserdefined bool `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Oscategoryid string `json:"oscategoryid"` } @@ -1076,12 +1141,40 @@ func (s *GuestOSService) UpdateGuestOsMapping(p *UpdateGuestOsMappingParams) (*U } type UpdateGuestOsMappingResponse struct { - JobID string `json:"jobid"` Hypervisor string `json:"hypervisor"` Hypervisorversion string `json:"hypervisorversion"` Id string `json:"id"` Isuserdefined string `json:"isuserdefined"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Osdisplayname string `json:"osdisplayname"` Osnameforhypervisor string `json:"osnameforhypervisor"` Ostypeid string `json:"ostypeid"` } + +func (r *UpdateGuestOsMappingResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateGuestOsMappingResponse + return json.Unmarshal(b, (*alias)(r)) +} diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/HostService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/HostService.go index a5e6f3590..7ce06f547 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/HostService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/HostService.go @@ -216,6 +216,8 @@ type AddBaremetalHostResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -357,8 +359,9 @@ func (s *HostService) AddGloboDnsHost(p *AddGloboDnsHostParams) (*AddGloboDnsHos } type AddGloboDnsHostResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -543,6 +546,8 @@ type AddHostResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -645,6 +650,8 @@ func (s *HostService) AddSecondaryStorage(p *AddSecondaryStorageParams) (*AddSec type AddSecondaryStorageResponse struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -722,7 +729,6 @@ func (s *HostService) CancelHostMaintenance(p *CancelHostMaintenanceParams) (*Ca } type CancelHostMaintenanceResponse struct { - JobID string `json:"jobid"` Annotation string `json:"annotation"` Averageload int64 `json:"averageload"` Capabilities string `json:"capabilities"` @@ -751,6 +757,8 @@ type CancelHostMaintenanceResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -884,13 +892,14 @@ func (s *HostService) DedicateHost(p *DedicateHostParams) (*DedicateHostResponse } type DedicateHostResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Affinitygroupid string `json:"affinitygroupid"` Domainid string `json:"domainid"` Hostid string `json:"hostid"` Hostname string `json:"hostname"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type DeleteHostParams struct { @@ -966,6 +975,8 @@ func (s *HostService) DeleteHost(p *DeleteHostParams) (*DeleteHostResponse, erro type DeleteHostResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -984,6 +995,14 @@ func (r *DeleteHostResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteHostResponse return json.Unmarshal(b, (*alias)(r)) } @@ -1056,13 +1075,14 @@ func (s *HostService) DisableOutOfBandManagementForHost(p *DisableOutOfBandManag } type DisableOutOfBandManagementForHostResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -1138,13 +1158,14 @@ func (s *HostService) EnableOutOfBandManagementForHost(p *EnableOutOfBandManagem } type EnableOutOfBandManagementForHostResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -1258,6 +1279,8 @@ type FindHostsForMigrationResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` Memoryallocated string `json:"memoryallocated"` @@ -1408,6 +1431,8 @@ type DedicatedHost struct { Hostid string `json:"hostid"` Hostname string `json:"hostname"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type ListHostTagsParams struct { @@ -1522,9 +1547,11 @@ type ListHostTagsResponse struct { } type HostTag struct { - Hostid int64 `json:"hostid"` - Id string `json:"id"` - Name string `json:"name"` + Hostid int64 `json:"hostid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type ListHostsParams struct { @@ -1871,6 +1898,8 @@ type Host struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -1981,7 +2010,6 @@ func (s *HostService) PrepareHostForMaintenance(p *PrepareHostForMaintenancePara } type PrepareHostForMaintenanceResponse struct { - JobID string `json:"jobid"` Annotation string `json:"annotation"` Averageload int64 `json:"averageload"` Capabilities string `json:"capabilities"` @@ -2010,6 +2038,8 @@ type PrepareHostForMaintenanceResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -2120,7 +2150,6 @@ func (s *HostService) ReconnectHost(p *ReconnectHostParams) (*ReconnectHostRespo } type ReconnectHostResponse struct { - JobID string `json:"jobid"` Annotation string `json:"annotation"` Averageload int64 `json:"averageload"` Capabilities string `json:"capabilities"` @@ -2149,6 +2178,8 @@ type ReconnectHostResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -2254,8 +2285,9 @@ func (s *HostService) ReleaseDedicatedHost(p *ReleaseDedicatedHostParams) (*Rele } type ReleaseDedicatedHostResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2322,8 +2354,9 @@ func (s *HostService) ReleaseHostReservation(p *ReleaseHostReservationParams) (* } type ReleaseHostReservationResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2459,6 +2492,8 @@ type UpdateHostResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Islocalstorageactive bool `json:"islocalstorageactive"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastannotated string `json:"lastannotated"` Lastpinged string `json:"lastpinged"` Managementserverid int64 `json:"managementserverid"` @@ -2596,6 +2631,8 @@ func (s *HostService) UpdateHostPassword(p *UpdateHostPasswordParams) (*UpdateHo type UpdateHostPasswordResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2614,6 +2651,14 @@ func (r *UpdateHostPasswordResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias UpdateHostPasswordResponse return json.Unmarshal(b, (*alias)(r)) } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go index c457b3092..5085dbd84 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go @@ -158,6 +158,8 @@ type HypervisorCapability struct { Hypervisor string `json:"hypervisor"` Hypervisorversion string `json:"hypervisorversion"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxdatavolumeslimit int `json:"maxdatavolumeslimit"` Maxguestslimit int64 `json:"maxguestslimit"` Maxhostspercluster int `json:"maxhostspercluster"` @@ -217,7 +219,9 @@ type ListHypervisorsResponse struct { } type Hypervisor struct { - Name string `json:"name"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type UpdateHypervisorCapabilitiesParams struct { @@ -294,6 +298,8 @@ type UpdateHypervisorCapabilitiesResponse struct { Hypervisor string `json:"hypervisor"` Hypervisorversion string `json:"hypervisorversion"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxdatavolumeslimit int `json:"maxdatavolumeslimit"` Maxguestslimit int64 `json:"maxguestslimit"` Maxhostspercluster int `json:"maxhostspercluster"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ISOService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ISOService.go index 96db4bf5f..9c1c4f862 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ISOService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ISOService.go @@ -104,7 +104,6 @@ func (s *ISOService) AttachIso(p *AttachIsoParams) (*AttachIsoResponse, error) { } type AttachIsoResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []AttachIsoResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -136,6 +135,8 @@ type AttachIsoResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -145,7 +146,7 @@ type AttachIsoResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -159,6 +160,7 @@ type AttachIsoResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -211,6 +213,33 @@ type AttachIsoResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *AttachIsoResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias AttachIsoResponse + return json.Unmarshal(b, (*alias)(r)) +} + type CopyIsoParams struct { p map[string]interface{} } @@ -313,7 +342,6 @@ func (s *ISOService) CopyIso(p *CopyIsoParams) (*CopyIsoResponse, error) { } type CopyIsoResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Accountid string `json:"accountid"` Bits int `json:"bits"` @@ -337,6 +365,8 @@ type CopyIsoResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -346,16 +376,45 @@ type CopyIsoResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *CopyIsoResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias CopyIsoResponse + return json.Unmarshal(b, (*alias)(r)) +} + type DeleteIsoParams struct { p map[string]interface{} } @@ -430,8 +489,9 @@ func (s *ISOService) DeleteIso(p *DeleteIsoParams) (*DeleteIsoResponse, error) { } type DeleteIsoResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -503,7 +563,6 @@ func (s *ISOService) DetachIso(p *DetachIsoParams) (*DetachIsoResponse, error) { } type DetachIsoResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []DetachIsoResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -535,6 +594,8 @@ type DetachIsoResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -544,7 +605,7 @@ type DetachIsoResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -558,6 +619,7 @@ type DetachIsoResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -610,6 +672,33 @@ type DetachIsoResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *DetachIsoResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias DetachIsoResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ExtractIsoParams struct { p map[string]interface{} } @@ -712,12 +801,13 @@ func (s *ISOService) ExtractIso(p *ExtractIsoParams) (*ExtractIsoResponse, error } type ExtractIsoResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Created string `json:"created"` ExtractId string `json:"extractId"` ExtractMode string `json:"extractMode"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Resultstring string `json:"resultstring"` State string `json:"state"` @@ -819,6 +909,8 @@ type IsoPermission struct { Domainid string `json:"domainid"` Id string `json:"id"` Ispublic bool `json:"ispublic"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Projectids []string `json:"projectids"` } @@ -1182,6 +1274,8 @@ type Iso struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1191,16 +1285,45 @@ type Iso struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *Iso) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias Iso + return json.Unmarshal(b, (*alias)(r)) +} + type RegisterIsoParams struct { p map[string]interface{} } @@ -1255,6 +1378,10 @@ func (p *RegisterIsoParams) toURLValues() url.Values { if v, found := p.p["ostypeid"]; found { u.Set("ostypeid", v.(string)) } + if v, found := p.p["passwordenabled"]; found { + vv := strconv.FormatBool(v.(bool)) + u.Set("passwordenabled", vv) + } if v, found := p.p["projectid"]; found { u.Set("projectid", v.(string)) } @@ -1371,6 +1498,14 @@ func (p *RegisterIsoParams) SetOstypeid(v string) { return } +func (p *RegisterIsoParams) SetPasswordenabled(v bool) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["passwordenabled"] = v + return +} + func (p *RegisterIsoParams) SetProjectid(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1446,6 +1581,8 @@ type RegisterIsoResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1455,16 +1592,45 @@ type RegisterIsoResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *RegisterIsoResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RegisterIsoResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateIsoParams struct { p map[string]interface{} } @@ -1524,6 +1690,10 @@ func (p *UpdateIsoParams) toURLValues() url.Values { vv := strconv.Itoa(v.(int)) u.Set("sortkey", vv) } + if v, found := p.p["sshkeyenabled"]; found { + vv := strconv.FormatBool(v.(bool)) + u.Set("sshkeyenabled", vv) + } return u } @@ -1631,6 +1801,14 @@ func (p *UpdateIsoParams) SetSortkey(v int) { return } +func (p *UpdateIsoParams) SetSshkeyenabled(v bool) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["sshkeyenabled"] = v + return +} + // You should always use this function to get a new UpdateIsoParams instance, // as then you are sure you have configured all required params func (s *ISOService) NewUpdateIsoParams(id string) *UpdateIsoParams { @@ -1679,6 +1857,8 @@ type UpdateIsoResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1688,16 +1868,45 @@ type UpdateIsoResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *UpdateIsoResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateIsoResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateIsoPermissionsParams struct { p map[string]interface{} } @@ -1818,6 +2027,8 @@ func (s *ISOService) UpdateIsoPermissions(p *UpdateIsoPermissionsParams) (*Updat type UpdateIsoPermissionsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1836,6 +2047,14 @@ func (r *UpdateIsoPermissionsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias UpdateIsoPermissionsResponse return json.Unmarshal(b, (*alias)(r)) } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ImageStoreService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ImageStoreService.go index 1f7b7fb76..62faac1e0 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ImageStoreService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ImageStoreService.go @@ -121,6 +121,8 @@ func (s *ImageStoreService) AddImageStore(p *AddImageStoreParams) (*AddImageStor type AddImageStoreResponse struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -298,6 +300,8 @@ func (s *ImageStoreService) AddImageStoreS3(p *AddImageStoreS3Params) (*AddImage type AddImageStoreS3Response struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -404,6 +408,8 @@ func (s *ImageStoreService) CreateSecondaryStagingStore(p *CreateSecondaryStagin type CreateSecondaryStagingStoreResponse struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -462,6 +468,8 @@ func (s *ImageStoreService) DeleteImageStore(p *DeleteImageStoreParams) (*Delete type DeleteImageStoreResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -480,6 +488,14 @@ func (r *DeleteImageStoreResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteImageStoreResponse return json.Unmarshal(b, (*alias)(r)) } @@ -533,6 +549,8 @@ func (s *ImageStoreService) DeleteSecondaryStagingStore(p *DeleteSecondaryStagin type DeleteSecondaryStagingStoreResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -551,6 +569,14 @@ func (r *DeleteSecondaryStagingStoreResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteSecondaryStagingStoreResponse return json.Unmarshal(b, (*alias)(r)) } @@ -770,6 +796,8 @@ type ListImageStoresResponse struct { type ImageStore struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -994,6 +1022,8 @@ type ListSecondaryStagingStoresResponse struct { type SecondaryStagingStore struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -1089,6 +1119,8 @@ func (s *ImageStoreService) UpdateCloudToUseObjectStore(p *UpdateCloudToUseObjec type UpdateCloudToUseObjectStoreResponse struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/InternalLBService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/InternalLBService.go index 64df1cd22..d68dde6e0 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/InternalLBService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/InternalLBService.go @@ -105,10 +105,11 @@ func (s *InternalLBService) ConfigureInternalLoadBalancerElement(p *ConfigureInt } type InternalLoadBalancerElementResponse struct { - JobID string `json:"jobid"` - Enabled bool `json:"enabled"` - Id string `json:"id"` - Nspid string `json:"nspid"` + Enabled bool `json:"enabled"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Nspid string `json:"nspid"` } type CreateInternalLoadBalancerElementParams struct { @@ -179,10 +180,11 @@ func (s *InternalLBService) CreateInternalLoadBalancerElement(p *CreateInternalL } type CreateInternalLoadBalancerElementResponse struct { - JobID string `json:"jobid"` - Enabled bool `json:"enabled"` - Id string `json:"id"` - Nspid string `json:"nspid"` + Enabled bool `json:"enabled"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Nspid string `json:"nspid"` } type ListInternalLoadBalancerElementsParams struct { @@ -328,9 +330,11 @@ type ListInternalLoadBalancerElementsResponse struct { } type InternalLoadBalancerElement struct { - Enabled bool `json:"enabled"` - Id string `json:"id"` - Nspid string `json:"nspid"` + Enabled bool `json:"enabled"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Nspid string `json:"nspid"` } type ListInternalLoadBalancerVMsParams struct { @@ -668,6 +672,8 @@ type InternalLoadBalancerVM struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -765,7 +771,6 @@ func (s *InternalLBService) StartInternalLoadBalancerVM(p *StartInternalLoadBala } type StartInternalLoadBalancerVMResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -785,6 +790,8 @@ type StartInternalLoadBalancerVMResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -894,7 +901,6 @@ func (s *InternalLBService) StopInternalLoadBalancerVM(p *StopInternalLoadBalanc } type StopInternalLoadBalancerVMResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -914,6 +920,8 @@ type StopInternalLoadBalancerVMResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LDAPService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LDAPService.go index baff7900d..1ebc024ae 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LDAPService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LDAPService.go @@ -95,9 +95,11 @@ func (s *LDAPService) AddLdapConfiguration(p *AddLdapConfigurationParams) (*AddL } type AddLdapConfigurationResponse struct { - Domainid string `json:"domainid"` - Hostname string `json:"hostname"` - Port int `json:"port"` + Domainid string `json:"domainid"` + Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Port int `json:"port"` } type DeleteLdapConfigurationParams struct { @@ -171,9 +173,11 @@ func (s *LDAPService) DeleteLdapConfiguration(p *DeleteLdapConfigurationParams) } type DeleteLdapConfigurationResponse struct { - Domainid string `json:"domainid"` - Hostname string `json:"hostname"` - Port int `json:"port"` + Domainid string `json:"domainid"` + Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Port int `json:"port"` } type ImportLdapUsersParams struct { @@ -333,6 +337,8 @@ type ImportLdapUsersResponse struct { Domain string `json:"domain"` Email string `json:"email"` Firstname string `json:"firstname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Principal string `json:"principal"` Username string `json:"username"` @@ -490,6 +496,8 @@ type LdapConfigResponse struct { Binddn string `json:"binddn"` Bindpass string `json:"bindpass"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Port string `json:"port"` Queryfilter string `json:"queryfilter"` Searchbase string `json:"searchbase"` @@ -664,6 +672,8 @@ type LdapCreateAccountResponse struct { Iptotal int64 `json:"iptotal"` Iscleanuprequired bool `json:"iscleanuprequired"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -770,6 +780,8 @@ type LdapRemoveResponse struct { Binddn string `json:"binddn"` Bindpass string `json:"bindpass"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Port string `json:"port"` Queryfilter string `json:"queryfilter"` Searchbase string `json:"searchbase"` @@ -885,6 +897,8 @@ type LinkDomainToLdapResponse struct { Accountid string `json:"accountid"` Accounttype int `json:"accounttype"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Ldapdomain string `json:"ldapdomain"` Name string `json:"name"` Type string `json:"type"` @@ -1000,9 +1014,11 @@ type ListLdapConfigurationsResponse struct { } type LdapConfiguration struct { - Domainid string `json:"domainid"` - Hostname string `json:"hostname"` - Port int `json:"port"` + Domainid string `json:"domainid"` + Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Port int `json:"port"` } type ListLdapUsersParams struct { @@ -1095,6 +1111,8 @@ type LdapUser struct { Domain string `json:"domain"` Email string `json:"email"` Firstname string `json:"firstname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Principal string `json:"principal"` Username string `json:"username"` @@ -1186,6 +1204,8 @@ type SearchLdapResponse struct { Domain string `json:"domain"` Email string `json:"email"` Firstname string `json:"firstname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Principal string `json:"principal"` Username string `json:"username"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LimitService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LimitService.go index 23512715b..7f8c99fff 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LimitService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LimitService.go @@ -63,6 +63,8 @@ type GetApiLimitResponse struct { ApiAllowed int `json:"apiAllowed"` ApiIssued int `json:"apiIssued"` ExpireAfter int64 `json:"expireAfter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type ListResourceLimitsParams struct { @@ -236,6 +238,8 @@ type ResourceLimit struct { Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Max int64 `json:"max"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -295,6 +299,8 @@ type ResetApiLimitResponse struct { ApiAllowed int `json:"apiAllowed"` ApiIssued int `json:"apiIssued"` ExpireAfter int64 `json:"expireAfter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type UpdateResourceCountParams struct { @@ -382,6 +388,8 @@ type UpdateResourceCountResponse struct { Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Resourcecount int64 `json:"resourcecount"` @@ -486,6 +494,8 @@ type UpdateResourceLimitResponse struct { Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Max int64 `json:"max"` Project string `json:"project"` Projectid string `json:"projectid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LoadBalancerService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LoadBalancerService.go index e74e3a3d4..08cf53bb1 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/LoadBalancerService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/LoadBalancerService.go @@ -186,12 +186,13 @@ func (s *LoadBalancerService) AddNetscalerLoadBalancer(p *AddNetscalerLoadBalanc } type AddNetscalerLoadBalancerResponse struct { - JobID string `json:"jobid"` Gslbprovider bool `json:"gslbprovider"` Gslbproviderprivateip string `json:"gslbproviderprivateip"` Gslbproviderpublicip string `json:"gslbproviderpublicip"` Ipaddress string `json:"ipaddress"` Isexclusivegslbprovider bool `json:"isexclusivegslbprovider"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbdevicecapacity int64 `json:"lbdevicecapacity"` Lbdevicededicated bool `json:"lbdevicededicated"` Lbdeviceid string `json:"lbdeviceid"` @@ -279,8 +280,9 @@ func (s *LoadBalancerService) AssignCertToLoadBalancer(p *AssignCertToLoadBalanc } type AssignCertToLoadBalancerResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -376,8 +378,9 @@ func (s *LoadBalancerService) AssignToGlobalLoadBalancerRule(p *AssignToGlobalLo } type AssignToGlobalLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -472,8 +475,9 @@ func (s *LoadBalancerService) AssignToLoadBalancerRule(p *AssignToLoadBalancerRu } type AssignToLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -593,12 +597,13 @@ func (s *LoadBalancerService) ConfigureNetscalerLoadBalancer(p *ConfigureNetscal } type NetscalerLoadBalancerResponse struct { - JobID string `json:"jobid"` Gslbprovider bool `json:"gslbprovider"` Gslbproviderprivateip string `json:"gslbproviderprivateip"` Gslbproviderpublicip string `json:"gslbproviderpublicip"` Ipaddress string `json:"ipaddress"` Isexclusivegslbprovider bool `json:"isexclusivegslbprovider"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbdevicecapacity int64 `json:"lbdevicecapacity"` Lbdevicededicated bool `json:"lbdevicededicated"` Lbdeviceid string `json:"lbdeviceid"` @@ -771,7 +776,6 @@ func (s *LoadBalancerService) CreateGlobalLoadBalancerRule(p *CreateGlobalLoadBa } type CreateGlobalLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Description string `json:"description"` Domain string `json:"domain"` @@ -781,6 +785,8 @@ type CreateGlobalLoadBalancerRuleResponse struct { Gslbservicetype string `json:"gslbservicetype"` Gslbstickysessionmethodname string `json:"gslbstickysessionmethodname"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerrule []CreateGlobalLoadBalancerRuleResponseLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` Project string `json:"project"` @@ -962,11 +968,12 @@ func (s *LoadBalancerService) CreateLBHealthCheckPolicy(p *CreateLBHealthCheckPo } type CreateLBHealthCheckPolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Healthcheckpolicy []CreateLBHealthCheckPolicyResponseHealthcheckpolicy `json:"healthcheckpolicy"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Zoneid string `json:"zoneid"` } @@ -1114,11 +1121,12 @@ func (s *LoadBalancerService) CreateLBStickinessPolicy(p *CreateLBStickinessPoli } type CreateLBStickinessPolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Description string `json:"description"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Name string `json:"name"` State string `json:"state"` @@ -1312,7 +1320,6 @@ func (s *LoadBalancerService) CreateLoadBalancer(p *CreateLoadBalancerParams) (* } type CreateLoadBalancerResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Algorithm string `json:"algorithm"` Description string `json:"description"` @@ -1320,6 +1327,8 @@ type CreateLoadBalancerResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerinstance []CreateLoadBalancerResponseLoadbalancerinstance `json:"loadbalancerinstance"` Loadbalancerrule []CreateLoadBalancerResponseLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` @@ -1563,7 +1572,6 @@ func (s *LoadBalancerService) CreateLoadBalancerRule(p *CreateLoadBalancerRulePa } type CreateLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Algorithm string `json:"algorithm"` Cidrlist string `json:"cidrlist"` @@ -1572,6 +1580,8 @@ type CreateLoadBalancerRuleResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkid string `json:"networkid"` Privateport string `json:"privateport"` @@ -1650,8 +1660,9 @@ func (s *LoadBalancerService) DeleteGlobalLoadBalancerRule(p *DeleteGlobalLoadBa } type DeleteGlobalLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1718,8 +1729,9 @@ func (s *LoadBalancerService) DeleteLBHealthCheckPolicy(p *DeleteLBHealthCheckPo } type DeleteLBHealthCheckPolicyResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1786,8 +1798,9 @@ func (s *LoadBalancerService) DeleteLBStickinessPolicy(p *DeleteLBStickinessPoli } type DeleteLBStickinessPolicyResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1854,8 +1867,9 @@ func (s *LoadBalancerService) DeleteLoadBalancer(p *DeleteLoadBalancerParams) (* } type DeleteLoadBalancerResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1922,8 +1936,9 @@ func (s *LoadBalancerService) DeleteLoadBalancerRule(p *DeleteLoadBalancerRulePa } type DeleteLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1990,8 +2005,9 @@ func (s *LoadBalancerService) DeleteNetscalerLoadBalancer(p *DeleteNetscalerLoad } type DeleteNetscalerLoadBalancerResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2044,6 +2060,8 @@ func (s *LoadBalancerService) DeleteSslCert(p *DeleteSslCertParams) (*DeleteSslC type DeleteSslCertResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2062,6 +2080,14 @@ func (r *DeleteSslCertResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteSslCertResponse return json.Unmarshal(b, (*alias)(r)) } @@ -2330,6 +2356,8 @@ type GlobalLoadBalancerRule struct { Gslbservicetype string `json:"gslbservicetype"` Gslbstickysessionmethodname string `json:"gslbstickysessionmethodname"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerrule []GlobalLoadBalancerRuleLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` Project string `json:"project"` @@ -2508,6 +2536,8 @@ type LBHealthCheckPolicy struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Healthcheckpolicy []LBHealthCheckPolicyHealthcheckpolicy `json:"healthcheckpolicy"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Zoneid string `json:"zoneid"` } @@ -2671,6 +2701,8 @@ type LBStickinessPolicy struct { Description string `json:"description"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Name string `json:"name"` State string `json:"state"` @@ -2834,6 +2866,8 @@ type ListLoadBalancerRuleInstancesResponse struct { } type LoadBalancerRuleInstance struct { + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbvmipaddresses []string `json:"lbvmipaddresses"` Loadbalancerruleinstance *VirtualMachine `json:"loadbalancerruleinstance"` } @@ -3156,6 +3190,8 @@ type LoadBalancerRule struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkid string `json:"networkid"` Privateport string `json:"privateport"` @@ -3488,6 +3524,8 @@ type LoadBalancer struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerinstance []LoadBalancerLoadbalancerinstance `json:"loadbalancerinstance"` Loadbalancerrule []LoadBalancerLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` @@ -3615,6 +3653,8 @@ type NetscalerLoadBalancer struct { Gslbproviderpublicip string `json:"gslbproviderpublicip"` Ipaddress string `json:"ipaddress"` Isexclusivegslbprovider bool `json:"isexclusivegslbprovider"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbdevicecapacity int64 `json:"lbdevicecapacity"` Lbdevicededicated bool `json:"lbdevicededicated"` Lbdeviceid string `json:"lbdeviceid"` @@ -3719,6 +3759,8 @@ type SslCert struct { Domainid string `json:"domainid"` Fingerprint string `json:"fingerprint"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerrulelist []string `json:"loadbalancerrulelist"` Name string `json:"name"` Project string `json:"project"` @@ -3788,8 +3830,9 @@ func (s *LoadBalancerService) RemoveCertFromLoadBalancer(p *RemoveCertFromLoadBa } type RemoveCertFromLoadBalancerResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -3869,8 +3912,9 @@ func (s *LoadBalancerService) RemoveFromGlobalLoadBalancerRule(p *RemoveFromGlob } type RemoveFromGlobalLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -3965,8 +4009,9 @@ func (s *LoadBalancerService) RemoveFromLoadBalancerRule(p *RemoveFromLoadBalanc } type RemoveFromLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -4071,7 +4116,6 @@ func (s *LoadBalancerService) UpdateGlobalLoadBalancerRule(p *UpdateGlobalLoadBa } type UpdateGlobalLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Description string `json:"description"` Domain string `json:"domain"` @@ -4081,6 +4125,8 @@ type UpdateGlobalLoadBalancerRuleResponse struct { Gslbservicetype string `json:"gslbservicetype"` Gslbstickysessionmethodname string `json:"gslbstickysessionmethodname"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerrule []UpdateGlobalLoadBalancerRuleResponseLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` Project string `json:"project"` @@ -4203,11 +4249,12 @@ func (s *LoadBalancerService) UpdateLBHealthCheckPolicy(p *UpdateLBHealthCheckPo } type UpdateLBHealthCheckPolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Healthcheckpolicy []UpdateLBHealthCheckPolicyResponseHealthcheckpolicy `json:"healthcheckpolicy"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Zoneid string `json:"zoneid"` } @@ -4315,11 +4362,12 @@ func (s *LoadBalancerService) UpdateLBStickinessPolicy(p *UpdateLBStickinessPoli } type UpdateLBStickinessPolicyResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Description string `json:"description"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lbruleid string `json:"lbruleid"` Name string `json:"name"` State string `json:"state"` @@ -4428,7 +4476,6 @@ func (s *LoadBalancerService) UpdateLoadBalancer(p *UpdateLoadBalancerParams) (* } type UpdateLoadBalancerResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Algorithm string `json:"algorithm"` Description string `json:"description"` @@ -4436,6 +4483,8 @@ type UpdateLoadBalancerResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerinstance []UpdateLoadBalancerResponseLoadbalancerinstance `json:"loadbalancerinstance"` Loadbalancerrule []UpdateLoadBalancerResponseLoadbalancerrule `json:"loadbalancerrule"` Name string `json:"name"` @@ -4595,7 +4644,6 @@ func (s *LoadBalancerService) UpdateLoadBalancerRule(p *UpdateLoadBalancerRulePa } type UpdateLoadBalancerRuleResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Algorithm string `json:"algorithm"` Cidrlist string `json:"cidrlist"` @@ -4604,6 +4652,8 @@ type UpdateLoadBalancerRuleResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkid string `json:"networkid"` Privateport string `json:"privateport"` @@ -4753,6 +4803,8 @@ type UploadSslCertResponse struct { Domainid string `json:"domainid"` Fingerprint string `json:"fingerprint"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Loadbalancerrulelist []string `json:"loadbalancerrulelist"` Name string `json:"name"` Project string `json:"project"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NATService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NATService.go index 714dfa590..f8c56c645 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NATService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NATService.go @@ -153,12 +153,13 @@ func (s *NATService) CreateIpForwardingRule(p *CreateIpForwardingRuleParams) (*C } type CreateIpForwardingRuleResponse struct { - JobID string `json:"jobid"` Cidrlist string `json:"cidrlist"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Privateendport string `json:"privateendport"` Privateport string `json:"privateport"` @@ -236,8 +237,9 @@ func (s *NATService) DeleteIpForwardingRule(p *DeleteIpForwardingRuleParams) (*D } type DeleteIpForwardingRuleResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -304,8 +306,9 @@ func (s *NATService) DisableStaticNat(p *DisableStaticNatParams) (*DisableStatic } type DisableStaticNatResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -392,6 +395,8 @@ func (s *NATService) EnableStaticNat(p *EnableStaticNatParams) (*EnableStaticNat type EnableStaticNatResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -410,6 +415,14 @@ func (r *EnableStaticNatResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias EnableStaticNatResponse return json.Unmarshal(b, (*alias)(r)) } @@ -618,6 +631,8 @@ type IpForwardingRule struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` Ipaddressid string `json:"ipaddressid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Privateendport string `json:"privateendport"` Privateport string `json:"privateport"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkACLService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkACLService.go index 6d0e1547b..73fc718b8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkACLService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkACLService.go @@ -69,6 +69,9 @@ func (p *CreateNetworkACLParams) toURLValues() url.Values { if v, found := p.p["protocol"]; found { u.Set("protocol", v.(string)) } + if v, found := p.p["reason"]; found { + u.Set("reason", v.(string)) + } if v, found := p.p["startport"]; found { vv := strconv.Itoa(v.(int)) u.Set("startport", vv) @@ -159,6 +162,14 @@ func (p *CreateNetworkACLParams) SetProtocol(v string) { return } +func (p *CreateNetworkACLParams) SetReason(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["reason"] = v + return +} + func (p *CreateNetworkACLParams) SetStartport(v int) { if p.p == nil { p.p = make(map[string]interface{}) @@ -220,7 +231,6 @@ func (s *NetworkACLService) CreateNetworkACL(p *CreateNetworkACLParams) (*Create } type CreateNetworkACLResponse struct { - JobID string `json:"jobid"` Aclid string `json:"aclid"` Action string `json:"action"` Cidrlist string `json:"cidrlist"` @@ -229,8 +239,11 @@ type CreateNetworkACLResponse struct { Icmpcode int `json:"icmpcode"` Icmptype int `json:"icmptype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Number int `json:"number"` Protocol string `json:"protocol"` + Reason string `json:"reason"` Startport string `json:"startport"` State string `json:"state"` Tags []Tags `json:"tags"` @@ -340,10 +353,11 @@ func (s *NetworkACLService) CreateNetworkACLList(p *CreateNetworkACLListParams) } type CreateNetworkACLListResponse struct { - JobID string `json:"jobid"` Description string `json:"description"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Vpcid string `json:"vpcid"` } @@ -411,8 +425,9 @@ func (s *NetworkACLService) DeleteNetworkACL(p *DeleteNetworkACLParams) (*Delete } type DeleteNetworkACLResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -479,8 +494,9 @@ func (s *NetworkACLService) DeleteNetworkACLList(p *DeleteNetworkACLListParams) } type DeleteNetworkACLListResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -759,6 +775,8 @@ type NetworkACLList struct { Description string `json:"description"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Vpcid string `json:"vpcid"` } @@ -1031,8 +1049,11 @@ type NetworkACL struct { Icmpcode int `json:"icmpcode"` Icmptype int `json:"icmptype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Number int `json:"number"` Protocol string `json:"protocol"` + Reason string `json:"reason"` Startport string `json:"startport"` State string `json:"state"` Tags []Tags `json:"tags"` @@ -1124,8 +1145,9 @@ func (s *NetworkACLService) ReplaceNetworkACLList(p *ReplaceNetworkACLListParams } type ReplaceNetworkACLListResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1171,9 +1193,16 @@ func (p *UpdateNetworkACLItemParams) toURLValues() url.Values { vv := strconv.Itoa(v.(int)) u.Set("number", vv) } + if v, found := p.p["partialupgrade"]; found { + vv := strconv.FormatBool(v.(bool)) + u.Set("partialupgrade", vv) + } if v, found := p.p["protocol"]; found { u.Set("protocol", v.(string)) } + if v, found := p.p["reason"]; found { + u.Set("reason", v.(string)) + } if v, found := p.p["startport"]; found { vv := strconv.Itoa(v.(int)) u.Set("startport", vv) @@ -1256,6 +1285,14 @@ func (p *UpdateNetworkACLItemParams) SetNumber(v int) { return } +func (p *UpdateNetworkACLItemParams) SetPartialupgrade(v bool) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["partialupgrade"] = v + return +} + func (p *UpdateNetworkACLItemParams) SetProtocol(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1264,6 +1301,14 @@ func (p *UpdateNetworkACLItemParams) SetProtocol(v string) { return } +func (p *UpdateNetworkACLItemParams) SetReason(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["reason"] = v + return +} + func (p *UpdateNetworkACLItemParams) SetStartport(v int) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1325,7 +1370,6 @@ func (s *NetworkACLService) UpdateNetworkACLItem(p *UpdateNetworkACLItemParams) } type UpdateNetworkACLItemResponse struct { - JobID string `json:"jobid"` Aclid string `json:"aclid"` Action string `json:"action"` Cidrlist string `json:"cidrlist"` @@ -1334,8 +1378,11 @@ type UpdateNetworkACLItemResponse struct { Icmpcode int `json:"icmpcode"` Icmptype int `json:"icmptype"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Number int `json:"number"` Protocol string `json:"protocol"` + Reason string `json:"reason"` Startport string `json:"startport"` State string `json:"state"` Tags []Tags `json:"tags"` @@ -1354,6 +1401,9 @@ func (p *UpdateNetworkACLListParams) toURLValues() url.Values { if v, found := p.p["customid"]; found { u.Set("customid", v.(string)) } + if v, found := p.p["description"]; found { + u.Set("description", v.(string)) + } if v, found := p.p["fordisplay"]; found { vv := strconv.FormatBool(v.(bool)) u.Set("fordisplay", vv) @@ -1361,6 +1411,9 @@ func (p *UpdateNetworkACLListParams) toURLValues() url.Values { if v, found := p.p["id"]; found { u.Set("id", v.(string)) } + if v, found := p.p["name"]; found { + u.Set("name", v.(string)) + } return u } @@ -1372,6 +1425,14 @@ func (p *UpdateNetworkACLListParams) SetCustomid(v string) { return } +func (p *UpdateNetworkACLListParams) SetDescription(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["description"] = v + return +} + func (p *UpdateNetworkACLListParams) SetFordisplay(v bool) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1388,6 +1449,14 @@ func (p *UpdateNetworkACLListParams) SetId(v string) { return } +func (p *UpdateNetworkACLListParams) SetName(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["name"] = v + return +} + // You should always use this function to get a new UpdateNetworkACLListParams instance, // as then you are sure you have configured all required params func (s *NetworkACLService) NewUpdateNetworkACLListParams(id string) *UpdateNetworkACLListParams { @@ -1428,7 +1497,8 @@ func (s *NetworkACLService) UpdateNetworkACLList(p *UpdateNetworkACLListParams) } type UpdateNetworkACLListResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkDeviceService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkDeviceService.go index cea5a8acf..edb6adfe5 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkDeviceService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkDeviceService.go @@ -86,7 +86,9 @@ func (s *NetworkDeviceService) AddNetworkDevice(p *AddNetworkDeviceParams) (*Add } type AddNetworkDeviceResponse struct { - Id string `json:"id"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type DeleteNetworkDeviceParams struct { @@ -138,6 +140,8 @@ func (s *NetworkDeviceService) DeleteNetworkDevice(p *DeleteNetworkDeviceParams) type DeleteNetworkDeviceResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -156,6 +160,14 @@ func (r *DeleteNetworkDeviceResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteNetworkDeviceResponse return json.Unmarshal(b, (*alias)(r)) } @@ -263,5 +275,7 @@ type ListNetworkDeviceResponse struct { } type NetworkDevice struct { - Id string `json:"id"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.go index 51ed208dd..e4f7404d2 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.go @@ -324,6 +324,8 @@ type CreateNetworkOfferingResponse struct { Id string `json:"id"` Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxconnections int `json:"maxconnections"` Name string `json:"name"` Networkrate int `json:"networkrate"` @@ -409,6 +411,8 @@ func (s *NetworkOfferingService) DeleteNetworkOffering(p *DeleteNetworkOfferingP type DeleteNetworkOfferingResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -427,6 +431,14 @@ func (r *DeleteNetworkOfferingResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteNetworkOfferingResponse return json.Unmarshal(b, (*alias)(r)) } @@ -795,6 +807,8 @@ type NetworkOffering struct { Id string `json:"id"` Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxconnections int `json:"maxconnections"` Name string `json:"name"` Networkrate int `json:"networkrate"` @@ -980,6 +994,8 @@ type UpdateNetworkOfferingResponse struct { Id string `json:"id"` Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxconnections int `json:"maxconnections"` Name string `json:"name"` Networkrate int `json:"networkrate"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkService.go index aef044e78..628aa1f82 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkService.go @@ -127,10 +127,11 @@ func (s *NetworkService) AddNetworkServiceProvider(p *AddNetworkServiceProviderP } type AddNetworkServiceProviderResponse struct { - JobID string `json:"jobid"` Canenableindividualservice bool `json:"canenableindividualservice"` Destinationphysicalnetworkid string `json:"destinationphysicalnetworkid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Servicelist []string `json:"servicelist"` @@ -241,8 +242,9 @@ func (s *NetworkService) AddOpenDaylightController(p *AddOpenDaylightControllerP } type AddOpenDaylightControllerResponse struct { - JobID string `json:"jobid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Url string `json:"url"` @@ -603,6 +605,8 @@ type CreateNetworkResponse struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -804,11 +808,12 @@ func (s *NetworkService) CreatePhysicalNetwork(p *CreatePhysicalNetworkParams) ( } type CreatePhysicalNetworkResponse struct { - JobID string `json:"jobid"` Broadcastdomainrange string `json:"broadcastdomainrange"` Domainid string `json:"domainid"` Id string `json:"id"` Isolationmethods string `json:"isolationmethods"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkspeed string `json:"networkspeed"` State string `json:"state"` @@ -978,12 +983,13 @@ func (s *NetworkService) CreateServiceInstance(p *CreateServiceInstanceParams) ( } type CreateServiceInstanceResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Displayname string `json:"displayname"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1116,10 +1122,11 @@ func (s *NetworkService) CreateStorageNetworkIpRange(p *CreateStorageNetworkIpRa } type CreateStorageNetworkIpRangeResponse struct { - JobID string `json:"jobid"` Endip string `json:"endip"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Podid string `json:"podid"` @@ -1222,6 +1229,8 @@ type DedicatePublicIpRangeResponse struct { Id string `json:"id"` Ip6cidr string `json:"ip6cidr"` Ip6gateway string `json:"ip6gateway"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` @@ -1310,8 +1319,9 @@ func (s *NetworkService) DeleteNetwork(p *DeleteNetworkParams) (*DeleteNetworkRe } type DeleteNetworkResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1378,8 +1388,9 @@ func (s *NetworkService) DeleteNetworkServiceProvider(p *DeleteNetworkServicePro } type DeleteNetworkServiceProviderResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1451,8 +1462,9 @@ func (s *NetworkService) DeleteOpenDaylightController(p *DeleteOpenDaylightContr } type DeleteOpenDaylightControllerResponse struct { - JobID string `json:"jobid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Url string `json:"url"` @@ -1522,8 +1534,9 @@ func (s *NetworkService) DeletePhysicalNetwork(p *DeletePhysicalNetworkParams) ( } type DeletePhysicalNetworkResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1590,8 +1603,9 @@ func (s *NetworkService) DeleteStorageNetworkIpRange(p *DeleteStorageNetworkIpRa } type DeleteStorageNetworkIpRangeResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1741,6 +1755,8 @@ type NetscalerLoadBalancerNetwork struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -1870,7 +1886,9 @@ type ListNetworkIsolationMethodsResponse struct { } type NetworkIsolationMethod struct { - Name string `json:"name"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` } type ListNetworkServiceProvidersParams struct { @@ -2021,6 +2039,8 @@ type NetworkServiceProvider struct { Canenableindividualservice bool `json:"canenableindividualservice"` Destinationphysicalnetworkid string `json:"destinationphysicalnetworkid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Servicelist []string `json:"servicelist"` @@ -2441,6 +2461,8 @@ type Network struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -2640,6 +2662,8 @@ type NiciraNvpDeviceNetwork struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -2790,6 +2814,8 @@ type ListOpenDaylightControllersResponse struct { type OpenDaylightController struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Url string `json:"url"` @@ -2942,6 +2968,8 @@ type PaloAltoFirewallNetwork struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -3191,6 +3219,8 @@ type PhysicalNetwork struct { Domainid string `json:"domainid"` Id string `json:"id"` Isolationmethods string `json:"isolationmethods"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkspeed string `json:"networkspeed"` State string `json:"state"` @@ -3344,6 +3374,8 @@ type StorageNetworkIpRange struct { Endip string `json:"endip"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Podid string `json:"podid"` @@ -3451,6 +3483,8 @@ type ListSupportedNetworkServicesResponse struct { type SupportedNetworkService struct { Capability []SupportedNetworkServiceCapability `json:"capability"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Provider []SupportedNetworkServiceProvider `json:"provider"` } @@ -3520,6 +3554,8 @@ func (s *NetworkService) ReleasePublicIpRange(p *ReleasePublicIpRangeParams) (*R type ReleasePublicIpRangeResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -3538,6 +3574,14 @@ func (r *ReleasePublicIpRangeResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias ReleasePublicIpRangeResponse return json.Unmarshal(b, (*alias)(r)) } @@ -3634,7 +3678,6 @@ func (s *NetworkService) RestartNetwork(p *RestartNetworkParams) (*RestartNetwor } type RestartNetworkResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Allocated string `json:"allocated"` Associatednetworkid string `json:"associatednetworkid"` @@ -3649,6 +3692,8 @@ type RestartNetworkResponse struct { Issourcenat bool `json:"issourcenat"` Isstaticnat bool `json:"isstaticnat"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` @@ -3849,7 +3894,6 @@ func (s *NetworkService) UpdateNetwork(p *UpdateNetworkParams) (*UpdateNetworkRe } type UpdateNetworkResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Aclid string `json:"aclid"` Acltype string `json:"acltype"` @@ -3871,6 +3915,8 @@ type UpdateNetworkResponse struct { Isdefault bool `json:"isdefault"` Ispersistent bool `json:"ispersistent"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Networkcidr string `json:"networkcidr"` @@ -4015,10 +4061,11 @@ func (s *NetworkService) UpdateNetworkServiceProvider(p *UpdateNetworkServicePro } type UpdateNetworkServiceProviderResponse struct { - JobID string `json:"jobid"` Canenableindividualservice bool `json:"canenableindividualservice"` Destinationphysicalnetworkid string `json:"destinationphysicalnetworkid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Servicelist []string `json:"servicelist"` @@ -4138,11 +4185,12 @@ func (s *NetworkService) UpdatePhysicalNetwork(p *UpdatePhysicalNetworkParams) ( } type UpdatePhysicalNetworkResponse struct { - JobID string `json:"jobid"` Broadcastdomainrange string `json:"broadcastdomainrange"` Domainid string `json:"domainid"` Id string `json:"id"` Isolationmethods string `json:"isolationmethods"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Networkspeed string `json:"networkspeed"` State string `json:"state"` @@ -4264,10 +4312,11 @@ func (s *NetworkService) UpdateStorageNetworkIpRange(p *UpdateStorageNetworkIpRa } type UpdateStorageNetworkIpRangeResponse struct { - JobID string `json:"jobid"` Endip string `json:"endip"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Podid string `json:"podid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NicService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NicService.go index 525f1b99b..722278a52 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NicService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NicService.go @@ -101,9 +101,10 @@ func (s *NicService) AddIpToNic(p *AddIpToNicParams) (*AddIpToNicResponse, error } type AddIpToNicResponse struct { - JobID string `json:"jobid"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Networkid string `json:"networkid"` Nicid string `json:"nicid"` Secondaryip []struct { @@ -246,6 +247,8 @@ type Nic struct { Ipaddress string `json:"ipaddress"` Isdefault bool `json:"isdefault"` Isolationuri string `json:"isolationuri"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Macaddress string `json:"macaddress"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` @@ -324,8 +327,9 @@ func (s *NicService) RemoveIpFromNic(p *RemoveIpFromNicParams) (*RemoveIpFromNic } type RemoveIpFromNicResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -408,7 +412,6 @@ func (s *NicService) UpdateVmNicIp(p *UpdateVmNicIpParams) (*UpdateVmNicIpRespon } type UpdateVmNicIpResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []UpdateVmNicIpResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -440,6 +443,8 @@ type UpdateVmNicIpResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -449,7 +454,7 @@ type UpdateVmNicIpResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -463,6 +468,7 @@ type UpdateVmNicIpResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -514,3 +520,30 @@ type UpdateVmNicIpResponseAffinitygroup struct { Type string `json:"type"` VirtualmachineIds []string `json:"virtualmachineIds"` } + +func (r *UpdateVmNicIpResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateVmNicIpResponse + return json.Unmarshal(b, (*alias)(r)) +} diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NiciraNVPService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NiciraNVPService.go index ec90845bc..2caa0d3f8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NiciraNVPService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NiciraNVPService.go @@ -160,8 +160,9 @@ func (s *NiciraNVPService) AddNiciraNvpDevice(p *AddNiciraNvpDeviceParams) (*Add } type AddNiciraNvpDeviceResponse struct { - JobID string `json:"jobid"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` L2gatewayserviceuuid string `json:"l2gatewayserviceuuid"` L3gatewayserviceuuid string `json:"l3gatewayserviceuuid"` Niciradevicename string `json:"niciradevicename"` @@ -234,8 +235,9 @@ func (s *NiciraNVPService) DeleteNiciraNvpDevice(p *DeleteNiciraNvpDeviceParams) } type DeleteNiciraNvpDeviceResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -338,6 +340,8 @@ type ListNiciraNvpDevicesResponse struct { type NiciraNvpDevice struct { Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` L2gatewayserviceuuid string `json:"l2gatewayserviceuuid"` L3gatewayserviceuuid string `json:"l3gatewayserviceuuid"` Niciradevicename string `json:"niciradevicename"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NuageVSPService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NuageVSPService.go index 31f4df2ad..975fd295d 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/NuageVSPService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/NuageVSPService.go @@ -174,10 +174,11 @@ func (s *NuageVSPService) AddNuageVspDevice(p *AddNuageVspDeviceParams) (*AddNua } type AddNuageVspDeviceResponse struct { - JobID string `json:"jobid"` Apiversion string `json:"apiversion"` Cmsid string `json:"cmsid"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nuagedevicename string `json:"nuagedevicename"` Physicalnetworkid string `json:"physicalnetworkid"` Port int `json:"port"` @@ -250,8 +251,9 @@ func (s *NuageVSPService) DeleteNuageVspDevice(p *DeleteNuageVspDeviceParams) (* } type DeleteNuageVspDeviceResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -356,6 +358,8 @@ type NuageVspDevice struct { Apiversion string `json:"apiversion"` Cmsid string `json:"cmsid"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nuagedevicename string `json:"nuagedevicename"` Physicalnetworkid string `json:"physicalnetworkid"` Port int `json:"port"` @@ -513,10 +517,11 @@ func (s *NuageVSPService) UpdateNuageVspDevice(p *UpdateNuageVspDeviceParams) (* } type UpdateNuageVspDeviceResponse struct { - JobID string `json:"jobid"` Apiversion string `json:"apiversion"` Cmsid string `json:"cmsid"` Hostname string `json:"hostname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nuagedevicename string `json:"nuagedevicename"` Physicalnetworkid string `json:"physicalnetworkid"` Port int `json:"port"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/OutofbandManagementService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/OutofbandManagementService.go index eb12c45e1..72af8ad95 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/OutofbandManagementService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/OutofbandManagementService.go @@ -101,13 +101,14 @@ func (s *OutofbandManagementService) ChangeOutOfBandManagementPassword(p *Change } type ChangeOutOfBandManagementPasswordResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -229,6 +230,8 @@ type OutOfBandManagementResponse struct { Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -328,13 +331,14 @@ func (s *OutofbandManagementService) IssueOutOfBandManagementPowerAction(p *Issu } type IssueOutOfBandManagementPowerActionResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/OvsElementService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/OvsElementService.go index cd5b22e1c..5181adc5c 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/OvsElementService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/OvsElementService.go @@ -105,12 +105,13 @@ func (s *OvsElementService) ConfigureOvsElement(p *ConfigureOvsElementParams) (* } type OvsElementResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Enabled bool `json:"enabled"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nspid string `json:"nspid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -264,6 +265,8 @@ type OvsElement struct { Domainid string `json:"domainid"` Enabled bool `json:"enabled"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nspid string `json:"nspid"` Project string `json:"project"` Projectid string `json:"projectid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PodService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PodService.go index 377e2618e..c51139a11 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PodService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PodService.go @@ -148,6 +148,8 @@ type CreatePodResponse struct { Forsystemvms []string `json:"forsystemvms"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Startip []string `json:"startip"` @@ -262,11 +264,12 @@ func (s *PodService) DedicatePod(p *DedicatePodParams) (*DedicatePodResponse, er } type DedicatePodResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Affinitygroupid string `json:"affinitygroupid"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Podid string `json:"podid"` Podname string `json:"podname"` } @@ -320,6 +323,8 @@ func (s *PodService) DeletePod(p *DeletePodParams) (*DeletePodResponse, error) { type DeletePodResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -338,6 +343,14 @@ func (r *DeletePodResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeletePodResponse return json.Unmarshal(b, (*alias)(r)) } @@ -466,6 +479,8 @@ type DedicatedPod struct { Affinitygroupid string `json:"affinitygroupid"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Podid string `json:"podid"` Podname string `json:"podname"` } @@ -691,6 +706,8 @@ type Pod struct { Forsystemvms []string `json:"forsystemvms"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Startip []string `json:"startip"` @@ -777,8 +794,9 @@ func (s *PodService) ReleaseDedicatedPod(p *ReleaseDedicatedPodParams) (*Release } type ReleaseDedicatedPodResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -902,6 +920,8 @@ type UpdatePodResponse struct { Forsystemvms []string `json:"forsystemvms"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Netmask string `json:"netmask"` Startip []string `json:"startip"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PoolService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PoolService.go index b235a2821..047f766d3 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PoolService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PoolService.go @@ -224,6 +224,8 @@ type CreateStoragePoolResponse struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` @@ -301,6 +303,8 @@ func (s *PoolService) DeleteStoragePool(p *DeleteStoragePoolParams) (*DeleteStor type DeleteStoragePoolResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -319,6 +323,14 @@ func (r *DeleteStoragePoolResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteStoragePoolResponse return json.Unmarshal(b, (*alias)(r)) } @@ -417,6 +429,8 @@ type FindStoragePoolsForMigrationResponse struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` @@ -691,6 +705,8 @@ type StoragePool struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` @@ -814,6 +830,8 @@ type UpdateStoragePoolResponse struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PortableIPService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PortableIPService.go index 6a9ddf782..c4f5214ce 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/PortableIPService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/PortableIPService.go @@ -152,10 +152,11 @@ func (s *PortableIPService) CreatePortableIpRange(p *CreatePortableIpRangeParams } type CreatePortableIpRangeResponse struct { - JobID string `json:"jobid"` Endip string `json:"endip"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Portableipaddress []CreatePortableIpRangeResponsePortableipaddress `json:"portableipaddress"` Regionid int `json:"regionid"` @@ -239,8 +240,9 @@ func (s *PortableIPService) DeletePortableIpRange(p *DeletePortableIpRangeParams } type DeletePortableIpRangeResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -379,6 +381,8 @@ type PortableIpRange struct { Endip string `json:"endip"` Gateway string `json:"gateway"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Portableipaddress []PortableIpRangePortableipaddress `json:"portableipaddress"` Regionid int `json:"regionid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ProjectService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ProjectService.go index de767a106..1c666ad24 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ProjectService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ProjectService.go @@ -92,7 +92,6 @@ func (s *ProjectService) ActivateProject(p *ActivateProjectParams) (*ActivatePro } type ActivateProjectResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cpuavailable string `json:"cpuavailable"` Cpulimit string `json:"cpulimit"` @@ -104,6 +103,8 @@ type ActivateProjectResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -241,7 +242,6 @@ func (s *ProjectService) CreateProject(p *CreateProjectParams) (*CreateProjectRe } type CreateProjectResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cpuavailable string `json:"cpuavailable"` Cpulimit string `json:"cpulimit"` @@ -253,6 +253,8 @@ type CreateProjectResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -351,8 +353,9 @@ func (s *ProjectService) DeleteProject(p *DeleteProjectParams) (*DeleteProjectRe } type DeleteProjectResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -419,8 +422,9 @@ func (s *ProjectService) DeleteProjectInvitation(p *DeleteProjectInvitationParam } type DeleteProjectInvitationResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -629,6 +633,8 @@ type ProjectInvitation struct { Domainid string `json:"domainid"` Email string `json:"email"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` State string `json:"state"` @@ -910,6 +916,8 @@ type Project struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1013,7 +1021,6 @@ func (s *ProjectService) SuspendProject(p *SuspendProjectParams) (*SuspendProjec } type SuspendProjectResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cpuavailable string `json:"cpuavailable"` Cpulimit string `json:"cpulimit"` @@ -1025,6 +1032,8 @@ type SuspendProjectResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1150,7 +1159,6 @@ func (s *ProjectService) UpdateProject(p *UpdateProjectParams) (*UpdateProjectRe } type UpdateProjectResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cpuavailable string `json:"cpuavailable"` Cpulimit string `json:"cpulimit"` @@ -1162,6 +1170,8 @@ type UpdateProjectResponse struct { Ipavailable string `json:"ipavailable"` Iplimit string `json:"iplimit"` Iptotal int64 `json:"iptotal"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memoryavailable string `json:"memoryavailable"` Memorylimit string `json:"memorylimit"` Memorytotal int64 `json:"memorytotal"` @@ -1294,7 +1304,8 @@ func (s *ProjectService) UpdateProjectInvitation(p *UpdateProjectInvitationParam } type UpdateProjectInvitationResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/QuotaService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/QuotaService.go index 2e2f26ac7..048afc521 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/QuotaService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/QuotaService.go @@ -57,5 +57,7 @@ func (s *QuotaService) QuotaIsEnabled(p *QuotaIsEnabledParams) (*QuotaIsEnabledR } type QuotaIsEnabledResponse struct { - Isenabled bool `json:"isenabled"` + Isenabled bool `json:"isenabled"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RegionService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RegionService.go index 244a8fa0c..92d833873 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RegionService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RegionService.go @@ -98,6 +98,8 @@ type AddRegionResponse struct { Endpoint string `json:"endpoint"` Gslbserviceenabled bool `json:"gslbserviceenabled"` Id int `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Portableipserviceenabled bool `json:"portableipserviceenabled"` } @@ -204,6 +206,8 @@ type Region struct { Endpoint string `json:"endpoint"` Gslbserviceenabled bool `json:"gslbserviceenabled"` Id int `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Portableipserviceenabled bool `json:"portableipserviceenabled"` } @@ -258,6 +262,8 @@ func (s *RegionService) RemoveRegion(p *RemoveRegionParams) (*RemoveRegionRespon type RemoveRegionResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -276,6 +282,14 @@ func (r *RemoveRegionResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias RemoveRegionResponse return json.Unmarshal(b, (*alias)(r)) } @@ -354,6 +368,8 @@ type UpdateRegionResponse struct { Endpoint string `json:"endpoint"` Gslbserviceenabled bool `json:"gslbserviceenabled"` Id int `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Portableipserviceenabled bool `json:"portableipserviceenabled"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcemetadataService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcemetadataService.go index 6eef886fa..822208e4f 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcemetadataService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcemetadataService.go @@ -126,8 +126,9 @@ func (s *ResourcemetadataService) AddResourceDetail(p *AddResourceDetailParams) } type AddResourceDetailResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -179,6 +180,8 @@ func (s *ResourcemetadataService) GetVolumeSnapshotDetails(p *GetVolumeSnapshotD } type GetVolumeSnapshotDetailsResponse struct { + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` VolumeiScsiName string `json:"volumeiScsiName"` } @@ -376,6 +379,8 @@ type ResourceDetail struct { Customer string `json:"customer"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Key string `json:"key"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -470,7 +475,8 @@ func (s *ResourcemetadataService) RemoveResourceDetail(p *RemoveResourceDetailPa } type RemoveResourceDetailResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcetagsService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcetagsService.go index e49d26563..9d7dc15ed 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcetagsService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ResourcetagsService.go @@ -128,8 +128,9 @@ func (s *ResourcetagsService) CreateTags(p *CreateTagsParams) (*CreateTagsRespon } type CreateTagsResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -225,8 +226,9 @@ func (s *ResourcetagsService) DeleteTags(p *DeleteTagsParams) (*DeleteTagsRespon } type DeleteTagsResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -342,9 +344,11 @@ type ListStorageTagsResponse struct { } type StorageTag struct { - Id string `json:"id"` - Name string `json:"name"` - Poolid int64 `json:"poolid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Poolid int64 `json:"poolid"` } type ListTagsParams struct { @@ -539,6 +543,8 @@ type Tag struct { Customer string `json:"customer"` Domain string `json:"domain"` Domainid string `json:"domainid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Key string `json:"key"` Project string `json:"project"` Projectid string `json:"projectid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RoleService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RoleService.go index f348b1d6f..f40354d05 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RoleService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RoleService.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "net/url" + "strconv" "strings" ) @@ -96,6 +97,8 @@ func (s *RoleService) CreateRole(p *CreateRoleParams) (*CreateRoleResponse, erro type CreateRoleResponse struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Type string `json:"type"` } @@ -185,6 +188,8 @@ func (s *RoleService) CreateRolePermission(p *CreateRolePermissionParams) (*Crea type CreateRolePermissionResponse struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Permission string `json:"permission"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -240,6 +245,8 @@ func (s *RoleService) DeleteRole(p *DeleteRoleParams) (*DeleteRoleResponse, erro type DeleteRoleResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -258,6 +265,14 @@ func (r *DeleteRoleResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteRoleResponse return json.Unmarshal(b, (*alias)(r)) } @@ -311,6 +326,8 @@ func (s *RoleService) DeleteRolePermission(p *DeleteRolePermissionParams) (*Dele type DeleteRolePermissionResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -329,6 +346,14 @@ func (r *DeleteRolePermissionResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteRolePermissionResponse return json.Unmarshal(b, (*alias)(r)) } @@ -387,6 +412,8 @@ type ListRolePermissionsResponse struct { type RolePermission struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Permission string `json:"permission"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -552,6 +579,8 @@ type ListRolesResponse struct { type Role struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Type string `json:"type"` } @@ -639,6 +668,8 @@ func (s *RoleService) UpdateRole(p *UpdateRoleParams) (*UpdateRoleResponse, erro type UpdateRoleResponse struct { Description string `json:"description"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Type string `json:"type"` } @@ -726,6 +757,8 @@ func (s *RoleService) UpdateRolePermission(p *UpdateRolePermissionParams) (*Upda type UpdateRolePermissionResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -744,6 +777,14 @@ func (r *UpdateRolePermissionResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias UpdateRolePermissionResponse return json.Unmarshal(b, (*alias)(r)) } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RouterService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RouterService.go index bf37d75e5..963403bf6 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/RouterService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/RouterService.go @@ -103,6 +103,8 @@ type ChangeServiceForRouterResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -213,12 +215,13 @@ func (s *RouterService) ConfigureVirtualRouterElement(p *ConfigureVirtualRouterE } type VirtualRouterElementResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Enabled bool `json:"enabled"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nspid string `json:"nspid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -303,12 +306,13 @@ func (s *RouterService) CreateVirtualRouterElement(p *CreateVirtualRouterElement } type CreateVirtualRouterElementResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Enabled bool `json:"enabled"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nspid string `json:"nspid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -382,7 +386,6 @@ func (s *RouterService) DestroyRouter(p *DestroyRouterParams) (*DestroyRouterRes } type DestroyRouterResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -402,6 +405,8 @@ type DestroyRouterResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -788,6 +793,8 @@ type Router struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -965,6 +972,8 @@ type VirtualRouterElement struct { Domainid string `json:"domainid"` Enabled bool `json:"enabled"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Nspid string `json:"nspid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1038,7 +1047,6 @@ func (s *RouterService) RebootRouter(p *RebootRouterParams) (*RebootRouterRespon } type RebootRouterResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -1058,6 +1066,8 @@ type RebootRouterResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -1155,7 +1165,6 @@ func (s *RouterService) StartRouter(p *StartRouterParams) (*StartRouterResponse, } type StartRouterResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -1175,6 +1184,8 @@ type StartRouterResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` @@ -1284,7 +1295,6 @@ func (s *RouterService) StopRouter(p *StopRouterParams) (*StopRouterResponse, er } type StopRouterResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Dns1 string `json:"dns1"` @@ -1304,6 +1314,8 @@ type StopRouterResponse struct { Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` Isredundantrouter bool `json:"isredundantrouter"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Linklocalip string `json:"linklocalip"` Linklocalmacaddress string `json:"linklocalmacaddress"` Linklocalnetmask string `json:"linklocalnetmask"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SSHService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SSHService.go index f1f4ab48f..a69f7f2f0 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SSHService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SSHService.go @@ -107,7 +107,14 @@ func (s *SSHService) CreateSSHKeyPair(p *CreateSSHKeyPairParams) (*CreateSSHKeyP } type CreateSSHKeyPairResponse struct { - Privatekey string `json:"privatekey"` + Account string `json:"account"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Fingerprint string `json:"fingerprint"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Privatekey string `json:"privatekey"` } type DeleteSSHKeyPairParams struct { @@ -192,6 +199,8 @@ func (s *SSHService) DeleteSSHKeyPair(p *DeleteSSHKeyPairParams) (*DeleteSSHKeyP type DeleteSSHKeyPairResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -210,6 +219,14 @@ func (r *DeleteSSHKeyPairResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteSSHKeyPairResponse return json.Unmarshal(b, (*alias)(r)) } @@ -373,6 +390,8 @@ type SSHKeyPair struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Fingerprint string `json:"fingerprint"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` } @@ -477,6 +496,8 @@ type RegisterSSHKeyPairResponse struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Fingerprint string `json:"fingerprint"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` } @@ -593,7 +614,6 @@ func (s *SSHService) ResetSSHKeyForVirtualMachine(p *ResetSSHKeyForVirtualMachin } type ResetSSHKeyForVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []ResetSSHKeyForVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -625,6 +645,8 @@ type ResetSSHKeyForVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -634,7 +656,7 @@ type ResetSSHKeyForVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -648,6 +670,7 @@ type ResetSSHKeyForVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -699,3 +722,30 @@ type ResetSSHKeyForVirtualMachineResponseAffinitygroup struct { Type string `json:"type"` VirtualmachineIds []string `json:"virtualmachineIds"` } + +func (r *ResetSSHKeyForVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias ResetSSHKeyForVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SecurityGroupService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SecurityGroupService.go index 125750474..245f26311 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SecurityGroupService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SecurityGroupService.go @@ -259,12 +259,13 @@ func (s *SecurityGroupService) AuthorizeSecurityGroupEgress(p *AuthorizeSecurity } type AuthorizeSecurityGroupEgressResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Endport int `json:"endport"` Icmpcode int `json:"icmpcode"` Icmptype int `json:"icmptype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Protocol string `json:"protocol"` Ruleid string `json:"ruleid"` Securitygroupname string `json:"securitygroupname"` @@ -475,12 +476,13 @@ func (s *SecurityGroupService) AuthorizeSecurityGroupIngress(p *AuthorizeSecurit } type AuthorizeSecurityGroupIngressResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Endport int `json:"endport"` Icmpcode int `json:"icmpcode"` Icmptype int `json:"icmptype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Protocol string `json:"protocol"` Ruleid string `json:"ruleid"` Securitygroupname string `json:"securitygroupname"` @@ -591,6 +593,8 @@ type CreateSecurityGroupResponse struct { Egressrule []CreateSecurityGroupResponseRule `json:"egressrule"` Id string `json:"id"` Ingressrule []CreateSecurityGroupResponseRule `json:"ingressrule"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -704,6 +708,8 @@ func (s *SecurityGroupService) DeleteSecurityGroup(p *DeleteSecurityGroupParams) type DeleteSecurityGroupResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -722,6 +728,14 @@ func (r *DeleteSecurityGroupResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteSecurityGroupResponse return json.Unmarshal(b, (*alias)(r)) } @@ -998,6 +1012,8 @@ type SecurityGroup struct { Egressrule []SecurityGroupRule `json:"egressrule"` Id string `json:"id"` Ingressrule []SecurityGroupRule `json:"ingressrule"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1082,8 +1098,9 @@ func (s *SecurityGroupService) RevokeSecurityGroupEgress(p *RevokeSecurityGroupE } type RevokeSecurityGroupEgressResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1150,7 +1167,8 @@ func (s *SecurityGroupService) RevokeSecurityGroupIngress(p *RevokeSecurityGroup } type RevokeSecurityGroupIngressResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ServiceOfferingService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ServiceOfferingService.go index 1700f8d94..ea9b4d964 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ServiceOfferingService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ServiceOfferingService.go @@ -37,10 +37,26 @@ func (p *CreateServiceOfferingParams) toURLValues() url.Values { vv := strconv.FormatInt(v.(int64), 10) u.Set("bytesreadrate", vv) } + if v, found := p.p["bytesreadratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("bytesreadratemax", vv) + } + if v, found := p.p["bytesreadratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("bytesreadratemaxlength", vv) + } if v, found := p.p["byteswriterate"]; found { vv := strconv.FormatInt(v.(int64), 10) u.Set("byteswriterate", vv) } + if v, found := p.p["byteswriteratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("byteswriteratemax", vv) + } + if v, found := p.p["byteswriteratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("byteswriteratemaxlength", vv) + } if v, found := p.p["cpunumber"]; found { vv := strconv.Itoa(v.(int)) u.Set("cpunumber", vv) @@ -73,10 +89,26 @@ func (p *CreateServiceOfferingParams) toURLValues() url.Values { vv := strconv.FormatInt(v.(int64), 10) u.Set("iopsreadrate", vv) } + if v, found := p.p["iopsreadratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopsreadratemax", vv) + } + if v, found := p.p["iopsreadratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopsreadratemaxlength", vv) + } if v, found := p.p["iopswriterate"]; found { vv := strconv.FormatInt(v.(int64), 10) u.Set("iopswriterate", vv) } + if v, found := p.p["iopswriteratemax"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopswriteratemax", vv) + } + if v, found := p.p["iopswriteratemaxlength"]; found { + vv := strconv.FormatInt(v.(int64), 10) + u.Set("iopswriteratemaxlength", vv) + } if v, found := p.p["issystem"]; found { vv := strconv.FormatBool(v.(bool)) u.Set("issystem", vv) @@ -143,6 +175,22 @@ func (p *CreateServiceOfferingParams) SetBytesreadrate(v int64) { return } +func (p *CreateServiceOfferingParams) SetBytesreadratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["bytesreadratemax"] = v + return +} + +func (p *CreateServiceOfferingParams) SetBytesreadratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["bytesreadratemaxlength"] = v + return +} + func (p *CreateServiceOfferingParams) SetByteswriterate(v int64) { if p.p == nil { p.p = make(map[string]interface{}) @@ -151,6 +199,22 @@ func (p *CreateServiceOfferingParams) SetByteswriterate(v int64) { return } +func (p *CreateServiceOfferingParams) SetByteswriteratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["byteswriteratemax"] = v + return +} + +func (p *CreateServiceOfferingParams) SetByteswriteratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["byteswriteratemaxlength"] = v + return +} + func (p *CreateServiceOfferingParams) SetCpunumber(v int) { if p.p == nil { p.p = make(map[string]interface{}) @@ -223,6 +287,22 @@ func (p *CreateServiceOfferingParams) SetIopsreadrate(v int64) { return } +func (p *CreateServiceOfferingParams) SetIopsreadratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopsreadratemax"] = v + return +} + +func (p *CreateServiceOfferingParams) SetIopsreadratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopsreadratemaxlength"] = v + return +} + func (p *CreateServiceOfferingParams) SetIopswriterate(v int64) { if p.p == nil { p.p = make(map[string]interface{}) @@ -231,6 +311,22 @@ func (p *CreateServiceOfferingParams) SetIopswriterate(v int64) { return } +func (p *CreateServiceOfferingParams) SetIopswriteratemax(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopswriteratemax"] = v + return +} + +func (p *CreateServiceOfferingParams) SetIopswriteratemaxlength(v int64) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["iopswriteratemaxlength"] = v + return +} + func (p *CreateServiceOfferingParams) SetIssystem(v bool) { if p.p == nil { p.p = make(map[string]interface{}) @@ -373,37 +469,47 @@ func (s *ServiceOfferingService) CreateServiceOffering(p *CreateServiceOfferingP } type CreateServiceOfferingResponse struct { - Cpunumber int `json:"cpunumber"` - Cpuspeed int `json:"cpuspeed"` - Created string `json:"created"` - Defaultuse bool `json:"defaultuse"` - Deploymentplanner string `json:"deploymentplanner"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hosttags string `json:"hosttags"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Issystem bool `json:"issystem"` - Isvolatile bool `json:"isvolatile"` - Limitcpuuse bool `json:"limitcpuuse"` - Maxiops int64 `json:"maxiops"` - Memory int `json:"memory"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Networkrate int `json:"networkrate"` - Offerha bool `json:"offerha"` - Provisioningtype string `json:"provisioningtype"` - Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` - Storagetype string `json:"storagetype"` - Systemvmtype string `json:"systemvmtype"` - Tags string `json:"tags"` + Cpunumber int `json:"cpunumber"` + Cpuspeed int `json:"cpuspeed"` + Created string `json:"created"` + Defaultuse bool `json:"defaultuse"` + Deploymentplanner string `json:"deploymentplanner"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hosttags string `json:"hosttags"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + Issystem bool `json:"issystem"` + Isvolatile bool `json:"isvolatile"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Limitcpuuse bool `json:"limitcpuuse"` + Maxiops int64 `json:"maxiops"` + Memory int `json:"memory"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Networkrate int `json:"networkrate"` + Offerha bool `json:"offerha"` + Provisioningtype string `json:"provisioningtype"` + Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` + Storagetype string `json:"storagetype"` + Systemvmtype string `json:"systemvmtype"` + Tags string `json:"tags"` } type DeleteServiceOfferingParams struct { @@ -455,6 +561,8 @@ func (s *ServiceOfferingService) DeleteServiceOffering(p *DeleteServiceOfferingP type DeleteServiceOfferingResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -473,6 +581,14 @@ func (r *DeleteServiceOfferingResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteServiceOfferingResponse return json.Unmarshal(b, (*alias)(r)) } @@ -727,37 +843,47 @@ type ListServiceOfferingsResponse struct { } type ServiceOffering struct { - Cpunumber int `json:"cpunumber"` - Cpuspeed int `json:"cpuspeed"` - Created string `json:"created"` - Defaultuse bool `json:"defaultuse"` - Deploymentplanner string `json:"deploymentplanner"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hosttags string `json:"hosttags"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Issystem bool `json:"issystem"` - Isvolatile bool `json:"isvolatile"` - Limitcpuuse bool `json:"limitcpuuse"` - Maxiops int64 `json:"maxiops"` - Memory int `json:"memory"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Networkrate int `json:"networkrate"` - Offerha bool `json:"offerha"` - Provisioningtype string `json:"provisioningtype"` - Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` - Storagetype string `json:"storagetype"` - Systemvmtype string `json:"systemvmtype"` - Tags string `json:"tags"` + Cpunumber int `json:"cpunumber"` + Cpuspeed int `json:"cpuspeed"` + Created string `json:"created"` + Defaultuse bool `json:"defaultuse"` + Deploymentplanner string `json:"deploymentplanner"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hosttags string `json:"hosttags"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + Issystem bool `json:"issystem"` + Isvolatile bool `json:"isvolatile"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Limitcpuuse bool `json:"limitcpuuse"` + Maxiops int64 `json:"maxiops"` + Memory int `json:"memory"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Networkrate int `json:"networkrate"` + Offerha bool `json:"offerha"` + Provisioningtype string `json:"provisioningtype"` + Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` + Storagetype string `json:"storagetype"` + Systemvmtype string `json:"systemvmtype"` + Tags string `json:"tags"` } type UpdateServiceOfferingParams struct { @@ -842,35 +968,45 @@ func (s *ServiceOfferingService) UpdateServiceOffering(p *UpdateServiceOfferingP } type UpdateServiceOfferingResponse struct { - Cpunumber int `json:"cpunumber"` - Cpuspeed int `json:"cpuspeed"` - Created string `json:"created"` - Defaultuse bool `json:"defaultuse"` - Deploymentplanner string `json:"deploymentplanner"` - DiskBytesReadRate int64 `json:"diskBytesReadRate"` - DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` - DiskIopsReadRate int64 `json:"diskIopsReadRate"` - DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` - Displaytext string `json:"displaytext"` - Domain string `json:"domain"` - Domainid string `json:"domainid"` - Hosttags string `json:"hosttags"` - Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` - Id string `json:"id"` - Iscustomized bool `json:"iscustomized"` - Iscustomizediops bool `json:"iscustomizediops"` - Issystem bool `json:"issystem"` - Isvolatile bool `json:"isvolatile"` - Limitcpuuse bool `json:"limitcpuuse"` - Maxiops int64 `json:"maxiops"` - Memory int `json:"memory"` - Miniops int64 `json:"miniops"` - Name string `json:"name"` - Networkrate int `json:"networkrate"` - Offerha bool `json:"offerha"` - Provisioningtype string `json:"provisioningtype"` - Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` - Storagetype string `json:"storagetype"` - Systemvmtype string `json:"systemvmtype"` - Tags string `json:"tags"` + Cpunumber int `json:"cpunumber"` + Cpuspeed int `json:"cpuspeed"` + Created string `json:"created"` + Defaultuse bool `json:"defaultuse"` + Deploymentplanner string `json:"deploymentplanner"` + DiskBytesReadRate int64 `json:"diskBytesReadRate"` + DiskBytesReadRateMax int64 `json:"diskBytesReadRateMax"` + DiskBytesReadRateMaxLength int64 `json:"diskBytesReadRateMaxLength"` + DiskBytesWriteRate int64 `json:"diskBytesWriteRate"` + DiskBytesWriteRateMax int64 `json:"diskBytesWriteRateMax"` + DiskBytesWriteRateMaxLength int64 `json:"diskBytesWriteRateMaxLength"` + DiskIopsReadRate int64 `json:"diskIopsReadRate"` + DiskIopsReadRateMax int64 `json:"diskIopsReadRateMax"` + DiskIopsReadRateMaxLength int64 `json:"diskIopsReadRateMaxLength"` + DiskIopsWriteRate int64 `json:"diskIopsWriteRate"` + DiskIopsWriteRateMax int64 `json:"diskIopsWriteRateMax"` + DiskIopsWriteRateMaxLength int64 `json:"diskIopsWriteRateMaxLength"` + Displaytext string `json:"displaytext"` + Domain string `json:"domain"` + Domainid string `json:"domainid"` + Hosttags string `json:"hosttags"` + Hypervisorsnapshotreserve int `json:"hypervisorsnapshotreserve"` + Id string `json:"id"` + Iscustomized bool `json:"iscustomized"` + Iscustomizediops bool `json:"iscustomizediops"` + Issystem bool `json:"issystem"` + Isvolatile bool `json:"isvolatile"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Limitcpuuse bool `json:"limitcpuuse"` + Maxiops int64 `json:"maxiops"` + Memory int `json:"memory"` + Miniops int64 `json:"miniops"` + Name string `json:"name"` + Networkrate int `json:"networkrate"` + Offerha bool `json:"offerha"` + Provisioningtype string `json:"provisioningtype"` + Serviceofferingdetails map[string]string `json:"serviceofferingdetails"` + Storagetype string `json:"storagetype"` + Systemvmtype string `json:"systemvmtype"` + Tags string `json:"tags"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SnapshotService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SnapshotService.go index e3186e7e2..7733d8276 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SnapshotService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SnapshotService.go @@ -171,13 +171,14 @@ func (s *SnapshotService) CreateSnapshot(p *CreateSnapshotParams) (*CreateSnapsh } type CreateSnapshotResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` Intervaltype string `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Locationtype string `json:"locationtype"` Name string `json:"name"` Osdisplayname string `json:"osdisplayname"` @@ -196,6 +197,33 @@ type CreateSnapshotResponse struct { Zoneid string `json:"zoneid"` } +func (r *CreateSnapshotResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias CreateSnapshotResponse + return json.Unmarshal(b, (*alias)(r)) +} + type CreateSnapshotPolicyParams struct { p map[string]interface{} } @@ -308,6 +336,8 @@ type CreateSnapshotPolicyResponse struct { Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Intervaltype int `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxsnaps int `json:"maxsnaps"` Schedule string `json:"schedule"` Timezone string `json:"timezone"` @@ -428,7 +458,6 @@ func (s *SnapshotService) CreateVMSnapshot(p *CreateVMSnapshotParams) (*CreateVM } type CreateVMSnapshotResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Current bool `json:"current"` @@ -437,6 +466,8 @@ type CreateVMSnapshotResponse struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Parent string `json:"parent"` ParentName string `json:"parentName"` @@ -511,8 +542,9 @@ func (s *SnapshotService) DeleteSnapshot(p *DeleteSnapshotParams) (*DeleteSnapsh } type DeleteSnapshotResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -576,6 +608,8 @@ func (s *SnapshotService) DeleteSnapshotPolicies(p *DeleteSnapshotPoliciesParams type DeleteSnapshotPoliciesResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -594,6 +628,14 @@ func (r *DeleteSnapshotPoliciesResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteSnapshotPoliciesResponse return json.Unmarshal(b, (*alias)(r)) } @@ -661,8 +703,9 @@ func (s *SnapshotService) DeleteVMSnapshot(p *DeleteVMSnapshotParams) (*DeleteVM } type DeleteVMSnapshotResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -812,6 +855,8 @@ type SnapshotPolicy struct { Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Intervaltype int `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxsnaps int `json:"maxsnaps"` Schedule string `json:"schedule"` Timezone string `json:"timezone"` @@ -1134,6 +1179,8 @@ type Snapshot struct { Domainid string `json:"domainid"` Id string `json:"id"` Intervaltype string `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Locationtype string `json:"locationtype"` Name string `json:"name"` Osdisplayname string `json:"osdisplayname"` @@ -1152,6 +1199,33 @@ type Snapshot struct { Zoneid string `json:"zoneid"` } +func (r *Snapshot) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias Snapshot + return json.Unmarshal(b, (*alias)(r)) +} + type ListVMSnapshotParams struct { p map[string]interface{} } @@ -1401,6 +1475,8 @@ type VMSnapshot struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Parent string `json:"parent"` ParentName string `json:"parentName"` @@ -1480,13 +1556,14 @@ func (s *SnapshotService) RevertSnapshot(p *RevertSnapshotParams) (*RevertSnapsh } type RevertSnapshotResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Created string `json:"created"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` Intervaltype string `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Locationtype string `json:"locationtype"` Name string `json:"name"` Osdisplayname string `json:"osdisplayname"` @@ -1505,6 +1582,33 @@ type RevertSnapshotResponse struct { Zoneid string `json:"zoneid"` } +func (r *RevertSnapshotResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RevertSnapshotResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RevertToVMSnapshotParams struct { p map[string]interface{} } @@ -1573,7 +1677,6 @@ func (s *SnapshotService) RevertToVMSnapshot(p *RevertToVMSnapshotParams) (*Reve } type RevertToVMSnapshotResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []RevertToVMSnapshotResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -1605,6 +1708,8 @@ type RevertToVMSnapshotResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -1614,7 +1719,7 @@ type RevertToVMSnapshotResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -1628,6 +1733,7 @@ type RevertToVMSnapshotResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1680,6 +1786,33 @@ type RevertToVMSnapshotResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *RevertToVMSnapshotResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RevertToVMSnapshotResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateSnapshotPolicyParams struct { p map[string]interface{} } @@ -1770,10 +1903,11 @@ func (s *SnapshotService) UpdateSnapshotPolicy(p *UpdateSnapshotPolicyParams) (* } type UpdateSnapshotPolicyResponse struct { - JobID string `json:"jobid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Intervaltype int `json:"intervaltype"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxsnaps int `json:"maxsnaps"` Schedule string `json:"schedule"` Timezone string `json:"timezone"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/StoragePoolService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/StoragePoolService.go index 4938f14ff..efd606b06 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/StoragePoolService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/StoragePoolService.go @@ -90,7 +90,6 @@ func (s *StoragePoolService) CancelStorageMaintenance(p *CancelStorageMaintenanc } type CancelStorageMaintenanceResponse struct { - JobID string `json:"jobid"` Allocatediops int64 `json:"allocatediops"` Capacityiops int64 `json:"capacityiops"` Clusterid string `json:"clusterid"` @@ -102,6 +101,8 @@ type CancelStorageMaintenanceResponse struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` @@ -186,7 +187,6 @@ func (s *StoragePoolService) EnableStorageMaintenance(p *EnableStorageMaintenanc } type EnableStorageMaintenanceResponse struct { - JobID string `json:"jobid"` Allocatediops int64 `json:"allocatediops"` Capacityiops int64 `json:"capacityiops"` Clusterid string `json:"clusterid"` @@ -198,6 +198,8 @@ type EnableStorageMaintenanceResponse struct { Hypervisor string `json:"hypervisor"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Overprovisionfactor string `json:"overprovisionfactor"` Path string `json:"path"` @@ -302,6 +304,8 @@ type ListStorageProvidersResponse struct { } type StorageProvider struct { - Name string `json:"name"` - Type string `json:"type"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Type string `json:"type"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/StratosphereSSPService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/StratosphereSSPService.go index 8a4d4914c..81d10596f 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/StratosphereSSPService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/StratosphereSSPService.go @@ -19,6 +19,7 @@ package cloudstack import ( "encoding/json" "net/url" + "strconv" ) type AddStratosphereSspParams struct { @@ -126,10 +127,12 @@ func (s *StratosphereSSPService) AddStratosphereSsp(p *AddStratosphereSspParams) } type AddStratosphereSspResponse struct { - Hostid string `json:"hostid"` - Name string `json:"name"` - Url string `json:"url"` - Zoneid string `json:"zoneid"` + Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Url string `json:"url"` + Zoneid string `json:"zoneid"` } type DeleteStratosphereSspParams struct { @@ -181,6 +184,8 @@ func (s *StratosphereSSPService) DeleteStratosphereSsp(p *DeleteStratosphereSspP type DeleteStratosphereSspResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -199,6 +204,14 @@ func (r *DeleteStratosphereSspResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteStratosphereSspResponse return json.Unmarshal(b, (*alias)(r)) } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SwiftService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SwiftService.go index e3161d95c..ded2b9589 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SwiftService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SwiftService.go @@ -105,6 +105,8 @@ func (s *SwiftService) AddSwift(p *AddSwiftParams) (*AddSwiftResponse, error) { type AddSwiftResponse struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` @@ -239,6 +241,8 @@ type ListSwiftsResponse struct { type Swift struct { Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Protocol string `json:"protocol"` Providername string `json:"providername"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SystemCapacityService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SystemCapacityService.go index 686521c51..c6d8ff9d7 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/SystemCapacityService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/SystemCapacityService.go @@ -171,6 +171,8 @@ type Capacity struct { Capacityused int64 `json:"capacityused"` Clusterid string `json:"clusterid"` Clustername string `json:"clustername"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Percentused string `json:"percentused"` Podid string `json:"podid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/TemplateService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/TemplateService.go index 2c40bbdee..2b8d76432 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/TemplateService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/TemplateService.go @@ -126,7 +126,6 @@ func (s *TemplateService) CopyTemplate(p *CopyTemplateParams) (*CopyTemplateResp } type CopyTemplateResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Accountid string `json:"accountid"` Bits int `json:"bits"` @@ -150,6 +149,8 @@ type CopyTemplateResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -159,16 +160,45 @@ type CopyTemplateResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *CopyTemplateResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias CopyTemplateResponse + return json.Unmarshal(b, (*alias)(r)) +} + type CreateTemplateParams struct { p map[string]interface{} } @@ -224,6 +254,10 @@ func (p *CreateTemplateParams) toURLValues() url.Values { if v, found := p.p["snapshotid"]; found { u.Set("snapshotid", v.(string)) } + if v, found := p.p["sshkeyenabled"]; found { + vv := strconv.FormatBool(v.(bool)) + u.Set("sshkeyenabled", vv) + } if v, found := p.p["templatetag"]; found { u.Set("templatetag", v.(string)) } @@ -335,6 +369,14 @@ func (p *CreateTemplateParams) SetSnapshotid(v string) { return } +func (p *CreateTemplateParams) SetSshkeyenabled(v bool) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["sshkeyenabled"] = v + return +} + func (p *CreateTemplateParams) SetTemplatetag(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -414,7 +456,6 @@ func (s *TemplateService) CreateTemplate(p *CreateTemplateParams) (*CreateTempla } type CreateTemplateResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Accountid string `json:"accountid"` Bits int `json:"bits"` @@ -438,6 +479,8 @@ type CreateTemplateResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -447,16 +490,45 @@ type CreateTemplateResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *CreateTemplateResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias CreateTemplateResponse + return json.Unmarshal(b, (*alias)(r)) +} + type DeleteTemplateParams struct { p map[string]interface{} } @@ -543,8 +615,9 @@ func (s *TemplateService) DeleteTemplate(p *DeleteTemplateParams) (*DeleteTempla } type DeleteTemplateResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -650,12 +723,13 @@ func (s *TemplateService) ExtractTemplate(p *ExtractTemplateParams) (*ExtractTem } type ExtractTemplateResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Created string `json:"created"` ExtractId string `json:"extractId"` ExtractMode string `json:"extractMode"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Resultstring string `json:"resultstring"` State string `json:"state"` @@ -955,6 +1029,8 @@ func (s *TemplateService) GetUploadParamsForTemplate(p *GetUploadParamsForTempla type GetUploadParamsForTemplateResponse struct { Expires string `json:"expires"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Metadata string `json:"metadata"` PostURL string `json:"postURL"` Signature string `json:"signature"` @@ -1050,6 +1126,8 @@ type TemplatePermission struct { Domainid string `json:"domainid"` Id string `json:"id"` Ispublic bool `json:"ispublic"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Projectids []string `json:"projectids"` } @@ -1402,6 +1480,8 @@ type Template struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1411,16 +1491,45 @@ type Template struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *Template) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias Template + return json.Unmarshal(b, (*alias)(r)) +} + type PrepareTemplateParams struct { p map[string]interface{} } @@ -1515,6 +1624,8 @@ type PrepareTemplateResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1524,16 +1635,45 @@ type PrepareTemplateResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *PrepareTemplateResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias PrepareTemplateResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RegisterTemplateParams struct { p map[string]interface{} } @@ -1883,6 +2023,8 @@ type RegisterTemplate struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -1892,16 +2034,45 @@ type RegisterTemplate struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *RegisterTemplate) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RegisterTemplate + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateTemplateParams struct { p map[string]interface{} } @@ -1961,6 +2132,10 @@ func (p *UpdateTemplateParams) toURLValues() url.Values { vv := strconv.Itoa(v.(int)) u.Set("sortkey", vv) } + if v, found := p.p["sshkeyenabled"]; found { + vv := strconv.FormatBool(v.(bool)) + u.Set("sshkeyenabled", vv) + } return u } @@ -2068,6 +2243,14 @@ func (p *UpdateTemplateParams) SetSortkey(v int) { return } +func (p *UpdateTemplateParams) SetSshkeyenabled(v bool) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["sshkeyenabled"] = v + return +} + // You should always use this function to get a new UpdateTemplateParams instance, // as then you are sure you have configured all required params func (s *TemplateService) NewUpdateTemplateParams(id string) *UpdateTemplateParams { @@ -2116,6 +2299,8 @@ type UpdateTemplateResponse struct { Isfeatured bool `json:"isfeatured"` Ispublic bool `json:"ispublic"` Isready bool `json:"isready"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Ostypeid string `json:"ostypeid"` Ostypename string `json:"ostypename"` @@ -2125,16 +2310,45 @@ type UpdateTemplateResponse struct { Project string `json:"project"` Projectid string `json:"projectid"` Removed string `json:"removed"` + Requireshvm bool `json:"requireshvm"` Size int64 `json:"size"` Sourcetemplateid string `json:"sourcetemplateid"` Sshkeyenabled bool `json:"sshkeyenabled"` Status string `json:"status"` + Tags []Tags `json:"tags"` Templatetag string `json:"templatetag"` Templatetype string `json:"templatetype"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } +func (r *UpdateTemplateResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateTemplateResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateTemplatePermissionsParams struct { p map[string]interface{} } @@ -2255,6 +2469,8 @@ func (s *TemplateService) UpdateTemplatePermissions(p *UpdateTemplatePermissions type UpdateTemplatePermissionsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2273,6 +2489,14 @@ func (r *UpdateTemplatePermissionsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias UpdateTemplatePermissionsResponse return json.Unmarshal(b, (*alias)(r)) } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UCSService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UCSService.go index c3e1ed449..bf109f04d 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UCSService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UCSService.go @@ -119,10 +119,12 @@ func (s *UCSService) AddUcsManager(p *AddUcsManagerParams) (*AddUcsManagerRespon } type AddUcsManagerResponse struct { - Id string `json:"id"` - Name string `json:"name"` - Url string `json:"url"` - Zoneid string `json:"zoneid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Url string `json:"url"` + Zoneid string `json:"zoneid"` } type AssociateUcsProfileToBladeParams struct { @@ -217,10 +219,11 @@ func (s *UCSService) AssociateUcsProfileToBlade(p *AssociateUcsProfileToBladePar } type AssociateUcsProfileToBladeResponse struct { - JobID string `json:"jobid"` Bladedn string `json:"bladedn"` Hostid string `json:"hostid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Profiledn string `json:"profiledn"` Ucsmanagerid string `json:"ucsmanagerid"` } @@ -274,6 +277,8 @@ func (s *UCSService) DeleteUcsManager(p *DeleteUcsManagerParams) (*DeleteUcsMana type DeleteUcsManagerResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -292,6 +297,14 @@ func (r *DeleteUcsManagerResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteUcsManagerResponse return json.Unmarshal(b, (*alias)(r)) } @@ -387,6 +400,8 @@ type UcsBlade struct { Bladedn string `json:"bladedn"` Hostid string `json:"hostid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Profiledn string `json:"profiledn"` Ucsmanagerid string `json:"ucsmanagerid"` } @@ -572,10 +587,12 @@ type ListUcsManagersResponse struct { } type UcsManager struct { - Id string `json:"id"` - Name string `json:"name"` - Url string `json:"url"` - Zoneid string `json:"zoneid"` + Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Name string `json:"name"` + Url string `json:"url"` + Zoneid string `json:"zoneid"` } type ListUcsProfilesParams struct { @@ -666,5 +683,7 @@ type ListUcsProfilesResponse struct { } type UcsProfile struct { - Ucsdn string `json:"ucsdn"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Ucsdn string `json:"ucsdn"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UsageService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UsageService.go index 63a99ae5a..e6632e77a 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UsageService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UsageService.go @@ -107,6 +107,8 @@ func (s *UsageService) AddTrafficMonitor(p *AddTrafficMonitorParams) (*AddTraffi type AddTrafficMonitorResponse struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Numretries string `json:"numretries"` Timeout string `json:"timeout"` Zoneid string `json:"zoneid"` @@ -269,9 +271,10 @@ func (s *UsageService) AddTrafficType(p *AddTrafficTypeParams) (*AddTrafficTypeR } type AddTrafficTypeResponse struct { - JobID string `json:"jobid"` Hypervnetworklabel string `json:"hypervnetworklabel"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Kvmnetworklabel string `json:"kvmnetworklabel"` Ovm3networklabel string `json:"ovm3networklabel"` Physicalnetworkid string `json:"physicalnetworkid"` @@ -329,6 +332,8 @@ func (s *UsageService) DeleteTrafficMonitor(p *DeleteTrafficMonitorParams) (*Del type DeleteTrafficMonitorResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -347,6 +352,14 @@ func (r *DeleteTrafficMonitorResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteTrafficMonitorResponse return json.Unmarshal(b, (*alias)(r)) } @@ -414,8 +427,9 @@ func (s *UsageService) DeleteTrafficType(p *DeleteTrafficTypeParams) (*DeleteTra } type DeleteTrafficTypeResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -491,6 +505,8 @@ func (s *UsageService) GenerateUsageRecords(p *GenerateUsageRecordsParams) (*Gen type GenerateUsageRecordsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -509,6 +525,14 @@ func (r *GenerateUsageRecordsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias GenerateUsageRecordsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -603,6 +627,8 @@ type ListTrafficMonitorsResponse struct { type TrafficMonitor struct { Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Numretries string `json:"numretries"` Timeout string `json:"timeout"` Zoneid string `json:"zoneid"` @@ -695,6 +721,8 @@ type ListTrafficTypeImplementorsResponse struct { } type TrafficTypeImplementor struct { + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Traffictype string `json:"traffictype"` Traffictypeimplementor string `json:"traffictypeimplementor"` } @@ -827,6 +855,8 @@ type TrafficType struct { Canenableindividualservice bool `json:"canenableindividualservice"` Destinationphysicalnetworkid string `json:"destinationphysicalnetworkid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Physicalnetworkid string `json:"physicalnetworkid"` Servicelist []string `json:"servicelist"` @@ -1023,6 +1053,8 @@ type UsageRecord struct { Isdefault bool `json:"isdefault"` Issourcenat bool `json:"issourcenat"` Issystem bool `json:"issystem"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Memory int64 `json:"memory"` Name string `json:"name"` Networkid string `json:"networkid"` @@ -1032,6 +1064,7 @@ type UsageRecord struct { Rawusage string `json:"rawusage"` Size int64 `json:"size"` Startdate string `json:"startdate"` + Tags []Tags `json:"tags"` Templateid string `json:"templateid"` Type string `json:"type"` Usage string `json:"usage"` @@ -1084,6 +1117,8 @@ type ListUsageTypesResponse struct { type UsageType struct { Description string `json:"description"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Usagetypeid int `json:"usagetypeid"` } @@ -1137,6 +1172,8 @@ func (s *UsageService) RemoveRawUsageRecords(p *RemoveRawUsageRecordsParams) (*R type RemoveRawUsageRecordsResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1155,6 +1192,14 @@ func (r *RemoveRawUsageRecordsResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias RemoveRawUsageRecordsResponse return json.Unmarshal(b, (*alias)(r)) } @@ -1282,9 +1327,10 @@ func (s *UsageService) UpdateTrafficType(p *UpdateTrafficTypeParams) (*UpdateTra } type UpdateTrafficTypeResponse struct { - JobID string `json:"jobid"` Hypervnetworklabel string `json:"hypervnetworklabel"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Kvmnetworklabel string `json:"kvmnetworklabel"` Ovm3networklabel string `json:"ovm3networklabel"` Physicalnetworkid string `json:"physicalnetworkid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UserService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UserService.go index ba98845b3..cf121e66f 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/UserService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/UserService.go @@ -181,6 +181,8 @@ type CreateUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -241,6 +243,8 @@ func (s *UserService) DeleteUser(p *DeleteUserParams) (*DeleteUserResponse, erro type DeleteUserResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -259,6 +263,14 @@ func (r *DeleteUserResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteUserResponse return json.Unmarshal(b, (*alias)(r)) } @@ -331,7 +343,6 @@ func (s *UserService) DisableUser(p *DisableUserParams) (*DisableUserResponse, e } type DisableUserResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Accountid string `json:"accountid"` Accounttype int `json:"accounttype"` @@ -344,6 +355,8 @@ type DisableUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -415,6 +428,8 @@ type EnableUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -486,6 +501,8 @@ type GetUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -545,6 +562,8 @@ func (s *UserService) GetVirtualMachineUserData(p *GetVirtualMachineUserDataPara } type GetVirtualMachineUserDataResponse struct { + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Userdata string `json:"userdata"` Virtualmachineid string `json:"virtualmachineid"` } @@ -761,6 +780,8 @@ type User struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -832,6 +853,8 @@ type LockUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` @@ -896,6 +919,8 @@ func (s *UserService) RegisterUserKeys(p *RegisterUserKeysParams) (*RegisterUser type RegisterUserKeysResponse struct { Apikey string `json:"apikey"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Secretkey string `json:"secretkey"` } @@ -908,6 +933,9 @@ func (p *UpdateUserParams) toURLValues() url.Values { if p.p == nil { return u } + if v, found := p.p["currentpassword"]; found { + u.Set("currentpassword", v.(string)) + } if v, found := p.p["email"]; found { u.Set("email", v.(string)) } @@ -938,6 +966,14 @@ func (p *UpdateUserParams) toURLValues() url.Values { return u } +func (p *UpdateUserParams) SetCurrentpassword(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["currentpassword"] = v + return +} + func (p *UpdateUserParams) SetEmail(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1047,6 +1083,8 @@ type UpdateUserResponse struct { Id string `json:"id"` Iscallerchilddomain bool `json:"iscallerchilddomain"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Lastname string `json:"lastname"` Roleid string `json:"roleid"` Rolename string `json:"rolename"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VLANService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VLANService.go index 754b19e7d..15555c40b 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VLANService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VLANService.go @@ -272,6 +272,8 @@ type CreateVlanIpRangeResponse struct { Id string `json:"id"` Ip6cidr string `json:"ip6cidr"` Ip6gateway string `json:"ip6gateway"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` @@ -383,6 +385,8 @@ type DedicateGuestVlanRangeResponse struct { Domainid string `json:"domainid"` Guestvlanrange string `json:"guestvlanrange"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid int64 `json:"physicalnetworkid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -438,6 +442,8 @@ func (s *VLANService) DeleteVlanIpRange(p *DeleteVlanIpRangeParams) (*DeleteVlan type DeleteVlanIpRangeResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -456,6 +462,14 @@ func (r *DeleteVlanIpRangeResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteVlanIpRangeResponse return json.Unmarshal(b, (*alias)(r)) } @@ -651,6 +665,8 @@ type DedicatedGuestVlanRange struct { Domainid string `json:"domainid"` Guestvlanrange string `json:"guestvlanrange"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Physicalnetworkid int64 `json:"physicalnetworkid"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -889,6 +905,8 @@ type VlanIpRange struct { Id string `json:"id"` Ip6cidr string `json:"ip6cidr"` Ip6gateway string `json:"ip6gateway"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Networkid string `json:"networkid"` Physicalnetworkid string `json:"physicalnetworkid"` @@ -965,7 +983,8 @@ func (s *VLANService) ReleaseDedicatedGuestVlanRange(p *ReleaseDedicatedGuestVla } type ReleaseDedicatedGuestVlanRangeResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VMGroupService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VMGroupService.go index 83c32381c..450010a7b 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VMGroupService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VMGroupService.go @@ -110,6 +110,8 @@ type CreateInstanceGroupResponse struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -164,6 +166,8 @@ func (s *VMGroupService) DeleteInstanceGroup(p *DeleteInstanceGroupParams) (*Del type DeleteInstanceGroupResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -182,6 +186,14 @@ func (r *DeleteInstanceGroupResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteInstanceGroupResponse return json.Unmarshal(b, (*alias)(r)) } @@ -429,6 +441,8 @@ type InstanceGroup struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -498,6 +512,8 @@ type UpdateInstanceGroupResponse struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPCService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPCService.go index 149bb4fe5..4ce00e2e1 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPCService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPCService.go @@ -185,7 +185,6 @@ func (s *VPCService) CreatePrivateGateway(p *CreatePrivateGatewayParams) (*Creat } type CreatePrivateGatewayResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Aclid string `json:"aclid"` Domain string `json:"domain"` @@ -193,6 +192,8 @@ type CreatePrivateGatewayResponse struct { Gateway string `json:"gateway"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` @@ -285,13 +286,14 @@ func (s *VPCService) CreateStaticRoute(p *CreateStaticRouteParams) (*CreateStati } type CreateStaticRouteResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Domain string `json:"domain"` Domainid string `json:"domainid"` Gatewayid string `json:"gatewayid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` State string `json:"state"` @@ -483,7 +485,6 @@ func (s *VPCService) CreateVPC(p *CreateVPCParams) (*CreateVPCResponse, error) { } type CreateVPCResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Created string `json:"created"` @@ -493,6 +494,8 @@ type CreateVPCResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Network []CreateVPCResponseNetwork `json:"network"` Networkdomain string `json:"networkdomain"` @@ -742,12 +745,13 @@ func (s *VPCService) CreateVPCOffering(p *CreateVPCOfferingParams) (*CreateVPCOf } type CreateVPCOfferingResponse struct { - JobID string `json:"jobid"` Created string `json:"created"` Displaytext string `json:"displaytext"` Distributedvpcrouter bool `json:"distributedvpcrouter"` Id string `json:"id"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Service []CreateVPCOfferingResponseService `json:"service"` State string `json:"state"` @@ -839,8 +843,9 @@ func (s *VPCService) DeletePrivateGateway(p *DeletePrivateGatewayParams) (*Delet } type DeletePrivateGatewayResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -907,8 +912,9 @@ func (s *VPCService) DeleteStaticRoute(p *DeleteStaticRouteParams) (*DeleteStati } type DeleteStaticRouteResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -975,8 +981,9 @@ func (s *VPCService) DeleteVPC(p *DeleteVPCParams) (*DeleteVPCResponse, error) { } type DeleteVPCResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1043,8 +1050,9 @@ func (s *VPCService) DeleteVPCOffering(p *DeleteVPCOfferingParams) (*DeleteVPCOf } type DeleteVPCOfferingResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1276,6 +1284,8 @@ type PrivateGateway struct { Gateway string `json:"gateway"` Id string `json:"id"` Ipaddress string `json:"ipaddress"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Netmask string `json:"netmask"` Physicalnetworkid string `json:"physicalnetworkid"` Project string `json:"project"` @@ -1509,6 +1519,8 @@ type StaticRoute struct { Domainid string `json:"domainid"` Gatewayid string `json:"gatewayid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` State string `json:"state"` @@ -1748,6 +1760,8 @@ type VPCOffering struct { Distributedvpcrouter bool `json:"distributedvpcrouter"` Id string `json:"id"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Service []VPCOfferingService `json:"service"` State string `json:"state"` @@ -2130,6 +2144,8 @@ type VPC struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Network []VPCNetwork `json:"network"` Networkdomain string `json:"networkdomain"` @@ -2335,7 +2351,6 @@ func (s *VPCService) RestartVPC(p *RestartVPCParams) (*RestartVPCResponse, error } type RestartVPCResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Created string `json:"created"` @@ -2345,6 +2360,8 @@ type RestartVPCResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Network []RestartVPCResponseNetwork `json:"network"` Networkdomain string `json:"networkdomain"` @@ -2571,7 +2588,6 @@ func (s *VPCService) UpdateVPC(p *UpdateVPCParams) (*UpdateVPCResponse, error) { } type UpdateVPCResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidr string `json:"cidr"` Created string `json:"created"` @@ -2581,6 +2597,8 @@ type UpdateVPCResponse struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Network []UpdateVPCResponseNetwork `json:"network"` Networkdomain string `json:"networkdomain"` @@ -2795,12 +2813,13 @@ func (s *VPCService) UpdateVPCOffering(p *UpdateVPCOfferingParams) (*UpdateVPCOf } type UpdateVPCOfferingResponse struct { - JobID string `json:"jobid"` Created string `json:"created"` Displaytext string `json:"displaytext"` Distributedvpcrouter bool `json:"distributedvpcrouter"` Id string `json:"id"` Isdefault bool `json:"isdefault"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Service []UpdateVPCOfferingResponseService `json:"service"` State string `json:"state"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPNService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPNService.go index 796de853c..01f651a66 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPNService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VPNService.go @@ -137,11 +137,12 @@ func (s *VPNService) AddVpnUser(p *AddVpnUserParams) (*AddVpnUserResponse, error } type AddVpnUserResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` State string `json:"state"` @@ -273,13 +274,14 @@ func (s *VPNService) CreateRemoteAccessVpn(p *CreateRemoteAccessVpnParams) (*Cre } type CreateRemoteAccessVpnResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Iprange string `json:"iprange"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Presharedkey string `json:"presharedkey"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -392,7 +394,6 @@ func (s *VPNService) CreateVpnConnection(p *CreateVpnConnectionParams) (*CreateV } type CreateVpnConnectionResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidrlist string `json:"cidrlist"` Created string `json:"created"` @@ -408,6 +409,8 @@ type CreateVpnConnectionResponse struct { Ikelifetime int64 `json:"ikelifetime"` Ikepolicy string `json:"ikepolicy"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Passive bool `json:"passive"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -626,7 +629,6 @@ func (s *VPNService) CreateVpnCustomerGateway(p *CreateVpnCustomerGatewayParams) } type CreateVpnCustomerGatewayResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidrlist string `json:"cidrlist"` Domain string `json:"domain"` @@ -641,6 +643,8 @@ type CreateVpnCustomerGatewayResponse struct { Ikepolicy string `json:"ikepolicy"` Ipaddress string `json:"ipaddress"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -727,12 +731,13 @@ func (s *VPNService) CreateVpnGateway(p *CreateVpnGatewayParams) (*CreateVpnGate } type CreateVpnGatewayResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Publicip string `json:"publicip"` @@ -803,8 +808,9 @@ func (s *VPNService) DeleteRemoteAccessVpn(p *DeleteRemoteAccessVpnParams) (*Del } type DeleteRemoteAccessVpnResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -871,8 +877,9 @@ func (s *VPNService) DeleteVpnConnection(p *DeleteVpnConnectionParams) (*DeleteV } type DeleteVpnConnectionResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -939,8 +946,9 @@ func (s *VPNService) DeleteVpnCustomerGateway(p *DeleteVpnCustomerGatewayParams) } type DeleteVpnCustomerGatewayResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1007,8 +1015,9 @@ func (s *VPNService) DeleteVpnGateway(p *DeleteVpnGatewayParams) (*DeleteVpnGate } type DeleteVpnGatewayResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1229,6 +1238,8 @@ type RemoteAccessVpn struct { Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Iprange string `json:"iprange"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Presharedkey string `json:"presharedkey"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1452,6 +1463,8 @@ type VpnConnection struct { Ikelifetime int64 `json:"ikelifetime"` Ikepolicy string `json:"ikepolicy"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Passive bool `json:"passive"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1703,6 +1716,8 @@ type VpnCustomerGateway struct { Ikepolicy string `json:"ikepolicy"` Ipaddress string `json:"ipaddress"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -1914,6 +1929,8 @@ type VpnGateway struct { Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Publicip string `json:"publicip"` @@ -2113,6 +2130,8 @@ type VpnUser struct { Domain string `json:"domain"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` State string `json:"state"` @@ -2215,8 +2234,9 @@ func (s *VPNService) RemoveVpnUser(p *RemoveVpnUserParams) (*RemoveVpnUserRespon } type RemoveVpnUserResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -2310,7 +2330,6 @@ func (s *VPNService) ResetVpnConnection(p *ResetVpnConnectionParams) (*ResetVpnC } type ResetVpnConnectionResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidrlist string `json:"cidrlist"` Created string `json:"created"` @@ -2326,6 +2345,8 @@ type ResetVpnConnectionResponse struct { Ikelifetime int64 `json:"ikelifetime"` Ikepolicy string `json:"ikepolicy"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Passive bool `json:"passive"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -2427,13 +2448,14 @@ func (s *VPNService) UpdateRemoteAccessVpn(p *UpdateRemoteAccessVpnParams) (*Upd } type UpdateRemoteAccessVpnResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` Iprange string `json:"iprange"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Presharedkey string `json:"presharedkey"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -2533,7 +2555,6 @@ func (s *VPNService) UpdateVpnConnection(p *UpdateVpnConnectionParams) (*UpdateV } type UpdateVpnConnectionResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidrlist string `json:"cidrlist"` Created string `json:"created"` @@ -2549,6 +2570,8 @@ type UpdateVpnConnectionResponse struct { Ikelifetime int64 `json:"ikelifetime"` Ikepolicy string `json:"ikepolicy"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Passive bool `json:"passive"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -2768,7 +2791,6 @@ func (s *VPNService) UpdateVpnCustomerGateway(p *UpdateVpnCustomerGatewayParams) } type UpdateVpnCustomerGatewayResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Cidrlist string `json:"cidrlist"` Domain string `json:"domain"` @@ -2783,6 +2805,8 @@ type UpdateVpnCustomerGatewayResponse struct { Ikepolicy string `json:"ikepolicy"` Ipaddress string `json:"ipaddress"` Ipsecpsk string `json:"ipsecpsk"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Project string `json:"project"` Projectid string `json:"projectid"` @@ -2880,12 +2904,13 @@ func (s *VPNService) UpdateVpnGateway(p *UpdateVpnGatewayParams) (*UpdateVpnGate } type UpdateVpnGatewayResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Domain string `json:"domain"` Domainid string `json:"domainid"` Fordisplay bool `json:"fordisplay"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Project string `json:"project"` Projectid string `json:"projectid"` Publicip string `json:"publicip"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VirtualMachineService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VirtualMachineService.go index 638d81482..431de3ad8 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VirtualMachineService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VirtualMachineService.go @@ -142,7 +142,6 @@ func (s *VirtualMachineService) AddNicToVirtualMachine(p *AddNicToVirtualMachine } type AddNicToVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []AddNicToVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -174,6 +173,8 @@ type AddNicToVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -183,7 +184,7 @@ type AddNicToVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -197,6 +198,7 @@ type AddNicToVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -249,6 +251,33 @@ type AddNicToVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *AddNicToVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias AddNicToVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type AssignVirtualMachineParams struct { p map[string]interface{} } @@ -385,6 +414,8 @@ type AssignVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -394,7 +425,7 @@ type AssignVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -408,6 +439,7 @@ type AssignVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -460,6 +492,33 @@ type AssignVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *AssignVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias AssignVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ChangeServiceForVirtualMachineParams struct { p map[string]interface{} } @@ -566,6 +625,8 @@ type ChangeServiceForVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -575,7 +636,7 @@ type ChangeServiceForVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -589,6 +650,7 @@ type ChangeServiceForVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -641,6 +703,33 @@ type ChangeServiceForVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *ChangeServiceForVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias ChangeServiceForVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type CleanVMReservationsParams struct { p map[string]interface{} } @@ -692,8 +781,9 @@ func (s *VirtualMachineService) CleanVMReservations(p *CleanVMReservationsParams } type CleanVMReservationsResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -759,6 +849,9 @@ func (p *DeployVirtualMachineParams) toURLValues() url.Values { if v, found := p.p["domainid"]; found { u.Set("domainid", v.(string)) } + if v, found := p.p["extraconfig"]; found { + u.Set("extraconfig", v.(string)) + } if v, found := p.p["group"]; found { u.Set("group", v.(string)) } @@ -932,6 +1025,14 @@ func (p *DeployVirtualMachineParams) SetDomainid(v string) { return } +func (p *DeployVirtualMachineParams) SetExtraconfig(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["extraconfig"] = v + return +} + func (p *DeployVirtualMachineParams) SetGroup(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1147,7 +1248,6 @@ func (s *VirtualMachineService) DeployVirtualMachine(p *DeployVirtualMachinePara } type DeployVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []DeployVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -1179,6 +1279,8 @@ type DeployVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -1188,7 +1290,7 @@ type DeployVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -1202,6 +1304,7 @@ type DeployVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1254,6 +1357,33 @@ type DeployVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *DeployVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias DeployVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type DestroyVirtualMachineParams struct { p map[string]interface{} } @@ -1270,6 +1400,10 @@ func (p *DestroyVirtualMachineParams) toURLValues() url.Values { if v, found := p.p["id"]; found { u.Set("id", v.(string)) } + if v, found := p.p["volumeids"]; found { + vv := strings.Join(v.([]string), ",") + u.Set("volumeids", vv) + } return u } @@ -1289,6 +1423,14 @@ func (p *DestroyVirtualMachineParams) SetId(v string) { return } +func (p *DestroyVirtualMachineParams) SetVolumeids(v []string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["volumeids"] = v + return +} + // You should always use this function to get a new DestroyVirtualMachineParams instance, // as then you are sure you have configured all required params func (s *VirtualMachineService) NewDestroyVirtualMachineParams(id string) *DestroyVirtualMachineParams { @@ -1334,7 +1476,6 @@ func (s *VirtualMachineService) DestroyVirtualMachine(p *DestroyVirtualMachinePa } type DestroyVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []DestroyVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -1366,6 +1507,8 @@ type DestroyVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -1375,7 +1518,7 @@ type DestroyVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -1389,6 +1532,7 @@ type DestroyVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1441,6 +1585,33 @@ type DestroyVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *DestroyVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias DestroyVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ExpungeVirtualMachineParams struct { p map[string]interface{} } @@ -1504,8 +1675,9 @@ func (s *VirtualMachineService) ExpungeVirtualMachine(p *ExpungeVirtualMachinePa } type ExpungeVirtualMachineResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1558,6 +1730,8 @@ func (s *VirtualMachineService) GetVMPassword(p *GetVMPasswordParams) (*GetVMPas type GetVMPasswordResponse struct { Encryptedpassword string `json:"encryptedpassword"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` } type ListVirtualMachinesParams struct { @@ -2058,6 +2232,8 @@ type VirtualMachine struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2067,7 +2243,7 @@ type VirtualMachine struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2081,6 +2257,7 @@ type VirtualMachine struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2133,6 +2310,33 @@ type VirtualMachineAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *VirtualMachine) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias VirtualMachine + return json.Unmarshal(b, (*alias)(r)) +} + type MigrateVirtualMachineParams struct { p map[string]interface{} } @@ -2223,7 +2427,6 @@ func (s *VirtualMachineService) MigrateVirtualMachine(p *MigrateVirtualMachinePa } type MigrateVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []MigrateVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -2255,6 +2458,8 @@ type MigrateVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2264,7 +2469,7 @@ type MigrateVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2278,6 +2483,7 @@ type MigrateVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2330,6 +2536,33 @@ type MigrateVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *MigrateVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias MigrateVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type MigrateVirtualMachineWithVolumeParams struct { p map[string]interface{} } @@ -2426,7 +2659,6 @@ func (s *VirtualMachineService) MigrateVirtualMachineWithVolume(p *MigrateVirtua } type MigrateVirtualMachineWithVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []MigrateVirtualMachineWithVolumeResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -2458,6 +2690,8 @@ type MigrateVirtualMachineWithVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2467,7 +2701,7 @@ type MigrateVirtualMachineWithVolumeResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2481,6 +2715,7 @@ type MigrateVirtualMachineWithVolumeResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2533,6 +2768,33 @@ type MigrateVirtualMachineWithVolumeResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *MigrateVirtualMachineWithVolumeResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias MigrateVirtualMachineWithVolumeResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RebootVirtualMachineParams struct { p map[string]interface{} } @@ -2601,7 +2863,6 @@ func (s *VirtualMachineService) RebootVirtualMachine(p *RebootVirtualMachinePara } type RebootVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []RebootVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -2633,6 +2894,8 @@ type RebootVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2642,7 +2905,7 @@ type RebootVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2656,6 +2919,7 @@ type RebootVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2708,6 +2972,33 @@ type RebootVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *RebootVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RebootVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RecoverVirtualMachineParams struct { p map[string]interface{} } @@ -2787,6 +3078,8 @@ type RecoverVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2796,7 +3089,7 @@ type RecoverVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2810,6 +3103,7 @@ type RecoverVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2862,6 +3156,33 @@ type RecoverVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *RecoverVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RecoverVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RemoveNicFromVirtualMachineParams struct { p map[string]interface{} } @@ -2942,7 +3263,6 @@ func (s *VirtualMachineService) RemoveNicFromVirtualMachine(p *RemoveNicFromVirt } type RemoveNicFromVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []RemoveNicFromVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -2974,6 +3294,8 @@ type RemoveNicFromVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -2983,7 +3305,7 @@ type RemoveNicFromVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -2997,6 +3319,7 @@ type RemoveNicFromVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -3049,6 +3372,33 @@ type RemoveNicFromVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *RemoveNicFromVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RemoveNicFromVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ResetPasswordForVirtualMachineParams struct { p map[string]interface{} } @@ -3117,7 +3467,6 @@ func (s *VirtualMachineService) ResetPasswordForVirtualMachine(p *ResetPasswordF } type ResetPasswordForVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []ResetPasswordForVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -3149,6 +3498,8 @@ type ResetPasswordForVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -3158,7 +3509,7 @@ type ResetPasswordForVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -3172,6 +3523,7 @@ type ResetPasswordForVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -3224,6 +3576,33 @@ type ResetPasswordForVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *ResetPasswordForVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias ResetPasswordForVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type RestoreVirtualMachineParams struct { p map[string]interface{} } @@ -3303,7 +3682,6 @@ func (s *VirtualMachineService) RestoreVirtualMachine(p *RestoreVirtualMachinePa } type RestoreVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []RestoreVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -3335,6 +3713,8 @@ type RestoreVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -3344,7 +3724,7 @@ type RestoreVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -3358,6 +3738,7 @@ type RestoreVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -3410,6 +3791,33 @@ type RestoreVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *RestoreVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias RestoreVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type ScaleVirtualMachineParams struct { p map[string]interface{} } @@ -3500,8 +3908,9 @@ func (s *VirtualMachineService) ScaleVirtualMachine(p *ScaleVirtualMachineParams } type ScaleVirtualMachineResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -3595,7 +4004,6 @@ func (s *VirtualMachineService) StartVirtualMachine(p *StartVirtualMachineParams } type StartVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []StartVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -3627,6 +4035,8 @@ type StartVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -3636,7 +4046,7 @@ type StartVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -3650,6 +4060,7 @@ type StartVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -3702,6 +4113,33 @@ type StartVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *StartVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias StartVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type StopVirtualMachineParams struct { p map[string]interface{} } @@ -3782,7 +4220,6 @@ func (s *VirtualMachineService) StopVirtualMachine(p *StopVirtualMachineParams) } type StopVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []StopVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -3814,6 +4251,8 @@ type StopVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -3823,7 +4262,7 @@ type StopVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -3837,6 +4276,7 @@ type StopVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -3889,6 +4329,33 @@ type StopVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *StopVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias StopVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateDefaultNicForVirtualMachineParams struct { p map[string]interface{} } @@ -3969,7 +4436,6 @@ func (s *VirtualMachineService) UpdateDefaultNicForVirtualMachine(p *UpdateDefau } type UpdateDefaultNicForVirtualMachineResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Affinitygroup []UpdateDefaultNicForVirtualMachineResponseAffinitygroup `json:"affinitygroup"` Cpunumber int `json:"cpunumber"` @@ -4001,6 +4467,8 @@ type UpdateDefaultNicForVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -4010,7 +4478,7 @@ type UpdateDefaultNicForVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -4024,6 +4492,7 @@ type UpdateDefaultNicForVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -4076,6 +4545,33 @@ type UpdateDefaultNicForVirtualMachineResponseAffinitygroup struct { VirtualmachineIds []string `json:"virtualmachineIds"` } +func (r *UpdateDefaultNicForVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateDefaultNicForVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} + type UpdateVirtualMachineParams struct { p map[string]interface{} } @@ -4114,6 +4610,9 @@ func (p *UpdateVirtualMachineParams) toURLValues() url.Values { vv := strconv.FormatBool(v.(bool)) u.Set("displayvm", vv) } + if v, found := p.p["extraconfig"]; found { + u.Set("extraconfig", v.(string)) + } if v, found := p.p["group"]; found { u.Set("group", v.(string)) } @@ -4199,6 +4698,14 @@ func (p *UpdateVirtualMachineParams) SetDisplayvm(v bool) { return } +func (p *UpdateVirtualMachineParams) SetExtraconfig(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["extraconfig"] = v + return +} + func (p *UpdateVirtualMachineParams) SetGroup(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -4335,6 +4842,8 @@ type UpdateVirtualMachineResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Keypair string `json:"keypair"` Memory int `json:"memory"` Memoryintfreekbs int64 `json:"memoryintfreekbs"` @@ -4344,7 +4853,7 @@ type UpdateVirtualMachineResponse struct { Networkkbsread int64 `json:"networkkbsread"` Networkkbswrite int64 `json:"networkkbswrite"` Nic []Nic `json:"nic"` - Ostypeid int64 `json:"ostypeid"` + Ostypeid string `json:"ostypeid"` Password string `json:"password"` Passwordenabled bool `json:"passwordenabled"` Project string `json:"project"` @@ -4358,6 +4867,7 @@ type UpdateVirtualMachineResponse struct { Serviceofferingname string `json:"serviceofferingname"` Servicestate string `json:"servicestate"` State string `json:"state"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -4409,3 +4919,30 @@ type UpdateVirtualMachineResponseAffinitygroup struct { Type string `json:"type"` VirtualmachineIds []string `json:"virtualmachineIds"` } + +func (r *UpdateVirtualMachineResponse) UnmarshalJSON(b []byte) error { + var m map[string]interface{} + err := json.Unmarshal(b, &m) + if err != nil { + return err + } + + if success, ok := m["success"].(string); ok { + m["success"] = success == "true" + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + + type alias UpdateVirtualMachineResponse + return json.Unmarshal(b, (*alias)(r)) +} diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VolumeService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VolumeService.go index e7cf73f7c..e95c5e0d1 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/VolumeService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/VolumeService.go @@ -116,7 +116,6 @@ func (s *VolumeService) AttachVolume(p *AttachVolumeParams) (*AttachVolumeRespon } type AttachVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -141,6 +140,8 @@ type AttachVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -162,6 +163,7 @@ type AttachVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -379,7 +381,6 @@ func (s *VolumeService) CreateVolume(p *CreateVolumeParams) (*CreateVolumeRespon } type CreateVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -404,6 +405,8 @@ type CreateVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -425,6 +428,7 @@ type CreateVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -488,6 +492,8 @@ func (s *VolumeService) DeleteVolume(p *DeleteVolumeParams) (*DeleteVolumeRespon type DeleteVolumeResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -506,6 +512,14 @@ func (r *DeleteVolumeResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteVolumeResponse return json.Unmarshal(b, (*alias)(r)) } @@ -600,7 +614,6 @@ func (s *VolumeService) DetachVolume(p *DetachVolumeParams) (*DetachVolumeRespon } type DetachVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -625,6 +638,8 @@ type DetachVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -646,6 +661,7 @@ type DetachVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -763,12 +779,13 @@ func (s *VolumeService) ExtractVolume(p *ExtractVolumeParams) (*ExtractVolumeRes } type ExtractVolumeResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Created string `json:"created"` ExtractId string `json:"extractId"` ExtractMode string `json:"extractMode"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Name string `json:"name"` Resultstring string `json:"resultstring"` State string `json:"state"` @@ -828,7 +845,9 @@ func (s *VolumeService) GetPathForVolume(p *GetPathForVolumeParams) (*GetPathFor } type GetPathForVolumeResponse struct { - Path string `json:"path"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + Path string `json:"path"` } type GetSolidFireVolumeSizeParams struct { @@ -879,7 +898,9 @@ func (s *VolumeService) GetSolidFireVolumeSize(p *GetSolidFireVolumeSizeParams) } type GetSolidFireVolumeSizeResponse struct { - SolidFireVolumeSize int64 `json:"solidFireVolumeSize"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` + SolidFireVolumeSize int64 `json:"solidFireVolumeSize"` } type GetUploadParamsForVolumeParams struct { @@ -1022,6 +1043,8 @@ func (s *VolumeService) GetUploadParamsForVolume(p *GetUploadParamsForVolumePara type GetUploadParamsForVolumeResponse struct { Expires string `json:"expires"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Metadata string `json:"metadata"` PostURL string `json:"postURL"` Signature string `json:"signature"` @@ -1075,6 +1098,8 @@ func (s *VolumeService) GetVolumeiScsiName(p *GetVolumeiScsiNameParams) (*GetVol } type GetVolumeiScsiNameResponse struct { + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` VolumeiScsiName string `json:"volumeiScsiName"` } @@ -1468,6 +1493,8 @@ type Volume struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -1489,6 +1516,7 @@ type Volume struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1516,6 +1544,9 @@ func (p *MigrateVolumeParams) toURLValues() url.Values { vv := strconv.FormatBool(v.(bool)) u.Set("livemigrate", vv) } + if v, found := p.p["newdiskofferingid"]; found { + u.Set("newdiskofferingid", v.(string)) + } if v, found := p.p["storageid"]; found { u.Set("storageid", v.(string)) } @@ -1533,6 +1564,14 @@ func (p *MigrateVolumeParams) SetLivemigrate(v bool) { return } +func (p *MigrateVolumeParams) SetNewdiskofferingid(v string) { + if p.p == nil { + p.p = make(map[string]interface{}) + } + p.p["newdiskofferingid"] = v + return +} + func (p *MigrateVolumeParams) SetStorageid(v string) { if p.p == nil { p.p = make(map[string]interface{}) @@ -1595,7 +1634,6 @@ func (s *VolumeService) MigrateVolume(p *MigrateVolumeParams) (*MigrateVolumeRes } type MigrateVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -1620,6 +1658,8 @@ type MigrateVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -1641,6 +1681,7 @@ type MigrateVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1782,7 +1823,6 @@ func (s *VolumeService) ResizeVolume(p *ResizeVolumeParams) (*ResizeVolumeRespon } type ResizeVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -1807,6 +1847,8 @@ type ResizeVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -1828,6 +1870,7 @@ type ResizeVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -1976,7 +2019,6 @@ func (s *VolumeService) UpdateVolume(p *UpdateVolumeParams) (*UpdateVolumeRespon } type UpdateVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -2001,6 +2043,8 @@ type UpdateVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -2022,6 +2066,7 @@ type UpdateVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` @@ -2206,7 +2251,6 @@ func (s *VolumeService) UploadVolume(p *UploadVolumeParams) (*UploadVolumeRespon } type UploadVolumeResponse struct { - JobID string `json:"jobid"` Account string `json:"account"` Attached string `json:"attached"` Chaininfo string `json:"chaininfo"` @@ -2231,6 +2275,8 @@ type UploadVolumeResponse struct { Isodisplaytext string `json:"isodisplaytext"` Isoid string `json:"isoid"` Isoname string `json:"isoname"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Maxiops int64 `json:"maxiops"` Miniops int64 `json:"miniops"` Name string `json:"name"` @@ -2252,6 +2298,7 @@ type UploadVolumeResponse struct { Storage string `json:"storage"` Storageid string `json:"storageid"` Storagetype string `json:"storagetype"` + Tags []Tags `json:"tags"` Templatedisplaytext string `json:"templatedisplaytext"` Templateid string `json:"templateid"` Templatename string `json:"templatename"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ZoneService.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ZoneService.go index 1d8029d41..fff7f4046 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/ZoneService.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/ZoneService.go @@ -236,6 +236,8 @@ type CreateZoneResponse struct { Internaldns2 string `json:"internaldns2"` Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Localstorageenabled bool `json:"localstorageenabled"` Name string `json:"name"` Networktype string `json:"networktype"` @@ -351,11 +353,12 @@ func (s *ZoneService) DedicateZone(p *DedicateZoneParams) (*DedicateZoneResponse } type DedicateZoneResponse struct { - JobID string `json:"jobid"` Accountid string `json:"accountid"` Affinitygroupid string `json:"affinitygroupid"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } @@ -409,6 +412,8 @@ func (s *ZoneService) DeleteZone(p *DeleteZoneParams) (*DeleteZoneResponse, erro type DeleteZoneResponse struct { Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -427,6 +432,14 @@ func (r *DeleteZoneResponse) UnmarshalJSON(b []byte) error { } } + if ostypeid, ok := m["ostypeid"].(float64); ok { + m["ostypeid"] = strconv.Itoa(int(ostypeid)) + b, err = json.Marshal(m) + if err != nil { + return err + } + } + type alias DeleteZoneResponse return json.Unmarshal(b, (*alias)(r)) } @@ -499,13 +512,14 @@ func (s *ZoneService) DisableOutOfBandManagementForZone(p *DisableOutOfBandManag } type DisableOutOfBandManagementForZoneResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -581,13 +595,14 @@ func (s *ZoneService) EnableOutOfBandManagementForZone(p *EnableOutOfBandManagem } type EnableOutOfBandManagementForZoneResponse struct { - JobID string `json:"jobid"` Action string `json:"action"` Address string `json:"address"` Description string `json:"description"` Driver string `json:"driver"` Enabled bool `json:"enabled"` Hostid string `json:"hostid"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Password string `json:"password"` Port string `json:"port"` Powerstate string `json:"powerstate"` @@ -719,6 +734,8 @@ type DedicatedZone struct { Affinitygroupid string `json:"affinitygroupid"` Domainid string `json:"domainid"` Id string `json:"id"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Zoneid string `json:"zoneid"` Zonename string `json:"zonename"` } @@ -982,6 +999,8 @@ type Zone struct { Internaldns2 string `json:"internaldns2"` Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Localstorageenabled bool `json:"localstorageenabled"` Name string `json:"name"` Networktype string `json:"networktype"` @@ -1069,8 +1088,9 @@ func (s *ZoneService) ReleaseDedicatedZone(p *ReleaseDedicatedZoneParams) (*Rele } type ReleaseDedicatedZoneResponse struct { - JobID string `json:"jobid"` Displaytext string `json:"displaytext"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Success bool `json:"success"` } @@ -1310,6 +1330,8 @@ type UpdateZoneResponse struct { Internaldns2 string `json:"internaldns2"` Ip6dns1 string `json:"ip6dns1"` Ip6dns2 string `json:"ip6dns2"` + JobID string `json:"jobid"` + Jobstatus int `json:"jobstatus"` Localstorageenabled bool `json:"localstorageenabled"` Name string `json:"name"` Networktype string `json:"networktype"` diff --git a/vendor/github.com/xanzy/go-cloudstack/cloudstack/cloudstack.go b/vendor/github.com/xanzy/go-cloudstack/cloudstack/cloudstack.go index 04bbac3a8..e3dcb4e9d 100644 --- a/vendor/github.com/xanzy/go-cloudstack/cloudstack/cloudstack.go +++ b/vendor/github.com/xanzy/go-cloudstack/cloudstack/cloudstack.go @@ -156,7 +156,7 @@ func newClient(apiurl string, apikey string, secret string, async bool, verifyss }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, - TLSClientConfig: &tls.Config{InsecureSkipVerify: !verifyssl}, // If verifyssl is true, skipping the verify should be false and vice versa + TLSClientConfig: &tls.Config{InsecureSkipVerify: !verifyssl}, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }, @@ -419,6 +419,34 @@ func getRawValue(b json.RawMessage) (json.RawMessage, error) { return nil, fmt.Errorf("Unable to extract the raw value from:\n\n%s\n\n", string(b)) } +// DomainIDSetter is an interface that every type that can set a domain ID must implement +type DomainIDSetter interface { + SetDomainid(string) +} + +// WithDomain takes either a domain name or ID and sets the `domainid` parameter +func WithDomain(domain string) OptionFunc { + return func(cs *CloudStackClient, p interface{}) error { + ps, ok := p.(DomainIDSetter) + + if !ok || domain == "" { + return nil + } + + if !IsID(domain) { + id, _, err := cs.Domain.GetDomainID(domain) + if err != nil { + return err + } + domain = id + } + + ps.SetDomainid(domain) + + return nil + } +} + // ProjectIDSetter is an interface that every type that can set a project ID must implement type ProjectIDSetter interface { SetProjectid(string) diff --git a/vendor/modules.txt b/vendor/modules.txt index 50d7194b9..46ffb4106 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -429,7 +429,7 @@ github.com/vmware/govmomi/vim25/methods github.com/vmware/govmomi/vim25/progress github.com/vmware/govmomi/vim25/debug github.com/vmware/govmomi/vim25/xml -# github.com/xanzy/go-cloudstack v2.4.1+incompatible +# github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0 github.com/xanzy/go-cloudstack/cloudstack # github.com/yandex-cloud/go-genproto v0.0.0-20190401174212-1db0ef3dce9b github.com/yandex-cloud/go-genproto/yandex/cloud/compute/v1