repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
xanzy/go-cloudstack
cloudstack/SystemVMService.go
ListSystemVms
func (s *SystemVMService) ListSystemVms(p *ListSystemVmsParams) (*ListSystemVmsResponse, error) { resp, err := s.cs.newRequest("listSystemVms", p.toURLValues()) if err != nil { return nil, err } var r ListSystemVmsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *SystemVMService) ListSystemVms(p *ListSystemVmsParams) (*ListSystemVmsResponse, error) { resp, err := s.cs.newRequest("listSystemVms", p.toURLValues()) if err != nil { return nil, err } var r ListSystemVmsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "SystemVMService", ")", "ListSystemVms", "(", "p", "*", "ListSystemVmsParams", ")", "(", "*", "ListSystemVmsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListSystemVmsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List system virtual machines.
[ "List", "system", "virtual", "machines", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L461-L473
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewMigrateSystemVmParams
func (s *SystemVMService) NewMigrateSystemVmParams(hostid string, virtualmachineid string) *MigrateSystemVmParams { p := &MigrateSystemVmParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *SystemVMService) NewMigrateSystemVmParams(hostid string, virtualmachineid string) *MigrateSystemVmParams { p := &MigrateSystemVmParams{} p.p = make(map[string]interface{}) p.p["hostid"] = hostid p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewMigrateSystemVmParams", "(", "hostid", "string", ",", "virtualmachineid", "string", ")", "*", "MigrateSystemVmParams", "{", "p", ":=", "&", "MigrateSystemVmParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "hostid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new MigrateSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "MigrateSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L549-L555
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
MigrateSystemVm
func (s *SystemVMService) MigrateSystemVm(p *MigrateSystemVmParams) (*MigrateSystemVmResponse, error) { resp, err := s.cs.newRequest("migrateSystemVm", p.toURLValues()) if err != nil { return nil, err } var r MigrateSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *SystemVMService) MigrateSystemVm(p *MigrateSystemVmParams) (*MigrateSystemVmResponse, error) { resp, err := s.cs.newRequest("migrateSystemVm", p.toURLValues()) if err != nil { return nil, err } var r MigrateSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "SystemVMService", ")", "MigrateSystemVm", "(", "p", "*", "MigrateSystemVmParams", ")", "(", "*", "MigrateSystemVmResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "MigrateSystemVmResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Attempts Migration of a system virtual machine to the host specified.
[ "Attempts", "Migration", "of", "a", "system", "virtual", "machine", "to", "the", "host", "specified", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L558-L590
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewRebootSystemVmParams
func (s *SystemVMService) NewRebootSystemVmParams(id string) *RebootSystemVmParams { p := &RebootSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SystemVMService) NewRebootSystemVmParams(id string) *RebootSystemVmParams { p := &RebootSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewRebootSystemVmParams", "(", "id", "string", ")", "*", "RebootSystemVmParams", "{", "p", ":=", "&", "RebootSystemVmParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new RebootSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "RebootSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L650-L655
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
RebootSystemVm
func (s *SystemVMService) RebootSystemVm(p *RebootSystemVmParams) (*RebootSystemVmResponse, error) { resp, err := s.cs.newRequest("rebootSystemVm", p.toURLValues()) if err != nil { return nil, err } var r RebootSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *SystemVMService) RebootSystemVm(p *RebootSystemVmParams) (*RebootSystemVmResponse, error) { resp, err := s.cs.newRequest("rebootSystemVm", p.toURLValues()) if err != nil { return nil, err } var r RebootSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "SystemVMService", ")", "RebootSystemVm", "(", "p", "*", "RebootSystemVmParams", ")", "(", "*", "RebootSystemVmResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "RebootSystemVmResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Reboots a system VM.
[ "Reboots", "a", "system", "VM", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L658-L690
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewScaleSystemVmParams
func (s *SystemVMService) NewScaleSystemVmParams(id string, serviceofferingid string) *ScaleSystemVmParams { p := &ScaleSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["serviceofferingid"] = serviceofferingid return p }
go
func (s *SystemVMService) NewScaleSystemVmParams(id string, serviceofferingid string) *ScaleSystemVmParams { p := &ScaleSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["serviceofferingid"] = serviceofferingid return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewScaleSystemVmParams", "(", "id", "string", ",", "serviceofferingid", "string", ")", "*", "ScaleSystemVmParams", "{", "p", ":=", "&", "ScaleSystemVmParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "serviceofferingid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ScaleSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ScaleSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L776-L782
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewStartSystemVmParams
func (s *SystemVMService) NewStartSystemVmParams(id string) *StartSystemVmParams { p := &StartSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SystemVMService) NewStartSystemVmParams(id string) *StartSystemVmParams { p := &StartSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewStartSystemVmParams", "(", "id", "string", ")", "*", "StartSystemVmParams", "{", "p", ":=", "&", "StartSystemVmParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new StartSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "StartSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L877-L882
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
StartSystemVm
func (s *SystemVMService) StartSystemVm(p *StartSystemVmParams) (*StartSystemVmResponse, error) { resp, err := s.cs.newRequest("startSystemVm", p.toURLValues()) if err != nil { return nil, err } var r StartSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *SystemVMService) StartSystemVm(p *StartSystemVmParams) (*StartSystemVmResponse, error) { resp, err := s.cs.newRequest("startSystemVm", p.toURLValues()) if err != nil { return nil, err } var r StartSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "SystemVMService", ")", "StartSystemVm", "(", "p", "*", "StartSystemVmParams", ")", "(", "*", "StartSystemVmResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "StartSystemVmResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Starts a system virtual machine.
[ "Starts", "a", "system", "virtual", "machine", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L885-L917
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
NewStopSystemVmParams
func (s *SystemVMService) NewStopSystemVmParams(id string) *StopSystemVmParams { p := &StopSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *SystemVMService) NewStopSystemVmParams(id string) *StopSystemVmParams { p := &StopSystemVmParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "SystemVMService", ")", "NewStopSystemVmParams", "(", "id", "string", ")", "*", "StopSystemVmParams", "{", "p", ":=", "&", "StopSystemVmParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new StopSystemVmParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "StopSystemVmParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L989-L994
train
xanzy/go-cloudstack
cloudstack/SystemVMService.go
StopSystemVm
func (s *SystemVMService) StopSystemVm(p *StopSystemVmParams) (*StopSystemVmResponse, error) { resp, err := s.cs.newRequest("stopSystemVm", p.toURLValues()) if err != nil { return nil, err } var r StopSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *SystemVMService) StopSystemVm(p *StopSystemVmParams) (*StopSystemVmResponse, error) { resp, err := s.cs.newRequest("stopSystemVm", p.toURLValues()) if err != nil { return nil, err } var r StopSystemVmResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "SystemVMService", ")", "StopSystemVm", "(", "p", "*", "StopSystemVmParams", ")", "(", "*", "StopSystemVmResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "StopSystemVmResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Stops a system VM.
[ "Stops", "a", "system", "VM", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/SystemVMService.go#L997-L1029
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewAttachVolumeParams
func (s *VolumeService) NewAttachVolumeParams(id string, virtualmachineid string) *AttachVolumeParams { p := &AttachVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["virtualmachineid"] = virtualmachineid return p }
go
func (s *VolumeService) NewAttachVolumeParams(id string, virtualmachineid string) *AttachVolumeParams { p := &AttachVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["virtualmachineid"] = virtualmachineid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewAttachVolumeParams", "(", "id", "string", ",", "virtualmachineid", "string", ")", "*", "AttachVolumeParams", "{", "p", ":=", "&", "AttachVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "virtualmachineid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AttachVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AttachVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L75-L81
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewCreateVolumeParams
func (s *VolumeService) NewCreateVolumeParams() *CreateVolumeParams { p := &CreateVolumeParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VolumeService) NewCreateVolumeParams() *CreateVolumeParams { p := &CreateVolumeParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewCreateVolumeParams", "(", ")", "*", "CreateVolumeParams", "{", "p", ":=", "&", "CreateVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L340-L344
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewDeleteVolumeParams
func (s *VolumeService) NewDeleteVolumeParams(id string) *DeleteVolumeParams { p := &DeleteVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VolumeService) NewDeleteVolumeParams(id string) *DeleteVolumeParams { p := &DeleteVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewDeleteVolumeParams", "(", "id", "string", ")", "*", "DeleteVolumeParams", "{", "p", ":=", "&", "DeleteVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L467-L472
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewDetachVolumeParams
func (s *VolumeService) NewDetachVolumeParams() *DetachVolumeParams { p := &DetachVolumeParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VolumeService) NewDetachVolumeParams() *DetachVolumeParams { p := &DetachVolumeParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewDetachVolumeParams", "(", ")", "*", "DetachVolumeParams", "{", "p", ":=", "&", "DetachVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DetachVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DetachVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L561-L565
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewExtractVolumeParams
func (s *VolumeService) NewExtractVolumeParams(id string, mode string, zoneid string) *ExtractVolumeParams { p := &ExtractVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["mode"] = mode p.p["zoneid"] = zoneid return p }
go
func (s *VolumeService) NewExtractVolumeParams(id string, mode string, zoneid string) *ExtractVolumeParams { p := &ExtractVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["mode"] = mode p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewExtractVolumeParams", "(", "id", "string", ",", "mode", "string", ",", "zoneid", "string", ")", "*", "ExtractVolumeParams", "{", "p", ":=", "&", "ExtractVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "mode", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ExtractVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ExtractVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L721-L728
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewGetPathForVolumeParams
func (s *VolumeService) NewGetPathForVolumeParams(volumeid string) *GetPathForVolumeParams { p := &GetPathForVolumeParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
go
func (s *VolumeService) NewGetPathForVolumeParams(volumeid string) *GetPathForVolumeParams { p := &GetPathForVolumeParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewGetPathForVolumeParams", "(", "volumeid", "string", ")", "*", "GetPathForVolumeParams", "{", "p", ":=", "&", "GetPathForVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetPathForVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetPathForVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L808-L813
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
GetPathForVolume
func (s *VolumeService) GetPathForVolume(p *GetPathForVolumeParams) (*GetPathForVolumeResponse, error) { resp, err := s.cs.newRequest("getPathForVolume", p.toURLValues()) if err != nil { return nil, err } var r GetPathForVolumeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VolumeService) GetPathForVolume(p *GetPathForVolumeParams) (*GetPathForVolumeResponse, error) { resp, err := s.cs.newRequest("getPathForVolume", p.toURLValues()) if err != nil { return nil, err } var r GetPathForVolumeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VolumeService", ")", "GetPathForVolume", "(", "p", "*", "GetPathForVolumeParams", ")", "(", "*", "GetPathForVolumeResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetPathForVolumeResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Get the path associated with the provided volume UUID
[ "Get", "the", "path", "associated", "with", "the", "provided", "volume", "UUID" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L816-L828
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewGetSolidFireVolumeSizeParams
func (s *VolumeService) NewGetSolidFireVolumeSizeParams(volumeid string) *GetSolidFireVolumeSizeParams { p := &GetSolidFireVolumeSizeParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
go
func (s *VolumeService) NewGetSolidFireVolumeSizeParams(volumeid string) *GetSolidFireVolumeSizeParams { p := &GetSolidFireVolumeSizeParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewGetSolidFireVolumeSizeParams", "(", "volumeid", "string", ")", "*", "GetSolidFireVolumeSizeParams", "{", "p", ":=", "&", "GetSolidFireVolumeSizeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetSolidFireVolumeSizeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetSolidFireVolumeSizeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L859-L864
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
GetSolidFireVolumeSize
func (s *VolumeService) GetSolidFireVolumeSize(p *GetSolidFireVolumeSizeParams) (*GetSolidFireVolumeSizeResponse, error) { resp, err := s.cs.newRequest("getSolidFireVolumeSize", p.toURLValues()) if err != nil { return nil, err } var r GetSolidFireVolumeSizeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VolumeService) GetSolidFireVolumeSize(p *GetSolidFireVolumeSizeParams) (*GetSolidFireVolumeSizeResponse, error) { resp, err := s.cs.newRequest("getSolidFireVolumeSize", p.toURLValues()) if err != nil { return nil, err } var r GetSolidFireVolumeSizeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VolumeService", ")", "GetSolidFireVolumeSize", "(", "p", "*", "GetSolidFireVolumeSizeParams", ")", "(", "*", "GetSolidFireVolumeSizeResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetSolidFireVolumeSizeResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Get the SF volume size including Hypervisor Snapshot Reserve
[ "Get", "the", "SF", "volume", "size", "including", "Hypervisor", "Snapshot", "Reserve" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L867-L879
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewGetUploadParamsForVolumeParams
func (s *VolumeService) NewGetUploadParamsForVolumeParams(format string, name string, zoneid string) *GetUploadParamsForVolumeParams { p := &GetUploadParamsForVolumeParams{} p.p = make(map[string]interface{}) p.p["format"] = format p.p["name"] = name p.p["zoneid"] = zoneid return p }
go
func (s *VolumeService) NewGetUploadParamsForVolumeParams(format string, name string, zoneid string) *GetUploadParamsForVolumeParams { p := &GetUploadParamsForVolumeParams{} p.p = make(map[string]interface{}) p.p["format"] = format p.p["name"] = name p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewGetUploadParamsForVolumeParams", "(", "format", "string", ",", "name", "string", ",", "zoneid", "string", ")", "*", "GetUploadParamsForVolumeParams", "{", "p", ":=", "&", "GetUploadParamsForVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "format", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetUploadParamsForVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetUploadParamsForVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L998-L1005
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
GetUploadParamsForVolume
func (s *VolumeService) GetUploadParamsForVolume(p *GetUploadParamsForVolumeParams) (*GetUploadParamsForVolumeResponse, error) { resp, err := s.cs.newRequest("getUploadParamsForVolume", p.toURLValues()) if err != nil { return nil, err } var r GetUploadParamsForVolumeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VolumeService) GetUploadParamsForVolume(p *GetUploadParamsForVolumeParams) (*GetUploadParamsForVolumeResponse, error) { resp, err := s.cs.newRequest("getUploadParamsForVolume", p.toURLValues()) if err != nil { return nil, err } var r GetUploadParamsForVolumeResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VolumeService", ")", "GetUploadParamsForVolume", "(", "p", "*", "GetUploadParamsForVolumeParams", ")", "(", "*", "GetUploadParamsForVolumeResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetUploadParamsForVolumeResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Upload a data disk to the cloudstack cloud.
[ "Upload", "a", "data", "disk", "to", "the", "cloudstack", "cloud", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1008-L1020
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewGetVolumeiScsiNameParams
func (s *VolumeService) NewGetVolumeiScsiNameParams(volumeid string) *GetVolumeiScsiNameParams { p := &GetVolumeiScsiNameParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
go
func (s *VolumeService) NewGetVolumeiScsiNameParams(volumeid string) *GetVolumeiScsiNameParams { p := &GetVolumeiScsiNameParams{} p.p = make(map[string]interface{}) p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewGetVolumeiScsiNameParams", "(", "volumeid", "string", ")", "*", "GetVolumeiScsiNameParams", "{", "p", ":=", "&", "GetVolumeiScsiNameParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new GetVolumeiScsiNameParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "GetVolumeiScsiNameParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1055-L1060
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
GetVolumeiScsiName
func (s *VolumeService) GetVolumeiScsiName(p *GetVolumeiScsiNameParams) (*GetVolumeiScsiNameResponse, error) { resp, err := s.cs.newRequest("getVolumeiScsiName", p.toURLValues()) if err != nil { return nil, err } var r GetVolumeiScsiNameResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *VolumeService) GetVolumeiScsiName(p *GetVolumeiScsiNameParams) (*GetVolumeiScsiNameResponse, error) { resp, err := s.cs.newRequest("getVolumeiScsiName", p.toURLValues()) if err != nil { return nil, err } var r GetVolumeiScsiNameResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "VolumeService", ")", "GetVolumeiScsiName", "(", "p", "*", "GetVolumeiScsiNameParams", ")", "(", "*", "GetVolumeiScsiNameResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "GetVolumeiScsiNameResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Get Volume's iSCSI Name
[ "Get", "Volume", "s", "iSCSI", "Name" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1063-L1075
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewListVolumesParams
func (s *VolumeService) NewListVolumesParams() *ListVolumesParams { p := &ListVolumesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VolumeService) NewListVolumesParams() *ListVolumesParams { p := &ListVolumesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewListVolumesParams", "(", ")", "*", "ListVolumesParams", "{", "p", ":=", "&", "ListVolumesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListVolumesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListVolumesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1337-L1341
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewMigrateVolumeParams
func (s *VolumeService) NewMigrateVolumeParams(storageid string, volumeid string) *MigrateVolumeParams { p := &MigrateVolumeParams{} p.p = make(map[string]interface{}) p.p["storageid"] = storageid p.p["volumeid"] = volumeid return p }
go
func (s *VolumeService) NewMigrateVolumeParams(storageid string, volumeid string) *MigrateVolumeParams { p := &MigrateVolumeParams{} p.p = make(map[string]interface{}) p.p["storageid"] = storageid p.p["volumeid"] = volumeid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewMigrateVolumeParams", "(", "storageid", "string", ",", "volumeid", "string", ")", "*", "MigrateVolumeParams", "{", "p", ":=", "&", "MigrateVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "storageid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "volumeid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new MigrateVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "MigrateVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1554-L1560
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewResizeVolumeParams
func (s *VolumeService) NewResizeVolumeParams(id string) *ResizeVolumeParams { p := &ResizeVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *VolumeService) NewResizeVolumeParams(id string) *ResizeVolumeParams { p := &ResizeVolumeParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewResizeVolumeParams", "(", "id", "string", ")", "*", "ResizeVolumeParams", "{", "p", ":=", "&", "ResizeVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ResizeVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ResizeVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1742-L1747
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewUpdateVolumeParams
func (s *VolumeService) NewUpdateVolumeParams() *UpdateVolumeParams { p := &UpdateVolumeParams{} p.p = make(map[string]interface{}) return p }
go
func (s *VolumeService) NewUpdateVolumeParams() *UpdateVolumeParams { p := &UpdateVolumeParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewUpdateVolumeParams", "(", ")", "*", "UpdateVolumeParams", "{", "p", ":=", "&", "UpdateVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L1937-L1941
train
xanzy/go-cloudstack
cloudstack/VolumeService.go
NewUploadVolumeParams
func (s *VolumeService) NewUploadVolumeParams(format string, name string, url string, zoneid string) *UploadVolumeParams { p := &UploadVolumeParams{} p.p = make(map[string]interface{}) p.p["format"] = format p.p["name"] = name p.p["url"] = url p.p["zoneid"] = zoneid return p }
go
func (s *VolumeService) NewUploadVolumeParams(format string, name string, url string, zoneid string) *UploadVolumeParams { p := &UploadVolumeParams{} p.p = make(map[string]interface{}) p.p["format"] = format p.p["name"] = name p.p["url"] = url p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "VolumeService", ")", "NewUploadVolumeParams", "(", "format", "string", ",", "name", "string", ",", "url", "string", ",", "zoneid", "string", ")", "*", "UploadVolumeParams", "{", "p", ":=", "&", "UploadVolumeParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "format", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UploadVolumeParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UploadVolumeParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/VolumeService.go#L2163-L2171
train
xanzy/go-cloudstack
cloudstack/AddressService.go
NewAssociateIpAddressParams
func (s *AddressService) NewAssociateIpAddressParams() *AssociateIpAddressParams { p := &AssociateIpAddressParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AddressService) NewAssociateIpAddressParams() *AssociateIpAddressParams { p := &AssociateIpAddressParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AddressService", ")", "NewAssociateIpAddressParams", "(", ")", "*", "AssociateIpAddressParams", "{", "p", ":=", "&", "AssociateIpAddressParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AssociateIpAddressParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AssociateIpAddressParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L143-L147
train
xanzy/go-cloudstack
cloudstack/AddressService.go
NewDisassociateIpAddressParams
func (s *AddressService) NewDisassociateIpAddressParams(id string) *DisassociateIpAddressParams { p := &DisassociateIpAddressParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AddressService) NewDisassociateIpAddressParams(id string) *DisassociateIpAddressParams { p := &DisassociateIpAddressParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AddressService", ")", "NewDisassociateIpAddressParams", "(", "id", "string", ")", "*", "DisassociateIpAddressParams", "{", "p", ":=", "&", "DisassociateIpAddressParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DisassociateIpAddressParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisassociateIpAddressParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L243-L248
train
xanzy/go-cloudstack
cloudstack/AddressService.go
DisassociateIpAddress
func (s *AddressService) DisassociateIpAddress(p *DisassociateIpAddressParams) (*DisassociateIpAddressResponse, error) { resp, err := s.cs.newRequest("disassociateIpAddress", p.toURLValues()) if err != nil { return nil, err } var r DisassociateIpAddressResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AddressService) DisassociateIpAddress(p *DisassociateIpAddressParams) (*DisassociateIpAddressResponse, error) { resp, err := s.cs.newRequest("disassociateIpAddress", p.toURLValues()) if err != nil { return nil, err } var r DisassociateIpAddressResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AddressService", ")", "DisassociateIpAddress", "(", "p", "*", "DisassociateIpAddressParams", ")", "(", "*", "DisassociateIpAddressResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DisassociateIpAddressResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Disassociates an IP address from the account.
[ "Disassociates", "an", "IP", "address", "from", "the", "account", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L251-L278
train
xanzy/go-cloudstack
cloudstack/AddressService.go
NewListPublicIpAddressesParams
func (s *AddressService) NewListPublicIpAddressesParams() *ListPublicIpAddressesParams { p := &ListPublicIpAddressesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AddressService) NewListPublicIpAddressesParams() *ListPublicIpAddressesParams { p := &ListPublicIpAddressesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AddressService", ")", "NewListPublicIpAddressesParams", "(", ")", "*", "ListPublicIpAddressesParams", "{", "p", ":=", "&", "ListPublicIpAddressesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListPublicIpAddressesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListPublicIpAddressesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L568-L572
train
xanzy/go-cloudstack
cloudstack/AddressService.go
NewUpdateIpAddressParams
func (s *AddressService) NewUpdateIpAddressParams(id string) *UpdateIpAddressParams { p := &UpdateIpAddressParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AddressService) NewUpdateIpAddressParams(id string) *UpdateIpAddressParams { p := &UpdateIpAddressParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AddressService", ")", "NewUpdateIpAddressParams", "(", "id", "string", ")", "*", "UpdateIpAddressParams", "{", "p", ":=", "&", "UpdateIpAddressParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateIpAddressParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateIpAddressParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L708-L713
train
xanzy/go-cloudstack
cloudstack/AddressService.go
UpdateIpAddress
func (s *AddressService) UpdateIpAddress(p *UpdateIpAddressParams) (*UpdateIpAddressResponse, error) { resp, err := s.cs.newRequest("updateIpAddress", p.toURLValues()) if err != nil { return nil, err } var r UpdateIpAddressResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AddressService) UpdateIpAddress(p *UpdateIpAddressParams) (*UpdateIpAddressResponse, error) { resp, err := s.cs.newRequest("updateIpAddress", p.toURLValues()) if err != nil { return nil, err } var r UpdateIpAddressResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AddressService", ")", "UpdateIpAddress", "(", "p", "*", "UpdateIpAddressParams", ")", "(", "*", "UpdateIpAddressResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateIpAddressResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates an IP address
[ "Updates", "an", "IP", "address" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AddressService.go#L716-L748
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewCreateAutoScalePolicyParams
func (s *AutoScaleService) NewCreateAutoScalePolicyParams(action string, conditionids []string, duration int) *CreateAutoScalePolicyParams { p := &CreateAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["action"] = action p.p["conditionids"] = conditionids p.p["duration"] = duration return p }
go
func (s *AutoScaleService) NewCreateAutoScalePolicyParams(action string, conditionids []string, duration int) *CreateAutoScalePolicyParams { p := &CreateAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["action"] = action p.p["conditionids"] = conditionids p.p["duration"] = duration return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewCreateAutoScalePolicyParams", "(", "action", "string", ",", "conditionids", "[", "]", "string", ",", "duration", "int", ")", "*", "CreateAutoScalePolicyParams", "{", "p", ":=", "&", "CreateAutoScalePolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "action", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "conditionids", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "duration", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateAutoScalePolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateAutoScalePolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L88-L95
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
CreateAutoScalePolicy
func (s *AutoScaleService) CreateAutoScalePolicy(p *CreateAutoScalePolicyParams) (*CreateAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("createAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) CreateAutoScalePolicy(p *CreateAutoScalePolicyParams) (*CreateAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("createAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "CreateAutoScalePolicy", "(", "p", "*", "CreateAutoScalePolicyParams", ")", "(", "*", "CreateAutoScalePolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateAutoScalePolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates an autoscale policy for a provision or deprovision action, the action is taken when the all the conditions evaluates to true for the specified duration. The policy is in effect once it is attached to a autscale vm group.
[ "Creates", "an", "autoscale", "policy", "for", "a", "provision", "or", "deprovision", "action", "the", "action", "is", "taken", "when", "the", "all", "the", "conditions", "evaluates", "to", "true", "for", "the", "specified", "duration", ".", "The", "policy", "is", "in", "effect", "once", "it", "is", "attached", "to", "a", "autscale", "vm", "group", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L98-L130
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewCreateAutoScaleVmGroupParams
func (s *AutoScaleService) NewCreateAutoScaleVmGroupParams(lbruleid string, maxmembers int, minmembers int, scaledownpolicyids []string, scaleuppolicyids []string, vmprofileid string) *CreateAutoScaleVmGroupParams { p := &CreateAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid p.p["maxmembers"] = maxmembers p.p["minmembers"] = minmembers p.p["scaledownpolicyids"] = scaledownpolicyids p.p["scaleuppolicyids"] = scaleuppolicyids p.p["vmprofileid"] = vmprofileid return p }
go
func (s *AutoScaleService) NewCreateAutoScaleVmGroupParams(lbruleid string, maxmembers int, minmembers int, scaledownpolicyids []string, scaleuppolicyids []string, vmprofileid string) *CreateAutoScaleVmGroupParams { p := &CreateAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid p.p["maxmembers"] = maxmembers p.p["minmembers"] = minmembers p.p["scaledownpolicyids"] = scaledownpolicyids p.p["scaleuppolicyids"] = scaleuppolicyids p.p["vmprofileid"] = vmprofileid return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewCreateAutoScaleVmGroupParams", "(", "lbruleid", "string", ",", "maxmembers", "int", ",", "minmembers", "int", ",", "scaledownpolicyids", "[", "]", "string", ",", "scaleuppolicyids", "[", "]", "string", ",", "vmprofileid", "string", ")", "*", "CreateAutoScaleVmGroupParams", "{", "p", ":=", "&", "CreateAutoScaleVmGroupParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lbruleid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "maxmembers", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "minmembers", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "scaledownpolicyids", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "scaleuppolicyids", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "vmprofileid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateAutoScaleVmGroupParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateAutoScaleVmGroupParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L254-L264
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewCreateAutoScaleVmProfileParams
func (s *AutoScaleService) NewCreateAutoScaleVmProfileParams(serviceofferingid string, templateid string, zoneid string) *CreateAutoScaleVmProfileParams { p := &CreateAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["serviceofferingid"] = serviceofferingid p.p["templateid"] = templateid p.p["zoneid"] = zoneid return p }
go
func (s *AutoScaleService) NewCreateAutoScaleVmProfileParams(serviceofferingid string, templateid string, zoneid string) *CreateAutoScaleVmProfileParams { p := &CreateAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["serviceofferingid"] = serviceofferingid p.p["templateid"] = templateid p.p["zoneid"] = zoneid return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewCreateAutoScaleVmProfileParams", "(", "serviceofferingid", "string", ",", "templateid", "string", ",", "zoneid", "string", ")", "*", "CreateAutoScaleVmProfileParams", "{", "p", ":=", "&", "CreateAutoScaleVmProfileParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "serviceofferingid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "templateid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "zoneid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateAutoScaleVmProfileParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateAutoScaleVmProfileParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L429-L436
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
CreateAutoScaleVmProfile
func (s *AutoScaleService) CreateAutoScaleVmProfile(p *CreateAutoScaleVmProfileParams) (*CreateAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("createAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r CreateAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) CreateAutoScaleVmProfile(p *CreateAutoScaleVmProfileParams) (*CreateAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("createAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r CreateAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "CreateAutoScaleVmProfile", "(", "p", "*", "CreateAutoScaleVmProfileParams", ")", "(", "*", "CreateAutoScaleVmProfileResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateAutoScaleVmProfileResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a profile that contains information about the virtual machine which will be provisioned automatically by autoscale feature.
[ "Creates", "a", "profile", "that", "contains", "information", "about", "the", "virtual", "machine", "which", "will", "be", "provisioned", "automatically", "by", "autoscale", "feature", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L439-L471
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewCreateConditionParams
func (s *AutoScaleService) NewCreateConditionParams(counterid string, relationaloperator string, threshold int64) *CreateConditionParams { p := &CreateConditionParams{} p.p = make(map[string]interface{}) p.p["counterid"] = counterid p.p["relationaloperator"] = relationaloperator p.p["threshold"] = threshold return p }
go
func (s *AutoScaleService) NewCreateConditionParams(counterid string, relationaloperator string, threshold int64) *CreateConditionParams { p := &CreateConditionParams{} p.p = make(map[string]interface{}) p.p["counterid"] = counterid p.p["relationaloperator"] = relationaloperator p.p["threshold"] = threshold return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewCreateConditionParams", "(", "counterid", "string", ",", "relationaloperator", "string", ",", "threshold", "int64", ")", "*", "CreateConditionParams", "{", "p", ":=", "&", "CreateConditionParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "counterid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "relationaloperator", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "threshold", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateConditionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateConditionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L560-L567
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
CreateCondition
func (s *AutoScaleService) CreateCondition(p *CreateConditionParams) (*CreateConditionResponse, error) { resp, err := s.cs.newRequest("createCondition", p.toURLValues()) if err != nil { return nil, err } var r CreateConditionResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) CreateCondition(p *CreateConditionParams) (*CreateConditionResponse, error) { resp, err := s.cs.newRequest("createCondition", p.toURLValues()) if err != nil { return nil, err } var r CreateConditionResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "CreateCondition", "(", "p", "*", "CreateConditionParams", ")", "(", "*", "CreateConditionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateConditionResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a condition
[ "Creates", "a", "condition" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L570-L602
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewCreateCounterParams
func (s *AutoScaleService) NewCreateCounterParams(name string, source string, value string) *CreateCounterParams { p := &CreateCounterParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["source"] = source p.p["value"] = value return p }
go
func (s *AutoScaleService) NewCreateCounterParams(name string, source string, value string) *CreateCounterParams { p := &CreateCounterParams{} p.p = make(map[string]interface{}) p.p["name"] = name p.p["source"] = source p.p["value"] = value return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewCreateCounterParams", "(", "name", "string", ",", "source", "string", ",", "value", "string", ")", "*", "CreateCounterParams", "{", "p", ":=", "&", "CreateCounterParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "source", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "value", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateCounterParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateCounterParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L665-L672
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
CreateCounter
func (s *AutoScaleService) CreateCounter(p *CreateCounterParams) (*CreateCounterResponse, error) { resp, err := s.cs.newRequest("createCounter", p.toURLValues()) if err != nil { return nil, err } var r CreateCounterResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) CreateCounter(p *CreateCounterParams) (*CreateCounterResponse, error) { resp, err := s.cs.newRequest("createCounter", p.toURLValues()) if err != nil { return nil, err } var r CreateCounterResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "CreateCounter", "(", "p", "*", "CreateCounterParams", ")", "(", "*", "CreateCounterResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateCounterResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Adds metric counter
[ "Adds", "metric", "counter" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L675-L707
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDeleteAutoScalePolicyParams
func (s *AutoScaleService) NewDeleteAutoScalePolicyParams(id string) *DeleteAutoScalePolicyParams { p := &DeleteAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDeleteAutoScalePolicyParams(id string) *DeleteAutoScalePolicyParams { p := &DeleteAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDeleteAutoScalePolicyParams", "(", "id", "string", ")", "*", "DeleteAutoScalePolicyParams", "{", "p", ":=", "&", "DeleteAutoScalePolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteAutoScalePolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteAutoScalePolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L743-L748
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DeleteAutoScalePolicy
func (s *AutoScaleService) DeleteAutoScalePolicy(p *DeleteAutoScalePolicyParams) (*DeleteAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("deleteAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DeleteAutoScalePolicy(p *DeleteAutoScalePolicyParams) (*DeleteAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("deleteAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DeleteAutoScalePolicy", "(", "p", "*", "DeleteAutoScalePolicyParams", ")", "(", "*", "DeleteAutoScalePolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteAutoScalePolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a autoscale policy.
[ "Deletes", "a", "autoscale", "policy", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L751-L778
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDeleteAutoScaleVmGroupParams
func (s *AutoScaleService) NewDeleteAutoScaleVmGroupParams(id string) *DeleteAutoScaleVmGroupParams { p := &DeleteAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDeleteAutoScaleVmGroupParams(id string) *DeleteAutoScaleVmGroupParams { p := &DeleteAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDeleteAutoScaleVmGroupParams", "(", "id", "string", ")", "*", "DeleteAutoScaleVmGroupParams", "{", "p", ":=", "&", "DeleteAutoScaleVmGroupParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteAutoScaleVmGroupParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteAutoScaleVmGroupParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L811-L816
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DeleteAutoScaleVmGroup
func (s *AutoScaleService) DeleteAutoScaleVmGroup(p *DeleteAutoScaleVmGroupParams) (*DeleteAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("deleteAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DeleteAutoScaleVmGroup(p *DeleteAutoScaleVmGroupParams) (*DeleteAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("deleteAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DeleteAutoScaleVmGroup", "(", "p", "*", "DeleteAutoScaleVmGroupParams", ")", "(", "*", "DeleteAutoScaleVmGroupResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteAutoScaleVmGroupResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a autoscale vm group.
[ "Deletes", "a", "autoscale", "vm", "group", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L819-L846
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDeleteAutoScaleVmProfileParams
func (s *AutoScaleService) NewDeleteAutoScaleVmProfileParams(id string) *DeleteAutoScaleVmProfileParams { p := &DeleteAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDeleteAutoScaleVmProfileParams(id string) *DeleteAutoScaleVmProfileParams { p := &DeleteAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDeleteAutoScaleVmProfileParams", "(", "id", "string", ")", "*", "DeleteAutoScaleVmProfileParams", "{", "p", ":=", "&", "DeleteAutoScaleVmProfileParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteAutoScaleVmProfileParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteAutoScaleVmProfileParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L879-L884
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DeleteAutoScaleVmProfile
func (s *AutoScaleService) DeleteAutoScaleVmProfile(p *DeleteAutoScaleVmProfileParams) (*DeleteAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("deleteAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DeleteAutoScaleVmProfile(p *DeleteAutoScaleVmProfileParams) (*DeleteAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("deleteAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r DeleteAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DeleteAutoScaleVmProfile", "(", "p", "*", "DeleteAutoScaleVmProfileParams", ")", "(", "*", "DeleteAutoScaleVmProfileResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteAutoScaleVmProfileResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a autoscale vm profile.
[ "Deletes", "a", "autoscale", "vm", "profile", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L887-L914
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDeleteConditionParams
func (s *AutoScaleService) NewDeleteConditionParams(id string) *DeleteConditionParams { p := &DeleteConditionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDeleteConditionParams(id string) *DeleteConditionParams { p := &DeleteConditionParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDeleteConditionParams", "(", "id", "string", ")", "*", "DeleteConditionParams", "{", "p", ":=", "&", "DeleteConditionParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteConditionParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteConditionParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L947-L952
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DeleteCondition
func (s *AutoScaleService) DeleteCondition(p *DeleteConditionParams) (*DeleteConditionResponse, error) { resp, err := s.cs.newRequest("deleteCondition", p.toURLValues()) if err != nil { return nil, err } var r DeleteConditionResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DeleteCondition(p *DeleteConditionParams) (*DeleteConditionResponse, error) { resp, err := s.cs.newRequest("deleteCondition", p.toURLValues()) if err != nil { return nil, err } var r DeleteConditionResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DeleteCondition", "(", "p", "*", "DeleteConditionParams", ")", "(", "*", "DeleteConditionResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteConditionResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Removes a condition
[ "Removes", "a", "condition" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L955-L982
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDeleteCounterParams
func (s *AutoScaleService) NewDeleteCounterParams(id string) *DeleteCounterParams { p := &DeleteCounterParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDeleteCounterParams(id string) *DeleteCounterParams { p := &DeleteCounterParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDeleteCounterParams", "(", "id", "string", ")", "*", "DeleteCounterParams", "{", "p", ":=", "&", "DeleteCounterParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteCounterParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteCounterParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1015-L1020
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DeleteCounter
func (s *AutoScaleService) DeleteCounter(p *DeleteCounterParams) (*DeleteCounterResponse, error) { resp, err := s.cs.newRequest("deleteCounter", p.toURLValues()) if err != nil { return nil, err } var r DeleteCounterResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DeleteCounter(p *DeleteCounterParams) (*DeleteCounterResponse, error) { resp, err := s.cs.newRequest("deleteCounter", p.toURLValues()) if err != nil { return nil, err } var r DeleteCounterResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DeleteCounter", "(", "p", "*", "DeleteCounterParams", ")", "(", "*", "DeleteCounterResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteCounterResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a counter
[ "Deletes", "a", "counter" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1023-L1050
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewDisableAutoScaleVmGroupParams
func (s *AutoScaleService) NewDisableAutoScaleVmGroupParams(id string) *DisableAutoScaleVmGroupParams { p := &DisableAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewDisableAutoScaleVmGroupParams(id string) *DisableAutoScaleVmGroupParams { p := &DisableAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewDisableAutoScaleVmGroupParams", "(", "id", "string", ")", "*", "DisableAutoScaleVmGroupParams", "{", "p", ":=", "&", "DisableAutoScaleVmGroupParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DisableAutoScaleVmGroupParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DisableAutoScaleVmGroupParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1083-L1088
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
DisableAutoScaleVmGroup
func (s *AutoScaleService) DisableAutoScaleVmGroup(p *DisableAutoScaleVmGroupParams) (*DisableAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("disableAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r DisableAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) DisableAutoScaleVmGroup(p *DisableAutoScaleVmGroupParams) (*DisableAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("disableAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r DisableAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "DisableAutoScaleVmGroup", "(", "p", "*", "DisableAutoScaleVmGroupParams", ")", "(", "*", "DisableAutoScaleVmGroupResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DisableAutoScaleVmGroupResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Disables an AutoScale Vm Group
[ "Disables", "an", "AutoScale", "Vm", "Group" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1091-L1123
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewEnableAutoScaleVmGroupParams
func (s *AutoScaleService) NewEnableAutoScaleVmGroupParams(id string) *EnableAutoScaleVmGroupParams { p := &EnableAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewEnableAutoScaleVmGroupParams(id string) *EnableAutoScaleVmGroupParams { p := &EnableAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewEnableAutoScaleVmGroupParams", "(", "id", "string", ")", "*", "EnableAutoScaleVmGroupParams", "{", "p", ":=", "&", "EnableAutoScaleVmGroupParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new EnableAutoScaleVmGroupParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "EnableAutoScaleVmGroupParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1169-L1174
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
EnableAutoScaleVmGroup
func (s *AutoScaleService) EnableAutoScaleVmGroup(p *EnableAutoScaleVmGroupParams) (*EnableAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("enableAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r EnableAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) EnableAutoScaleVmGroup(p *EnableAutoScaleVmGroupParams) (*EnableAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("enableAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r EnableAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "EnableAutoScaleVmGroup", "(", "p", "*", "EnableAutoScaleVmGroupParams", ")", "(", "*", "EnableAutoScaleVmGroupResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "EnableAutoScaleVmGroupResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Enables an AutoScale Vm Group
[ "Enables", "an", "AutoScale", "Vm", "Group" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1177-L1209
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewListAutoScalePoliciesParams
func (s *AutoScaleService) NewListAutoScalePoliciesParams() *ListAutoScalePoliciesParams { p := &ListAutoScalePoliciesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AutoScaleService) NewListAutoScalePoliciesParams() *ListAutoScalePoliciesParams { p := &ListAutoScalePoliciesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewListAutoScalePoliciesParams", "(", ")", "*", "ListAutoScalePoliciesParams", "{", "p", ":=", "&", "ListAutoScalePoliciesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListAutoScalePoliciesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListAutoScalePoliciesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1369-L1373
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
ListAutoScalePolicies
func (s *AutoScaleService) ListAutoScalePolicies(p *ListAutoScalePoliciesParams) (*ListAutoScalePoliciesResponse, error) { resp, err := s.cs.newRequest("listAutoScalePolicies", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScalePoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AutoScaleService) ListAutoScalePolicies(p *ListAutoScalePoliciesParams) (*ListAutoScalePoliciesResponse, error) { resp, err := s.cs.newRequest("listAutoScalePolicies", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScalePoliciesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "ListAutoScalePolicies", "(", "p", "*", "ListAutoScalePoliciesParams", ")", "(", "*", "ListAutoScalePoliciesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListAutoScalePoliciesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists autoscale policies.
[ "Lists", "autoscale", "policies", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1409-L1421
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewListAutoScaleVmGroupsParams
func (s *AutoScaleService) NewListAutoScaleVmGroupsParams() *ListAutoScaleVmGroupsParams { p := &ListAutoScaleVmGroupsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AutoScaleService) NewListAutoScaleVmGroupsParams() *ListAutoScaleVmGroupsParams { p := &ListAutoScaleVmGroupsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewListAutoScaleVmGroupsParams", "(", ")", "*", "ListAutoScaleVmGroupsParams", "{", "p", ":=", "&", "ListAutoScaleVmGroupsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListAutoScaleVmGroupsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListAutoScaleVmGroupsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1614-L1618
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
ListAutoScaleVmGroups
func (s *AutoScaleService) ListAutoScaleVmGroups(p *ListAutoScaleVmGroupsParams) (*ListAutoScaleVmGroupsResponse, error) { resp, err := s.cs.newRequest("listAutoScaleVmGroups", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScaleVmGroupsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AutoScaleService) ListAutoScaleVmGroups(p *ListAutoScaleVmGroupsParams) (*ListAutoScaleVmGroupsResponse, error) { resp, err := s.cs.newRequest("listAutoScaleVmGroups", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScaleVmGroupsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "ListAutoScaleVmGroups", "(", "p", "*", "ListAutoScaleVmGroupsParams", ")", "(", "*", "ListAutoScaleVmGroupsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListAutoScaleVmGroupsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists autoscale vm groups.
[ "Lists", "autoscale", "vm", "groups", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1654-L1666
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewListAutoScaleVmProfilesParams
func (s *AutoScaleService) NewListAutoScaleVmProfilesParams() *ListAutoScaleVmProfilesParams { p := &ListAutoScaleVmProfilesParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AutoScaleService) NewListAutoScaleVmProfilesParams() *ListAutoScaleVmProfilesParams { p := &ListAutoScaleVmProfilesParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewListAutoScaleVmProfilesParams", "(", ")", "*", "ListAutoScaleVmProfilesParams", "{", "p", ":=", "&", "ListAutoScaleVmProfilesParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListAutoScaleVmProfilesParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListAutoScaleVmProfilesParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1864-L1868
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
ListAutoScaleVmProfiles
func (s *AutoScaleService) ListAutoScaleVmProfiles(p *ListAutoScaleVmProfilesParams) (*ListAutoScaleVmProfilesResponse, error) { resp, err := s.cs.newRequest("listAutoScaleVmProfiles", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScaleVmProfilesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AutoScaleService) ListAutoScaleVmProfiles(p *ListAutoScaleVmProfilesParams) (*ListAutoScaleVmProfilesResponse, error) { resp, err := s.cs.newRequest("listAutoScaleVmProfiles", p.toURLValues()) if err != nil { return nil, err } var r ListAutoScaleVmProfilesResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "ListAutoScaleVmProfiles", "(", "p", "*", "ListAutoScaleVmProfilesParams", ")", "(", "*", "ListAutoScaleVmProfilesResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListAutoScaleVmProfilesResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Lists autoscale vm profiles.
[ "Lists", "autoscale", "vm", "profiles", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L1904-L1916
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewListConditionsParams
func (s *AutoScaleService) NewListConditionsParams() *ListConditionsParams { p := &ListConditionsParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AutoScaleService) NewListConditionsParams() *ListConditionsParams { p := &ListConditionsParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewListConditionsParams", "(", ")", "*", "ListConditionsParams", "{", "p", ":=", "&", "ListConditionsParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListConditionsParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListConditionsParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2067-L2071
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
ListConditions
func (s *AutoScaleService) ListConditions(p *ListConditionsParams) (*ListConditionsResponse, error) { resp, err := s.cs.newRequest("listConditions", p.toURLValues()) if err != nil { return nil, err } var r ListConditionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AutoScaleService) ListConditions(p *ListConditionsParams) (*ListConditionsResponse, error) { resp, err := s.cs.newRequest("listConditions", p.toURLValues()) if err != nil { return nil, err } var r ListConditionsResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "ListConditions", "(", "p", "*", "ListConditionsParams", ")", "(", "*", "ListConditionsResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListConditionsResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List Conditions for the specific user
[ "List", "Conditions", "for", "the", "specific", "user" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2107-L2119
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewListCountersParams
func (s *AutoScaleService) NewListCountersParams() *ListCountersParams { p := &ListCountersParams{} p.p = make(map[string]interface{}) return p }
go
func (s *AutoScaleService) NewListCountersParams() *ListCountersParams { p := &ListCountersParams{} p.p = make(map[string]interface{}) return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewListCountersParams", "(", ")", "*", "ListCountersParams", "{", "p", ":=", "&", "ListCountersParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ListCountersParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ListCountersParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2221-L2225
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
ListCounters
func (s *AutoScaleService) ListCounters(p *ListCountersParams) (*ListCountersResponse, error) { resp, err := s.cs.newRequest("listCounters", p.toURLValues()) if err != nil { return nil, err } var r ListCountersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
go
func (s *AutoScaleService) ListCounters(p *ListCountersParams) (*ListCountersResponse, error) { resp, err := s.cs.newRequest("listCounters", p.toURLValues()) if err != nil { return nil, err } var r ListCountersResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "ListCounters", "(", "p", "*", "ListCountersParams", ")", "(", "*", "ListCountersResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "ListCountersResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// List the counters
[ "List", "the", "counters" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2311-L2323
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewUpdateAutoScalePolicyParams
func (s *AutoScaleService) NewUpdateAutoScalePolicyParams(id string) *UpdateAutoScalePolicyParams { p := &UpdateAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewUpdateAutoScalePolicyParams(id string) *UpdateAutoScalePolicyParams { p := &UpdateAutoScalePolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewUpdateAutoScalePolicyParams", "(", "id", "string", ")", "*", "UpdateAutoScalePolicyParams", "{", "p", ":=", "&", "UpdateAutoScalePolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateAutoScalePolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateAutoScalePolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2399-L2404
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
UpdateAutoScalePolicy
func (s *AutoScaleService) UpdateAutoScalePolicy(p *UpdateAutoScalePolicyParams) (*UpdateAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("updateAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) UpdateAutoScalePolicy(p *UpdateAutoScalePolicyParams) (*UpdateAutoScalePolicyResponse, error) { resp, err := s.cs.newRequest("updateAutoScalePolicy", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScalePolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "UpdateAutoScalePolicy", "(", "p", "*", "UpdateAutoScalePolicyParams", ")", "(", "*", "UpdateAutoScalePolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateAutoScalePolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates an existing autoscale policy.
[ "Updates", "an", "existing", "autoscale", "policy", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2407-L2439
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewUpdateAutoScaleVmGroupParams
func (s *AutoScaleService) NewUpdateAutoScaleVmGroupParams(id string) *UpdateAutoScaleVmGroupParams { p := &UpdateAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewUpdateAutoScaleVmGroupParams(id string) *UpdateAutoScaleVmGroupParams { p := &UpdateAutoScaleVmGroupParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewUpdateAutoScaleVmGroupParams", "(", "id", "string", ")", "*", "UpdateAutoScaleVmGroupParams", "{", "p", ":=", "&", "UpdateAutoScaleVmGroupParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateAutoScaleVmGroupParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateAutoScaleVmGroupParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2563-L2568
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
UpdateAutoScaleVmGroup
func (s *AutoScaleService) UpdateAutoScaleVmGroup(p *UpdateAutoScaleVmGroupParams) (*UpdateAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("updateAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) UpdateAutoScaleVmGroup(p *UpdateAutoScaleVmGroupParams) (*UpdateAutoScaleVmGroupResponse, error) { resp, err := s.cs.newRequest("updateAutoScaleVmGroup", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScaleVmGroupResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "UpdateAutoScaleVmGroup", "(", "p", "*", "UpdateAutoScaleVmGroupParams", ")", "(", "*", "UpdateAutoScaleVmGroupResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateAutoScaleVmGroupResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates an existing autoscale vm group.
[ "Updates", "an", "existing", "autoscale", "vm", "group", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2571-L2603
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
NewUpdateAutoScaleVmProfileParams
func (s *AutoScaleService) NewUpdateAutoScaleVmProfileParams(id string) *UpdateAutoScaleVmProfileParams { p := &UpdateAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *AutoScaleService) NewUpdateAutoScaleVmProfileParams(id string) *UpdateAutoScaleVmProfileParams { p := &UpdateAutoScaleVmProfileParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "AutoScaleService", ")", "NewUpdateAutoScaleVmProfileParams", "(", "id", "string", ")", "*", "UpdateAutoScaleVmProfileParams", "{", "p", ":=", "&", "UpdateAutoScaleVmProfileParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new UpdateAutoScaleVmProfileParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "UpdateAutoScaleVmProfileParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2722-L2727
train
xanzy/go-cloudstack
cloudstack/AutoScaleService.go
UpdateAutoScaleVmProfile
func (s *AutoScaleService) UpdateAutoScaleVmProfile(p *UpdateAutoScaleVmProfileParams) (*UpdateAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("updateAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *AutoScaleService) UpdateAutoScaleVmProfile(p *UpdateAutoScaleVmProfileParams) (*UpdateAutoScaleVmProfileResponse, error) { resp, err := s.cs.newRequest("updateAutoScaleVmProfile", p.toURLValues()) if err != nil { return nil, err } var r UpdateAutoScaleVmProfileResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "AutoScaleService", ")", "UpdateAutoScaleVmProfile", "(", "p", "*", "UpdateAutoScaleVmProfileParams", ")", "(", "*", "UpdateAutoScaleVmProfileResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "UpdateAutoScaleVmProfileResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Updates an existing autoscale vm profile.
[ "Updates", "an", "existing", "autoscale", "vm", "profile", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AutoScaleService.go#L2730-L2762
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewAddNetscalerLoadBalancerParams
func (s *LoadBalancerService) NewAddNetscalerLoadBalancerParams(networkdevicetype string, password string, physicalnetworkid string, url string, username string) *AddNetscalerLoadBalancerParams { p := &AddNetscalerLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["networkdevicetype"] = networkdevicetype p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
go
func (s *LoadBalancerService) NewAddNetscalerLoadBalancerParams(networkdevicetype string, password string, physicalnetworkid string, url string, username string) *AddNetscalerLoadBalancerParams { p := &AddNetscalerLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["networkdevicetype"] = networkdevicetype p.p["password"] = password p.p["physicalnetworkid"] = physicalnetworkid p.p["url"] = url p.p["username"] = username return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewAddNetscalerLoadBalancerParams", "(", "networkdevicetype", "string", ",", "password", "string", ",", "physicalnetworkid", "string", ",", "url", "string", ",", "username", "string", ")", "*", "AddNetscalerLoadBalancerParams", "{", "p", ":=", "&", "AddNetscalerLoadBalancerParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "networkdevicetype", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "password", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "physicalnetworkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "url", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "username", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AddNetscalerLoadBalancerParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AddNetscalerLoadBalancerParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L142-L151
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
AddNetscalerLoadBalancer
func (s *LoadBalancerService) AddNetscalerLoadBalancer(p *AddNetscalerLoadBalancerParams) (*AddNetscalerLoadBalancerResponse, error) { resp, err := s.cs.newRequest("addNetscalerLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r AddNetscalerLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) AddNetscalerLoadBalancer(p *AddNetscalerLoadBalancerParams) (*AddNetscalerLoadBalancerResponse, error) { resp, err := s.cs.newRequest("addNetscalerLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r AddNetscalerLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "AddNetscalerLoadBalancer", "(", "p", "*", "AddNetscalerLoadBalancerParams", ")", "(", "*", "AddNetscalerLoadBalancerResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AddNetscalerLoadBalancerResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Adds a netscaler load balancer device
[ "Adds", "a", "netscaler", "load", "balancer", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L154-L186
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewAssignCertToLoadBalancerParams
func (s *LoadBalancerService) NewAssignCertToLoadBalancerParams(certid string, lbruleid string) *AssignCertToLoadBalancerParams { p := &AssignCertToLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["certid"] = certid p.p["lbruleid"] = lbruleid return p }
go
func (s *LoadBalancerService) NewAssignCertToLoadBalancerParams(certid string, lbruleid string) *AssignCertToLoadBalancerParams { p := &AssignCertToLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["certid"] = certid p.p["lbruleid"] = lbruleid return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewAssignCertToLoadBalancerParams", "(", "certid", "string", ",", "lbruleid", "string", ")", "*", "AssignCertToLoadBalancerParams", "{", "p", ":=", "&", "AssignCertToLoadBalancerParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "certid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lbruleid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AssignCertToLoadBalancerParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AssignCertToLoadBalancerParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L243-L249
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
AssignCertToLoadBalancer
func (s *LoadBalancerService) AssignCertToLoadBalancer(p *AssignCertToLoadBalancerParams) (*AssignCertToLoadBalancerResponse, error) { resp, err := s.cs.newRequest("assignCertToLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r AssignCertToLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) AssignCertToLoadBalancer(p *AssignCertToLoadBalancerParams) (*AssignCertToLoadBalancerResponse, error) { resp, err := s.cs.newRequest("assignCertToLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r AssignCertToLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "AssignCertToLoadBalancer", "(", "p", "*", "AssignCertToLoadBalancerParams", ")", "(", "*", "AssignCertToLoadBalancerResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AssignCertToLoadBalancerResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Assigns a certificate to a load balancer rule
[ "Assigns", "a", "certificate", "to", "a", "load", "balancer", "rule" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L252-L279
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewAssignToGlobalLoadBalancerRuleParams
func (s *LoadBalancerService) NewAssignToGlobalLoadBalancerRuleParams(id string, loadbalancerrulelist []string) *AssignToGlobalLoadBalancerRuleParams { p := &AssignToGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["loadbalancerrulelist"] = loadbalancerrulelist return p }
go
func (s *LoadBalancerService) NewAssignToGlobalLoadBalancerRuleParams(id string, loadbalancerrulelist []string) *AssignToGlobalLoadBalancerRuleParams { p := &AssignToGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id p.p["loadbalancerrulelist"] = loadbalancerrulelist return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewAssignToGlobalLoadBalancerRuleParams", "(", "id", "string", ",", "loadbalancerrulelist", "[", "]", "string", ")", "*", "AssignToGlobalLoadBalancerRuleParams", "{", "p", ":=", "&", "AssignToGlobalLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "loadbalancerrulelist", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AssignToGlobalLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AssignToGlobalLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L340-L346
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
AssignToGlobalLoadBalancerRule
func (s *LoadBalancerService) AssignToGlobalLoadBalancerRule(p *AssignToGlobalLoadBalancerRuleParams) (*AssignToGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("assignToGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r AssignToGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) AssignToGlobalLoadBalancerRule(p *AssignToGlobalLoadBalancerRuleParams) (*AssignToGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("assignToGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r AssignToGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "AssignToGlobalLoadBalancerRule", "(", "p", "*", "AssignToGlobalLoadBalancerRuleParams", ")", "(", "*", "AssignToGlobalLoadBalancerRuleResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "AssignToGlobalLoadBalancerRuleResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Assign load balancer rule or list of load balancer rules to a global load balancer rules.
[ "Assign", "load", "balancer", "rule", "or", "list", "of", "load", "balancer", "rules", "to", "a", "global", "load", "balancer", "rules", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L349-L376
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewAssignToLoadBalancerRuleParams
func (s *LoadBalancerService) NewAssignToLoadBalancerRuleParams(id string) *AssignToLoadBalancerRuleParams { p := &AssignToLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewAssignToLoadBalancerRuleParams(id string) *AssignToLoadBalancerRuleParams { p := &AssignToLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewAssignToLoadBalancerRuleParams", "(", "id", "string", ")", "*", "AssignToLoadBalancerRuleParams", "{", "p", ":=", "&", "AssignToLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new AssignToLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "AssignToLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L437-L442
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewConfigureNetscalerLoadBalancerParams
func (s *LoadBalancerService) NewConfigureNetscalerLoadBalancerParams(lbdeviceid string) *ConfigureNetscalerLoadBalancerParams { p := &ConfigureNetscalerLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["lbdeviceid"] = lbdeviceid return p }
go
func (s *LoadBalancerService) NewConfigureNetscalerLoadBalancerParams(lbdeviceid string) *ConfigureNetscalerLoadBalancerParams { p := &ConfigureNetscalerLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["lbdeviceid"] = lbdeviceid return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewConfigureNetscalerLoadBalancerParams", "(", "lbdeviceid", "string", ")", "*", "ConfigureNetscalerLoadBalancerParams", "{", "p", ":=", "&", "ConfigureNetscalerLoadBalancerParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lbdeviceid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new ConfigureNetscalerLoadBalancerParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "ConfigureNetscalerLoadBalancerParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L553-L558
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
ConfigureNetscalerLoadBalancer
func (s *LoadBalancerService) ConfigureNetscalerLoadBalancer(p *ConfigureNetscalerLoadBalancerParams) (*NetscalerLoadBalancerResponse, error) { resp, err := s.cs.newRequest("configureNetscalerLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r NetscalerLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) ConfigureNetscalerLoadBalancer(p *ConfigureNetscalerLoadBalancerParams) (*NetscalerLoadBalancerResponse, error) { resp, err := s.cs.newRequest("configureNetscalerLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r NetscalerLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "ConfigureNetscalerLoadBalancer", "(", "p", "*", "ConfigureNetscalerLoadBalancerParams", ")", "(", "*", "NetscalerLoadBalancerResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "NetscalerLoadBalancerResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// configures a netscaler load balancer device
[ "configures", "a", "netscaler", "load", "balancer", "device" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L561-L593
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewCreateGlobalLoadBalancerRuleParams
func (s *LoadBalancerService) NewCreateGlobalLoadBalancerRuleParams(gslbdomainname string, gslbservicetype string, name string, regionid int) *CreateGlobalLoadBalancerRuleParams { p := &CreateGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["gslbdomainname"] = gslbdomainname p.p["gslbservicetype"] = gslbservicetype p.p["name"] = name p.p["regionid"] = regionid return p }
go
func (s *LoadBalancerService) NewCreateGlobalLoadBalancerRuleParams(gslbdomainname string, gslbservicetype string, name string, regionid int) *CreateGlobalLoadBalancerRuleParams { p := &CreateGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["gslbdomainname"] = gslbdomainname p.p["gslbservicetype"] = gslbservicetype p.p["name"] = name p.p["regionid"] = regionid return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewCreateGlobalLoadBalancerRuleParams", "(", "gslbdomainname", "string", ",", "gslbservicetype", "string", ",", "name", "string", ",", "regionid", "int", ")", "*", "CreateGlobalLoadBalancerRuleParams", "{", "p", ":=", "&", "CreateGlobalLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gslbdomainname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "gslbservicetype", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "regionid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateGlobalLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateGlobalLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L728-L736
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
CreateGlobalLoadBalancerRule
func (s *LoadBalancerService) CreateGlobalLoadBalancerRule(p *CreateGlobalLoadBalancerRuleParams) (*CreateGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("createGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r CreateGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) CreateGlobalLoadBalancerRule(p *CreateGlobalLoadBalancerRuleParams) (*CreateGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("createGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r CreateGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "CreateGlobalLoadBalancerRule", "(", "p", "*", "CreateGlobalLoadBalancerRuleParams", ")", "(", "*", "CreateGlobalLoadBalancerRuleResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateGlobalLoadBalancerRuleResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a global load balancer rule
[ "Creates", "a", "global", "load", "balancer", "rule" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L739-L771
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewCreateLBHealthCheckPolicyParams
func (s *LoadBalancerService) NewCreateLBHealthCheckPolicyParams(lbruleid string) *CreateLBHealthCheckPolicyParams { p := &CreateLBHealthCheckPolicyParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid return p }
go
func (s *LoadBalancerService) NewCreateLBHealthCheckPolicyParams(lbruleid string) *CreateLBHealthCheckPolicyParams { p := &CreateLBHealthCheckPolicyParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewCreateLBHealthCheckPolicyParams", "(", "lbruleid", "string", ")", "*", "CreateLBHealthCheckPolicyParams", "{", "p", ":=", "&", "CreateLBHealthCheckPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lbruleid", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateLBHealthCheckPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateLBHealthCheckPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L922-L927
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
CreateLBHealthCheckPolicy
func (s *LoadBalancerService) CreateLBHealthCheckPolicy(p *CreateLBHealthCheckPolicyParams) (*CreateLBHealthCheckPolicyResponse, error) { resp, err := s.cs.newRequest("createLBHealthCheckPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateLBHealthCheckPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) CreateLBHealthCheckPolicy(p *CreateLBHealthCheckPolicyParams) (*CreateLBHealthCheckPolicyResponse, error) { resp, err := s.cs.newRequest("createLBHealthCheckPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateLBHealthCheckPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "CreateLBHealthCheckPolicy", "(", "p", "*", "CreateLBHealthCheckPolicyParams", ")", "(", "*", "CreateLBHealthCheckPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateLBHealthCheckPolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a load balancer health check policy
[ "Creates", "a", "load", "balancer", "health", "check", "policy" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L930-L962
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewCreateLBStickinessPolicyParams
func (s *LoadBalancerService) NewCreateLBStickinessPolicyParams(lbruleid string, methodname string, name string) *CreateLBStickinessPolicyParams { p := &CreateLBStickinessPolicyParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid p.p["methodname"] = methodname p.p["name"] = name return p }
go
func (s *LoadBalancerService) NewCreateLBStickinessPolicyParams(lbruleid string, methodname string, name string) *CreateLBStickinessPolicyParams { p := &CreateLBStickinessPolicyParams{} p.p = make(map[string]interface{}) p.p["lbruleid"] = lbruleid p.p["methodname"] = methodname p.p["name"] = name return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewCreateLBStickinessPolicyParams", "(", "lbruleid", "string", ",", "methodname", "string", ",", "name", "string", ")", "*", "CreateLBStickinessPolicyParams", "{", "p", ":=", "&", "CreateLBStickinessPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "lbruleid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "methodname", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateLBStickinessPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateLBStickinessPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1072-L1079
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
CreateLBStickinessPolicy
func (s *LoadBalancerService) CreateLBStickinessPolicy(p *CreateLBStickinessPolicyParams) (*CreateLBStickinessPolicyResponse, error) { resp, err := s.cs.newRequest("createLBStickinessPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateLBStickinessPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) CreateLBStickinessPolicy(p *CreateLBStickinessPolicyParams) (*CreateLBStickinessPolicyResponse, error) { resp, err := s.cs.newRequest("createLBStickinessPolicy", p.toURLValues()) if err != nil { return nil, err } var r CreateLBStickinessPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "CreateLBStickinessPolicy", "(", "p", "*", "CreateLBStickinessPolicyParams", ")", "(", "*", "CreateLBStickinessPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateLBStickinessPolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a load balancer stickiness policy
[ "Creates", "a", "load", "balancer", "stickiness", "policy" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1082-L1114
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewCreateLoadBalancerParams
func (s *LoadBalancerService) NewCreateLoadBalancerParams(algorithm string, instanceport int, name string, networkid string, scheme string, sourceipaddressnetworkid string, sourceport int) *CreateLoadBalancerParams { p := &CreateLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["algorithm"] = algorithm p.p["instanceport"] = instanceport p.p["name"] = name p.p["networkid"] = networkid p.p["scheme"] = scheme p.p["sourceipaddressnetworkid"] = sourceipaddressnetworkid p.p["sourceport"] = sourceport return p }
go
func (s *LoadBalancerService) NewCreateLoadBalancerParams(algorithm string, instanceport int, name string, networkid string, scheme string, sourceipaddressnetworkid string, sourceport int) *CreateLoadBalancerParams { p := &CreateLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["algorithm"] = algorithm p.p["instanceport"] = instanceport p.p["name"] = name p.p["networkid"] = networkid p.p["scheme"] = scheme p.p["sourceipaddressnetworkid"] = sourceipaddressnetworkid p.p["sourceport"] = sourceport return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewCreateLoadBalancerParams", "(", "algorithm", "string", ",", "instanceport", "int", ",", "name", "string", ",", "networkid", "string", ",", "scheme", "string", ",", "sourceipaddressnetworkid", "string", ",", "sourceport", "int", ")", "*", "CreateLoadBalancerParams", "{", "p", ":=", "&", "CreateLoadBalancerParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "algorithm", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "instanceport", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "networkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "scheme", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "sourceipaddressnetworkid", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "sourceport", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateLoadBalancerParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateLoadBalancerParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1266-L1277
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
CreateLoadBalancer
func (s *LoadBalancerService) CreateLoadBalancer(p *CreateLoadBalancerParams) (*CreateLoadBalancerResponse, error) { resp, err := s.cs.newRequest("createLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r CreateLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) CreateLoadBalancer(p *CreateLoadBalancerParams) (*CreateLoadBalancerResponse, error) { resp, err := s.cs.newRequest("createLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r CreateLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } b, err = getRawValue(b) if err != nil { return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "CreateLoadBalancer", "(", "p", "*", "CreateLoadBalancerParams", ")", "(", "*", "CreateLoadBalancerResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "CreateLoadBalancerResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "b", ",", "err", "=", "getRawValue", "(", "b", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Creates a load balancer
[ "Creates", "a", "load", "balancer" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1280-L1312
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewCreateLoadBalancerRuleParams
func (s *LoadBalancerService) NewCreateLoadBalancerRuleParams(algorithm string, name string, privateport int, publicport int) *CreateLoadBalancerRuleParams { p := &CreateLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["algorithm"] = algorithm p.p["name"] = name p.p["privateport"] = privateport p.p["publicport"] = publicport return p }
go
func (s *LoadBalancerService) NewCreateLoadBalancerRuleParams(algorithm string, name string, privateport int, publicport int) *CreateLoadBalancerRuleParams { p := &CreateLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["algorithm"] = algorithm p.p["name"] = name p.p["privateport"] = privateport p.p["publicport"] = publicport return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewCreateLoadBalancerRuleParams", "(", "algorithm", "string", ",", "name", "string", ",", "privateport", "int", ",", "publicport", "int", ")", "*", "CreateLoadBalancerRuleParams", "{", "p", ":=", "&", "CreateLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "algorithm", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "name", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "privateport", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "publicport", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new CreateLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "CreateLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1520-L1528
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewDeleteGlobalLoadBalancerRuleParams
func (s *LoadBalancerService) NewDeleteGlobalLoadBalancerRuleParams(id string) *DeleteGlobalLoadBalancerRuleParams { p := &DeleteGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewDeleteGlobalLoadBalancerRuleParams(id string) *DeleteGlobalLoadBalancerRuleParams { p := &DeleteGlobalLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewDeleteGlobalLoadBalancerRuleParams", "(", "id", "string", ")", "*", "DeleteGlobalLoadBalancerRuleParams", "{", "p", ":=", "&", "DeleteGlobalLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteGlobalLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteGlobalLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1615-L1620
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
DeleteGlobalLoadBalancerRule
func (s *LoadBalancerService) DeleteGlobalLoadBalancerRule(p *DeleteGlobalLoadBalancerRuleParams) (*DeleteGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("deleteGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r DeleteGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) DeleteGlobalLoadBalancerRule(p *DeleteGlobalLoadBalancerRuleParams) (*DeleteGlobalLoadBalancerRuleResponse, error) { resp, err := s.cs.newRequest("deleteGlobalLoadBalancerRule", p.toURLValues()) if err != nil { return nil, err } var r DeleteGlobalLoadBalancerRuleResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "DeleteGlobalLoadBalancerRule", "(", "p", "*", "DeleteGlobalLoadBalancerRuleParams", ")", "(", "*", "DeleteGlobalLoadBalancerRuleResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteGlobalLoadBalancerRuleResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a global load balancer rule.
[ "Deletes", "a", "global", "load", "balancer", "rule", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1623-L1650
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewDeleteLBHealthCheckPolicyParams
func (s *LoadBalancerService) NewDeleteLBHealthCheckPolicyParams(id string) *DeleteLBHealthCheckPolicyParams { p := &DeleteLBHealthCheckPolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewDeleteLBHealthCheckPolicyParams(id string) *DeleteLBHealthCheckPolicyParams { p := &DeleteLBHealthCheckPolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewDeleteLBHealthCheckPolicyParams", "(", "id", "string", ")", "*", "DeleteLBHealthCheckPolicyParams", "{", "p", ":=", "&", "DeleteLBHealthCheckPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteLBHealthCheckPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteLBHealthCheckPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1683-L1688
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
DeleteLBHealthCheckPolicy
func (s *LoadBalancerService) DeleteLBHealthCheckPolicy(p *DeleteLBHealthCheckPolicyParams) (*DeleteLBHealthCheckPolicyResponse, error) { resp, err := s.cs.newRequest("deleteLBHealthCheckPolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteLBHealthCheckPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) DeleteLBHealthCheckPolicy(p *DeleteLBHealthCheckPolicyParams) (*DeleteLBHealthCheckPolicyResponse, error) { resp, err := s.cs.newRequest("deleteLBHealthCheckPolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteLBHealthCheckPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "DeleteLBHealthCheckPolicy", "(", "p", "*", "DeleteLBHealthCheckPolicyParams", ")", "(", "*", "DeleteLBHealthCheckPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteLBHealthCheckPolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a load balancer health check policy.
[ "Deletes", "a", "load", "balancer", "health", "check", "policy", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1691-L1718
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewDeleteLBStickinessPolicyParams
func (s *LoadBalancerService) NewDeleteLBStickinessPolicyParams(id string) *DeleteLBStickinessPolicyParams { p := &DeleteLBStickinessPolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewDeleteLBStickinessPolicyParams(id string) *DeleteLBStickinessPolicyParams { p := &DeleteLBStickinessPolicyParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewDeleteLBStickinessPolicyParams", "(", "id", "string", ")", "*", "DeleteLBStickinessPolicyParams", "{", "p", ":=", "&", "DeleteLBStickinessPolicyParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteLBStickinessPolicyParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteLBStickinessPolicyParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1751-L1756
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
DeleteLBStickinessPolicy
func (s *LoadBalancerService) DeleteLBStickinessPolicy(p *DeleteLBStickinessPolicyParams) (*DeleteLBStickinessPolicyResponse, error) { resp, err := s.cs.newRequest("deleteLBStickinessPolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteLBStickinessPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) DeleteLBStickinessPolicy(p *DeleteLBStickinessPolicyParams) (*DeleteLBStickinessPolicyResponse, error) { resp, err := s.cs.newRequest("deleteLBStickinessPolicy", p.toURLValues()) if err != nil { return nil, err } var r DeleteLBStickinessPolicyResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "DeleteLBStickinessPolicy", "(", "p", "*", "DeleteLBStickinessPolicyParams", ")", "(", "*", "DeleteLBStickinessPolicyResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteLBStickinessPolicyResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a load balancer stickiness policy.
[ "Deletes", "a", "load", "balancer", "stickiness", "policy", "." ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1759-L1786
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewDeleteLoadBalancerParams
func (s *LoadBalancerService) NewDeleteLoadBalancerParams(id string) *DeleteLoadBalancerParams { p := &DeleteLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewDeleteLoadBalancerParams(id string) *DeleteLoadBalancerParams { p := &DeleteLoadBalancerParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewDeleteLoadBalancerParams", "(", "id", "string", ")", "*", "DeleteLoadBalancerParams", "{", "p", ":=", "&", "DeleteLoadBalancerParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteLoadBalancerParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteLoadBalancerParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1819-L1824
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
DeleteLoadBalancer
func (s *LoadBalancerService) DeleteLoadBalancer(p *DeleteLoadBalancerParams) (*DeleteLoadBalancerResponse, error) { resp, err := s.cs.newRequest("deleteLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r DeleteLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
go
func (s *LoadBalancerService) DeleteLoadBalancer(p *DeleteLoadBalancerParams) (*DeleteLoadBalancerResponse, error) { resp, err := s.cs.newRequest("deleteLoadBalancer", p.toURLValues()) if err != nil { return nil, err } var r DeleteLoadBalancerResponse if err := json.Unmarshal(resp, &r); err != nil { return nil, err } // If we have a async client, we need to wait for the async result if s.cs.async { b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) if err != nil { if err == AsyncTimeoutErr { return &r, err } return nil, err } if err := json.Unmarshal(b, &r); err != nil { return nil, err } } return &r, nil }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "DeleteLoadBalancer", "(", "p", "*", "DeleteLoadBalancerParams", ")", "(", "*", "DeleteLoadBalancerResponse", ",", "error", ")", "{", "resp", ",", "err", ":=", "s", ".", "cs", ".", "newRequest", "(", "\"", "\"", ",", "p", ".", "toURLValues", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "var", "r", "DeleteLoadBalancerResponse", "\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "resp", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// If we have a async client, we need to wait for the async result", "if", "s", ".", "cs", ".", "async", "{", "b", ",", "err", ":=", "s", ".", "cs", ".", "GetAsyncJobResult", "(", "r", ".", "JobID", ",", "s", ".", "cs", ".", "timeout", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "AsyncTimeoutErr", "{", "return", "&", "r", ",", "err", "\n", "}", "\n", "return", "nil", ",", "err", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Unmarshal", "(", "b", ",", "&", "r", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "}", "\n\n", "return", "&", "r", ",", "nil", "\n", "}" ]
// Deletes a load balancer
[ "Deletes", "a", "load", "balancer" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1827-L1854
train
xanzy/go-cloudstack
cloudstack/LoadBalancerService.go
NewDeleteLoadBalancerRuleParams
func (s *LoadBalancerService) NewDeleteLoadBalancerRuleParams(id string) *DeleteLoadBalancerRuleParams { p := &DeleteLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
go
func (s *LoadBalancerService) NewDeleteLoadBalancerRuleParams(id string) *DeleteLoadBalancerRuleParams { p := &DeleteLoadBalancerRuleParams{} p.p = make(map[string]interface{}) p.p["id"] = id return p }
[ "func", "(", "s", "*", "LoadBalancerService", ")", "NewDeleteLoadBalancerRuleParams", "(", "id", "string", ")", "*", "DeleteLoadBalancerRuleParams", "{", "p", ":=", "&", "DeleteLoadBalancerRuleParams", "{", "}", "\n", "p", ".", "p", "=", "make", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "p", ".", "p", "[", "\"", "\"", "]", "=", "id", "\n", "return", "p", "\n", "}" ]
// You should always use this function to get a new DeleteLoadBalancerRuleParams instance, // as then you are sure you have configured all required params
[ "You", "should", "always", "use", "this", "function", "to", "get", "a", "new", "DeleteLoadBalancerRuleParams", "instance", "as", "then", "you", "are", "sure", "you", "have", "configured", "all", "required", "params" ]
b6f53ed3282d22b6446422879587b0a78e1b0f11
https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/LoadBalancerService.go#L1887-L1892
train